{"id":28581,"date":"2016-03-02T16:38:23","date_gmt":"2016-03-02T21:38:23","guid":{"rendered":"http:\/\/blogs.ams.org\/mathgradblog\/?p=28581"},"modified":"2016-03-02T16:38:23","modified_gmt":"2016-03-02T21:38:23","slug":"markov-chains","status":"publish","type":"post","link":"https:\/\/blogs.ams.org\/mathgradblog\/2016\/03\/02\/markov-chains\/","title":{"rendered":"Hookups, Dating, and Markov Chains: Teaching Matrices so that Your Students Won\u2019t Hate Them, Part III"},"content":{"rendered":"<p>Having taught your students how to <a href=\"http:\/\/blogs.ams.org\/mathgradblog\/2015\/10\/19\/matrix-multiplication-easy\/\">visualize matrix multiplication<\/a> and why performing this bizarre dance of arithmetic <a href=\"http:\/\/blogs.ams.org\/mathgradblog\/2016\/01\/21\/matrices-mlk-day\/\">could help make society\u00a0a better place<\/a>, the next logical step might be to raise a matrix to a power, say, to help your students forecast their dating prospects. \u00a0Suppose at the start of orientation 80% of freshman are single, 10% are in a relationship, and 10% are in that ambiguous state that has been variously termed \u201cit\u2019s complicated\u201d, \u201chookup buddies\u201d, or \u201cfriends with benefits.\u201d\u00a0 Each month those percentages change, according to a fixed set of probabilities: a fifth of the freshman who are single form a relationship, a quarter of those in the \u201cit\u2019s complicated\u201d category become single, etc.\u00a0 We can organize those probabilities into a <em>transition matrix,<\/em> in which each entry gives the probability of a student <em>transitioning<\/em> from the relationship status described by their row to the relationship status described by their column:<\/p>\n<p><a href=\"http:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.56.04.png\" rel=\"attachment wp-att-28558\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-28558 aligncenter\" src=\"http:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.56.04.png\" alt=\"Screenshot 2016-02-27 15.56.04\" width=\"413\" height=\"129\" srcset=\"https:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.56.04.png 532w, https:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.56.04-300x94.png 300w\" sizes=\"auto, (max-width: 413px) 100vw, 413px\" \/><\/a><!--more--><\/p>\n<p>Thus, after one month there is a 30% chance a single student will remain single, a 20% chance they will enter a relationship, and a 50% chance they will enter the \u201cit\u2019s complicated\u201d state. Depending on how you structure the lesson, you might have the students estimate these transition probabilities in small groups\u2014an exercise certain to capture their full attention (accompanied, perhaps, by a fair bit of giggling). \u00a0\u00a0Next, have students come up with an initial state vector describing the proportion of students in each state (relationship status) at the start of the year.\u00a0 For the above example: [.80 \u00a0.10 \u00a0.10] .\u00a0 What percentage of students will be in a relationship after a month?<a href=\"http:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.58.33.png\" rel=\"attachment wp-att-28563\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-28563 aligncenter\" src=\"http:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.58.33.png\" alt=\"Screenshot 2016-02-27 15.58.33\" width=\"534\" height=\"106\" srcset=\"https:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.58.33.png 726w, https:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.58.33-300x60.png 300w\" sizes=\"auto, (max-width: 534px) 100vw, 534px\" \/><\/a><\/p>\n<p>Two months?<a href=\"http:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.59.03.png\" rel=\"attachment wp-att-28564\"><img loading=\"lazy\" decoding=\"async\" class=\" wp-image-28564 aligncenter\" src=\"http:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.59.03.png\" alt=\"Screenshot 2016-02-27 15.59.03\" width=\"550\" height=\"116\" srcset=\"https:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.59.03.png 758w, https:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.59.03-300x63.png 300w\" sizes=\"auto, (max-width: 550px) 100vw, 550px\" \/><\/a><\/p>\n<p>By the end of the year?<a href=\"http:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.58.49.png\" rel=\"attachment wp-att-28565\"><img loading=\"lazy\" decoding=\"async\" class=\"size-large wp-image-28565 aligncenter\" src=\"http:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.58.49.png\" alt=\"Screenshot 2016-02-27 15.58.49\" width=\"640\" height=\"98\" srcset=\"https:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.58.49.png 930w, https:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.58.49-300x46.png 300w, https:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-15.58.49-768x117.png 768w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/a><\/p>\n<p>And viola, your students will find them themselves raising matrices to higher powers.<\/p>\n<p>At this point, it\u2019s rather natural for students to start exploring what happens after an even longer period of time (four years, for instance), and thus they may on their own (or with a little prompting from you) discover the concept of a steady-state vector\u2014the vector that the system will always converge to over time no matter what initial state vector you start with. Push them to see if they can come up with an example of a transition matrix for which there is no steady-state vector: \u00a0<a href=\"http:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-16.18.39.png\" rel=\"attachment wp-att-28567\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-28567\" src=\"http:\/\/blogs.ams.org\/mathgradblog\/files\/2016\/02\/Screenshot-2016-02-27-16.18.39.png\" alt=\"Screenshot 2016-02-27 16.18.39\" width=\"35\" height=\"28\" \/><\/a>\u00a0for instance.\u00a0 If they can explain why that matrix does not produce a steady-state vector, try to get them to formalize their reasons into a conjecture about the necessary and sufficient conditions for a matrix to have one.\u00a0 In addition, you might pause here to have your students consider what properties a matrix needs to be a transition matrix.\u00a0 In this example, I have written the probabilities as row vectors requiring you to multiply your initial state vector on the left, but I\u2019ve seen them written as column vectors as well, and I actually think the latter (while less conventional) is easier to visualize.<\/p>\n<p>Depending on the trajectory of the course, you might use this as an opportunity to preview the concept on an eigenvector or even the Perron\u2013Frobenius theorem.\u00a0 When you do introduce these concepts later on, the dating matrix will provide a memorable and tangible example to circle back to.\u00a0 This would also be a good time to step back and ask your students to articulate the general characteristics of the problem we\u2019ve set up\u2014fixed probabilities, the outcome of each stage determined by the previous one, a finite number of states\u2014and in doing so, define a Markov Chain.\u00a0 This approach feels more satisfying to me than simply handing your students a definition at the get-go, since it allows the definition to arise naturally from the problem posed and hence feel less arbitrary, but that\u2019s a matter of preference.\u00a0 In either case, now would be a good time to reinforce the definition by asking students what other sorts of examples could be modeled well (though not perfectly) with a Markov Chain.<\/p>\n<p>A good concluding exercise might be to ask students how they would improve this model.\u00a0 For instance, is it reasonable to assume that the transition matrix stays the same throughout the year, or are there more break-ups around Thanksgiving, more relationships forming around Valentine\u2019s Day, and more students entering the \u201cit\u2019s complicated\u201d category over spring break?\u00a0 How would they adjust the model and would it still qualify as a Markov chain? What are the trade-offs of making each stage of the chain represent a year rather than a month? You could also discuss what the Markov approach can and cannot tell you.\u00a0 Is it possible to estimate in this model how long a typical college relationship will last or how many break-ups a student can expect to experience over their four years?\u00a0 A major advantage here over other common mathematical problems about relationships is that this one does not presume heterosexual couples or even two genders (though a challenging and fascinating extension might be to consider a bisexual subset of the population for which same-sex and cross-sex relationships have different probabilities).\u00a0 In sum, examples about college dating are a great way to capture your students\u2019 attention, particularly if you give them a chance to bring their own knowledge of the college dating scene to bear on the problem.\u00a0 On a psychological level, students should come away from the class associating the term \u201cMarkov chain\u201d not only with a simple example they can easily to explain to their friends, but with a positive association between the new concept and the fun class they had.\u00a0 This is sure to make Markov Chains seem less scary and easier to remember in the future.<\/p>\n<div style=\"margin-top: 0px; margin-bottom: 0px;\" class=\"sharethis-inline-share-buttons\" ><\/div>","protected":false},"excerpt":{"rendered":"<p>Having taught your students how to visualize matrix multiplication and why performing this bizarre dance of arithmetic could help make society\u00a0a better place, the next logical step might be to raise a matrix to a power, say, to help your &hellip; <a href=\"https:\/\/blogs.ams.org\/mathgradblog\/2016\/03\/02\/markov-chains\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n<div style=\"margin-top: 0px; margin-bottom: 0px;\" class=\"sharethis-inline-share-buttons\" data-url=https:\/\/blogs.ams.org\/mathgradblog\/2016\/03\/02\/markov-chains\/><\/div>\n","protected":false},"author":93,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[2,162,158,157,20],"tags":[165,197,198,126],"class_list":["post-28581","post","type-post","status-publish","format-standard","hentry","category-advice","category-linear-algebra","category-math-education","category-math-teaching","category-teaching","tag-linear-algebra","tag-markov-chains","tag-math-and-romance","tag-teaching"],"jetpack_featured_media_url":"","jetpack_shortlink":"https:\/\/wp.me\/p3gbww-7qZ","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/posts\/28581","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/users\/93"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/comments?post=28581"}],"version-history":[{"count":2,"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/posts\/28581\/revisions"}],"predecessor-version":[{"id":28584,"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/posts\/28581\/revisions\/28584"}],"wp:attachment":[{"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/media?parent=28581"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/categories?post=28581"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.ams.org\/mathgradblog\/wp-json\/wp\/v2\/tags?post=28581"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}