{"id":1796,"date":"2017-09-13T23:21:41","date_gmt":"2017-09-14T03:21:41","guid":{"rendered":"http:\/\/scripts.mit.edu\/~zong\/wpress\/?p=1796"},"modified":"2026-10-20T05:08:16","modified_gmt":"2026-10-20T09:08:16","slug":"die-throwing-problem","status":"publish","type":"post","link":"https:\/\/blog.yhuang.org\/?p=1796","title":{"rendered":"die throwing problem"},"content":{"rendered":"<p>Here&#8217;s a <a href=\"https:\/\/gilkalai.wordpress.com\/2017\/09\/08\/elchanan-mossels-amazing-dice-paradox-answers-to-tyi-30\/\">link<\/a> to a subtle probability problem.<\/p>\n<blockquote><p>You throw a die until you get 6. What is the expected number of throws (including the throw giving 6) conditioned on the event that all throws gave even numbers?<\/p><\/blockquote>\n<p>The &#8220;obvious&#8221; answer is incorrect.<br \/>\n<!--more--><br \/>\nThe correct answer can be brute-forced by computing probabilities of this sort:<br \/>\nIf \\(s\\) is a sequence of length \\(n\\), then<br \/>\n\\(P_n\\triangleq\\) = P(\\(s\\) ends in 6 and \\(s\\) all even) = \\((2\/6)^{n-1} (1\/6)\\)<br \/>\n(The total probability over all \\(n\\) is therefore \\(Z=(1\/6)\/(4\/6)=1\/4\\).)<br \/>\nThe expected length of \\(s\\) is \\(\\sum_{n=1}^\\infty n (P_n \/ Z)\\)<br \/>\n\\(= \\sum_{n=1}^\\infty n (2\/6)^{n-1} (1\/6) \/ (1\/4) = \\sum_{n=1}^\\infty n (2\/6)^{n-1} (2\/3) = 3\/2\\)<\/p>\n<p>This is interesting since premature conditioning on the 3 even sides of a die in every roll produces an (incorrect) expected length of 3.<\/p>\n<p>There is already an elegant and convincing derivation of the correct answer attributed to Paul Cuff if you follow the links from the original article, but here&#8217;s an intuitive explanation for why the <em>incorrect<\/em> answer overestimates the expected length in such a way &#8212;<\/p>\n<p>Notice that in \\(P_n\\) the probability \\((1\/6)\\) of obtaining the final 6 has no effect on the expected length. The expected length depends entirely on the shape of \\(P_n\\) over \\(n\\). The calculation for the &#8220;incorrect&#8221; reasoning would have made the sum \\(\\sum_{n=1}^\\infty n (2\/3)^{n-1} (1\/3) = 3\\), and the difference is in the \\((2\/3)^{n-1}\\) vs. \\((2\/6)^{n-1}\\) term. So the existence of 1, 3, and 5 matter; they make longer prefixes of 2 and 4 even less likely, as more of the longer sequences that would have been valid ends up containing a 1, 3, or 5 instead and getting thrown away.<\/p>\n<p>Note: There is also a good discussion <a href=\"https:\/\/www.quora.com\/What-is-the-expected-number-of-rolls-of-a-fair-six-sided-die-to-get-a-6-given-that-all-rolls-leading-up-to-that-6-are-even-numbered\">on Quora<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a link to a subtle probability problem. You throw a die until you get 6. What is the expected number of throws (including the throw giving 6) conditioned on the event that all throws gave even numbers? The &#8220;obvious&#8221; answer is incorrect.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[3244,336,3153,39],"class_list":["post-1796","post","type-post","status-publish","format-standard","hentry","category-uncategorized","tag-dice","tag-math","tag-probability","tag-problem"],"_links":{"self":[{"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=\/wp\/v2\/posts\/1796","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1796"}],"version-history":[{"count":5,"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=\/wp\/v2\/posts\/1796\/revisions"}],"predecessor-version":[{"id":1973,"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=\/wp\/v2\/posts\/1796\/revisions\/1973"}],"wp:attachment":[{"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1796"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1796"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.yhuang.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1796"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}