{"id":1090,"date":"2009-01-03T23:23:19","date_gmt":"2009-01-03T14:23:19","guid":{"rendered":"https:\/\/regex.info\/blog\/2009-01-03\/1090"},"modified":"2009-01-03T23:23:19","modified_gmt":"2009-01-03T14:23:19","slug":"common-sense-blinded-by-math","status":"publish","type":"post","link":"https:\/\/regex.info\/blog\/2009-01-03\/1090","title":{"rendered":"Common Sense: Blinded by Math"},"content":{"rendered":"\n\n\n<div class='resize_warning' id='arw1088'>\n<b>NOTE<\/b>: Images with an <img class='raw' width='19' height='18' src='\/i\/s\/red_zoomup.gif'\/> icon next to them have been artificially shrunk to better fit your screen; click the icon to restore them, in place, to their regular size.\n<\/div>\n\n\n<p>It's amazing how many people can talk themselves into believing something that's obviously wrong.<\/p>\n\n<p>The other day the following question <a\nhref=\"http:\/\/www.codinghorror.com\/blog\/archives\/001203.html\">was posted<\/a>\non <span class='nobr'>a widely<\/span>-read programming blog by Jeff Atwood:<\/p>\n\n<div style='background-color:#332; border: solid 1px white; padding:10px 3em; font-size:110%; width:70%'>Let's say, hypothetically speaking, you met someone who told you they had two children, and one of them is <span class='nobr'>a girl.<\/span> What are the odds that person has <span class='nobr'>a boy<\/span> and <span class='nobr'>a girl<\/span>?<\/div>\n\n<p>It quickly got almost 1,000 comments with people arguing about what the correct\nanswer is.<\/p>\n\n<p>Common sense tells us that gender of an unknown person is <span class='nobr'>a 50<\/span>\/50\nproposition. <span class='nobr'>You strike<\/span> up <span class='nobr'>a conversation<\/span> with someone who says &#8220;yeah, I've\ngot two kids....&#8221; and you know that there's <span class='nobr'>a 50<\/span>\/50 chance as to the gender\nof each kid. <span class='nobr'>The person<\/span> continuing &#8220;... and that's my daughter on the\nswing&#8221; has not revealed anything about the gender of the other kid. Thus,\nthere's <span class='nobr'>a 50<\/span>\/50 chance that the other kid is <span class='nobr'>a boy,<\/span> and hence <span class='nobr'>a 50<\/span>\/50\nchance that &#8220;the person has <span class='nobr'>a boy<\/span> and <span class='nobr'>a girl.<\/span>&#8221; This seems straightforward\nand common-sensical. 50% either way.<\/p>\n\n<p>Yet, there were a lot of comments arguing that the answer is 67%.\nConsider all four ways someone could end up with two kids:<\/p>\n<ul><li>girl then boy<\/li>\n    <li>girl then girl<\/li>\n    <li>boy then girl<\/li>\n    <li style='color:#888'>boy then boy<\/li>\n<\/ul>\n\n<p>...and eliminate the &#8220;boy then boy&#8221; possibility because the question\ntells us that at least one of the kids is <span class='nobr'>a girl,<\/span> you end up with three\nremaining pairings that are possible in this situation. <span class='nobr'>Two of the<\/span> three\ninvolve both genders, so the odds are 2\/3... about 67%... that the person\n&#8220;has <span class='nobr'>a boy<\/span> and <span class='nobr'>a girl.<\/span>&#8221;<\/p>\n\n<p>Well, that seems pretty solid, and we all know that math can sometimes\nbe counter-intuitive, so.... it must be true?<\/p>\n\n<p>It seems that a lot of people are willing to let themselves be swayed by\nwhat they feel is <span class='nobr'>a mathematical<\/span> explanation, even when it flies in the\nface of the most simple, basic common sense. Common sense tells us that\nrevealing the gender of one kid does not indicate anything about the other,\nso where is the flaw in the logic that leads to the 67% answer that\notherwise (except for common sense) seems solid?<\/p>\n\n<p><b>The key point here<\/b> is whether the revelation about the girl gives\nus information intrinsically about <span class='nobr'>a single<\/span> child, or intrinsically about\nthe pair:<\/p>\n\n<ul>\n  <li>If the information is about one single child, it tells us everything about one kid and nothing about the other kid.<\/li>\n  <li>If the information is about the pair, we know nothing specific about either kid, only one new datapoint about the pair.<\/li>\n<\/ul>\n\n<p><b>The difference manifests itself in what we include and exclude when\ncalculating the odds based on the new information.<\/b><\/p>\n\n<p>Let's look at the &#8220;information about the pair&#8221; situation first....<\/p>\n\n<p>After finding out that they have two kids, if you specifically ask &#8220;is\none of your kids <span class='nobr'>a girl<\/span>?&#8221; and get <span class='nobr'>a yes<\/span> answer, you know, every time, that\nat least one is <span class='nobr'>a girl<\/span> and that it's impossible for both to be boys.\nLikewise, if you get a &#8220;no&#8221; answer, you know every time that they have two\nboys. When the answer is yes and you move on to calculate the odds that the\nperson &#8220;has <span class='nobr'>a boy<\/span> and <span class='nobr'>a girl<\/span>&#8221;, you specifically include every two-kid\npermutation that includes <span class='nobr'>a girl<\/span>:<\/p>\n\n<style type=\"text\/css\">\n.n1090 { color: #777 }\n#post1090 td { padding-left: 20px; padding-right:20px }\n.g1090 { color: #777; font-size: 90%; margin-left:1em }\n<\/style>\n\n\n<table style='margin-left:3em' cellpadding='5' cellspacing='0' border='1'>\n<tr valign='baseline'><td>Pairing<\/td><td>Initial Odds<\/td><td align='center'>Include\/Exclude\n<br\/><small>when calculating new odds?<\/small>\n<\/td><td>New Odds<\/td><\/tr>\n<tr><td>girl then boy<\/td> <td align='center'>25%<\/td><td>include all<\/td><td>1\/3 <span class='g1090'>(25 of 75)<\/span><\/td><\/tr>\n<tr><td>girl then girl<\/td><td align='center'>25%<\/td><td>include all<\/td><td>1\/3 <span class='g1090'>(25 of 75)<\/span><\/td><\/tr>\n<tr><td>boy then girl<\/td> <td align='center'>25%<\/td><td>include all<\/td><td>1\/3 <span class='g1090'>(25 of 75)<\/span><\/td><\/tr>\n<tr class='n1090'><td>boy then boy<\/td>  <td align='center'>25%<\/td><td style='color:white'>exclude all<\/td><td><\/td><\/tr>\n<\/table>\n\n<p>The three equally-likely pairings we include are the same as highlighted\nnear the top of this post. <span class='nobr'>Two of the<\/span> pairings include both genders, and so\nthere's a 2\/3 chance &ndash; about 67% &ndash; that they &#8220;have <span class='nobr'>a boy<\/span> and <span class='nobr'>a\ngirl<\/span>&#8221; in this situation.<\/p>\n\n<p>Now, on the other hand, if after finding out that the person has two\nchildren and one of the kids randomly happens to be on the nearby swing and\nhas its gender revealed as <span class='nobr'>a girl,<\/span> this information is intrinsically only\nabout that one kid and tells us nothing <i>intrinsic<\/i> about the pair.\nYes, by finding out that the kid on the swing is <span class='nobr'>a girl<\/span> you <i>can<\/i> say\n&#8220;this pair of kids includes at least one girl&#8221; and so when moving on to\ncalculate the odds, you can exclude all boy\/boy pairings, but the part that most\npeople have missed is not in what you can <i>exclude<\/i>, but in what you can <i>include<\/i>....<\/p>\n\n<p>In this case, you <b>can not<\/b> turn around and include <i>every<\/i>\ntwo-kid permutation that includes <span class='nobr'>a girl<\/span> because if the gender revelation\nis random, then on average, half of the mixed-kid pairings will have a\n<i>boy<\/i> revealed. Since you're ignoring cases when <span class='nobr'>a boy<\/span> is revealed,\nyou have to ignore them when calculating the odds:<\/p>\n\n<table style='margin-left:3em' cellpadding='5' cellspacing='0' border='1'>\n<tr valign='baseline'><td>Pairing<\/td><td>Initial Odds<\/td><td align='center'>Include\/Exclude\n<br\/><small>when calculating new odds?<\/small>\n<\/td><td>New Odds<\/td><\/tr>\n<tr><td>girl then boy<\/td> <td align='center'>25%<\/td><td>include half, exclude half<\/td><td>1\/4 <span class='g1090'>(12.5 of 50)<\/span><\/td><\/tr>\n<tr><td>girl then girl<\/td><td align='center'>25%<\/td><td>include all<\/td><td>1\/2 <span class='g1090'>(25 of 50)<\/span><\/td><\/tr>\n<tr><td>boy then girl<\/td> <td align='center'>25%<\/td><td>include half, exclude half<\/td><td>1\/4 <span class='g1090'>(12.5 of 50)<\/span><\/td><\/tr>\n<tr class='n1090'><td>boy then boy<\/td>  <td align='center'>25%<\/td><td>exclude all<\/td><td><\/td><\/tr>\n<\/table>\n\n<p>The &#8220;Include\/Exclude&#8221; column in both tables is really &#8220;times you'll be informed about <span class='nobr'>a girl<\/span> among the pair&#8221;. <span class='nobr'>In this latter<\/span> situation where the revelation of gender is random,\n&#8220;exclude half&#8221; reflects that, on average, half the times the kid whose gender is revealed is <span class='nobr'>a boy.<\/span><\/p>\n\n<p>So, looking at what <b>is<\/b> included, we see that the pairings that\nhave <span class='nobr'>a boy<\/span> are &frac14; and &frac14; which sum up to &frac12;, <span class='nobr'>a 50<\/span>-50\nchance, just like common sense tells us.<\/p>\n\n<p>The key to all this is to understand <i>exactly<\/i> what information we\nare given, and what information we derive. Let's go back to look at the\nwords actually used in the question posed to us:<\/p>\n\n<div style='background-color:#332; border: solid 1px white; padding:10px 3em; font-size:110%; width:70%'>Let's say, hypothetically speaking, you met someone who told you they had two children, and one of them is <span class='nobr'>a girl.<\/span> What are the odds that person has <span class='nobr'>a boy<\/span> and <span class='nobr'>a girl<\/span>?<\/div>\n\n<p>This is awkwardly worded... does the &#8220;told&#8221; apply to &#8220;had two children&#8221;\nonly? Is &#8220;one of them is <span class='nobr'>a girl<\/span>&#8221; the result of the person telling you that\nexactly, or is it information summed up by the person posing the question?<\/p>\n\n<p>Because the initial question is so poorly worded, we have no choice but to fall back to our\nreal-world experience to try to parse its likely meaning. <span class='nobr'>I can imagine<\/span> it both ways:<\/p>\n\n<ol><li><b>Me: <\/b> Hey, haven't seen you in ages!\n     <br\/><b>Parent<\/b>: Yeah, <span class='nobr'>I'm married<\/span> and have two kids now... that's my daughter over there on the swing.<\/li>\n\n<li style='margin-top:15px'><b>Me: <\/b> Hey, haven't seen you in ages!\n     <br\/><b>Parent<\/b>: Yeah, <span class='nobr'>I'm married<\/span> and have two kids now.\n     <br\/><b>Me: <\/b> Cool, I've got one. <span class='nobr'>My sister<\/span> just had <span class='nobr'>a little<\/span> girl.\n     <br\/><b>Parent<\/b>: Heh, that'll be fun, <span class='nobr'>I know what<\/span> it's like to have <span class='nobr'>a girl.<\/span><\/li>\n<\/ol>\n\n<p>The answer to the posed question is &#8220;50%&#8221; for the first case, and &#8220;67%&#8221; for the second.<\/p>\n\n<p>But that second case seems extremely contrived. <span class='nobr'>The context<\/span> of our\nreal-world experience tells us that most people would say &#8220;I've got <span class='nobr'>a girl,<\/span>\ntoo&#8221;, implying that the other is <span class='nobr'>a boy,<\/span> or &#8220;I've got <span class='nobr'>a pair<\/span> of girls&#8221;. <span class='nobr'>It just seems<\/span> unlikely.<\/p>\n\n<p>The first case &ndash; conversation somehow revealing the gender of one\nof the kids &ndash; seems much more likely, so when faced with the question\n<i>as written<\/i> the most reasonable interpretation results in an answer of\n&#8220;<b>50%<\/b>&#8221;.<\/p>\n\n<p>Still, if you explicitly decide to choose the other reading (that the parent told\nyou &#8220;one of my kids is <span class='nobr'>a girl<\/span>&#8221;), <span class='nobr'>I'd suggest<\/span> your choice is the less reasonable of the two,\nbut in the context of that choice, you're perfectly correct to answer &#8220;67%&#8221;. That's the reading that the initial\nquestion-asker, Jeff Atwood, took in\n<a href=\"http:\/\/www.codinghorror.com\/blog\/archives\/001204.html\">his followup post<\/a> that revealed his answer to be &#8220;67%&#8221;<\/p>\n\n<p>What amazed me in reading the various reader comments on both posts is\nhow many people insisted that the answer was 67% in every possible\nsituation. &#8220;<b>The math is right there, are you stupid!?<\/b>&#8221; Common sense\nscreams that <i>something<\/i> is off here, yet flash <span class='nobr'>a little<\/span> math in\nsomeone's face and odds are they'll blindly follow.<\/p>\n\n","protected":false},"excerpt":{"rendered":"<p>It's amazing how many people can talk themselves into believing something that's obviously wrong.<\/p> <p>The other day the following question was posted on a widely-read programming blog by Jeff Atwood:<\/p> <p>It quickly got almost 1,000 comments with people arguing about what the correct answer is.<\/p> <p>Common sense tells us that gender of an unknown person is a 50\/50 proposition. You strike up a conversation with someone who says \"yeah, I've got two kids....\" and you know that there's a 50\/50 chance as to the gender of each kid. The person continuing \"... and that's my daughter on the swing\" has [...]","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts\/1090"}],"collection":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/comments?post=1090"}],"version-history":[{"count":0,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/posts\/1090\/revisions"}],"wp:attachment":[{"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/media?parent=1090"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/categories?post=1090"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/regex.info\/blog\/wp-json\/wp\/v2\/tags?post=1090"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}