{"id":964,"date":"2023-03-24T18:22:25","date_gmt":"2023-03-24T18:22:25","guid":{"rendered":"https:\/\/floydsplace.us\/wpress\/?p=964"},"modified":"2023-03-27T16:30:34","modified_gmt":"2023-03-27T16:30:34","slug":"coin-flipping-statistics-probability","status":"publish","type":"post","link":"https:\/\/floydsplace.us\/wpress\/2023\/03\/24\/coin-flipping-statistics-probability\/","title":{"rendered":"Coin-flipping Statistics: Probability"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>I started to write a post that incorporated some aspects of basic statistics and it quickly blew up out of control. So, I&#8217;ve decided to break it up into a few smaller posts. This one is focused on calculating the probability of a simple outcome. <\/p>\n\n\n\n<p>If two events are independent of each other, we can multiply the probabilities together. If you fix eggs for breakfast 2\/3rds of mornings and it rains later in the day 1\/4th of the time and whether you fixed eggs or not and it rains or not has no influence on each other (e.g., feeling like it might rain doesn&#8217;t cause you to be more or less likely to cook eggs) then we can calculate the probability of both occurring on a given day by multiplying the probabilities together. <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-340111697d63a26bb933151d2a7ba611_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#50;&#47;&#51;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#49;&#47;&#52;&#32;&#61;&#32;&#50;&#47;&#49;&#50;&#32;&#61;&#32;&#49;&#47;&#54;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"185\" style=\"vertical-align: -5px;\"\/> or about 17% of the time (1\/4th of the 2\/3rds). So, on average, a little more than one day a week, it will rain and you cooked eggs for breakfast. (Given some data we could also test if these indeed appear to be independent of each other or not by deviations from 1\/6.) <\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"613\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/eggs-and-rain-1024x613.jpg\" alt=\"\" class=\"wp-image-978\" srcset=\"https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/eggs-and-rain-1024x613.jpg 1024w, https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/eggs-and-rain-300x180.jpg 300w, https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/eggs-and-rain-768x460.jpg 768w, https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/eggs-and-rain-1536x919.jpg 1536w, https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/eggs-and-rain.jpg 1840w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><figcaption class=\"wp-element-caption\">If events are independent, you can multiply the probabilities that they do or do not occur together. If you fix eggs for breakfast 2\/3 of the time and it rains 1\/4 of the time, then 1\/4 of the 2\/3 of the total it rains and you fixed eggs. Other possible combinations can be calculated in the same way.<\/figcaption><\/figure>\n\n\n\n<p>Since all outcomes have to, by definition, add up to 100%, we can also calculate the probability that you did not (fix eggs for breakfast and it rained) by subtracting from one. <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-fcba2abdf64c7cc224380856ee64779c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#49;&#32;&#45;&#32;&#49;&#47;&#54;&#32;&#61;&#32;&#53;&#47;&#54;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"107\" style=\"vertical-align: -5px;\"\/> or about 83% of the time. I placed these in parentheses to indicate that both did not happen together\u2014English can imply different meanings like you did not fix eggs and it did rain, which would be <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-a75c579a2fa015269debe3375e169972_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#49;&#47;&#51;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#49;&#47;&#52;&#32;&#61;&#32;&#49;&#47;&#49;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"132\" style=\"vertical-align: -5px;\"\/> or about 8.3% of the time or that you did not fix eggs and it didn&#8217;t rain, which is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-607f574b493440c4ff42597d798c9e1f_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#49;&#47;&#51;&#92;&#116;&#105;&#109;&#101;&#115;&#51;&#47;&#52;&#32;&#61;&#51;&#47;&#49;&#50;&#61;&#49;&#47;&#52;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"184\" style=\"vertical-align: -5px;\"\/> or 25%\u2014you have to be careful about details when converting language statements into mathematical calculations, but it is possible and rather than being seen as a hindrance can actually help to understand math and language. <\/p>\n\n\n\n<p>We expect the outcome of different dice rolls or coin flips to be independent of each other (the first coin flip does not influence the outcome of the second coin flip, whether the coin is fair or biased), so we can multiply their probabilities together. The probability of getting &#8220;heads&#8221; or &#8220;tails&#8221; from a fair coin flip is 1\/2. If we got heads three times in a row (h,h,h) the probability of this is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-03392d9666749d85cd867b1a3cf778cb_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#49;&#47;&#50;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#49;&#47;&#50;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#49;&#47;&#50;&#32;&#61;&#32;&#49;&#47;&#56;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"173\" style=\"vertical-align: -5px;\"\/> or 12.5%. 1\/8 is the likelihood of hhh given that the coin is fair. If the coin were double-sided h\/h then the likelihood of hhh is one, 100%. <\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1022\" height=\"1024\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/1196px-Stahlberg_flipping_coin2-1022x1024.jpg\" alt=\"\" class=\"wp-image-985\" srcset=\"https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/1196px-Stahlberg_flipping_coin2-1022x1024.jpg 1022w, https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/1196px-Stahlberg_flipping_coin2-300x300.jpg 300w, https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/1196px-Stahlberg_flipping_coin2-150x150.jpg 150w, https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/1196px-Stahlberg_flipping_coin2-768x769.jpg 768w, https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/1196px-Stahlberg_flipping_coin2.jpg 1196w\" sizes=\"auto, (max-width: 1022px) 100vw, 1022px\" \/><figcaption class=\"wp-element-caption\">A drawing of flipping a coin to make a decision, from Pieti\u00e4inen (1918) <em>Tasavallan Presidentit<\/em>. <\/figcaption><\/figure>\n\n\n\n<p>The slightly trickier part is calculating the probability when there is a mix of outcomes. Often we don&#8217;t care about the order, so Thh, hTh, and hhT are all two heads and one tail. (I am using a capital T for tails to help visualize it, so it doesn&#8217;t get lost as easily in the hs; <a href=\"https:\/\/floydsplace.us\/wpress\/2023\/03\/03\/capital-controversy\/\">this is not meant to imply that I respect the tails side of the coin more than the heads side<\/a>.) Each of these individual outcomes has a 1\/8 probability of occurring. However, since there are three mutually exclusive ways to get two heads and one tail we add the three individual probabilities together, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-332eef5d8c1a0044f27cf7626daa674c_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#49;&#47;&#56;&#32;&#43;&#32;&#49;&#47;&#56;&#32;&#43;&#32;&#49;&#47;&#56;&#32;&#61;&#32;&#51;&#47;&#56;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"173\" style=\"vertical-align: -5px;\"\/> or about a 37.5% probability of this outcome. The likelihood of two heads and one tail, given that the probability of h is 1\/2 and the probability of t is 1\/2 (both add up to one) is 3\/8. In statistics, the vertical bar symbol &#8220;|&#8221; is used to indicate &#8220;given&#8221;, so we can write <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-d56701618782c2cab49aa04d086bed8d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#68;&#124;&#72;&#41;&#32;&#61;&#32;&#51;&#47;&#56;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"115\" style=\"vertical-align: -5px;\"\/>. This is the probability (<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-4796bb96457712128f0312b45f77e52a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"14\" style=\"vertical-align: 0px;\"\/>) of the data (<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-972604849c2d059c72539fdda0b2ee26_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#68;&#32;&#61;&#32;&#104;&#104;&#84;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"72\" style=\"vertical-align: 0px;\"\/> in any order) given (|) the hypothesis (<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-ade4bf1502507d3baab7ec5e5b2ecdcf_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#72;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"16\" style=\"vertical-align: 0px;\"\/>) that the coin is fair. Under our hypothesis, the probability of heads is 1\/2, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-7a3a8210ef2af6afa574bf91a7d65f5b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#104;&#41;&#32;&#61;&#32;&#49;&#47;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"87\" style=\"vertical-align: -5px;\"\/>. This particular probability, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-9d607ec60f1feea3d6db20c97925cbe8_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#68;&#124;&#72;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"63\" style=\"vertical-align: -5px;\"\/>, is known as the likelihood (of the data given the hypothesis).<\/p>\n\n\n\n<p>There are two directions to go in here. One is looking at the likelihoods under different probabilities, e.g., <em>P<\/em>(<em>H<\/em>) = 1\/3 or 1\/10. Another, which I will do first, is to look some more at the combinations of different outcomes.  <\/p>\n\n\n\n<p>When we are looking at a small number of outcomes, it is easy to write down the probabilities. What are all of the probabilities from two coin flips? hh, hT, Th, and TT. All of these individual outcomes have a probability of <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-1d028a95d841dbcbfb70befbfce4e10a_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#49;&#47;&#50;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#49;&#47;&#50;&#32;&#61;&#32;&#49;&#47;&#52;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"124\" style=\"vertical-align: -5px;\"\/>. However, getting one heads and one tails in either order, hT or Th, is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-fbe6e8dd6057a8438fb36d0e71536f46_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#49;&#47;&#52;&#32;&#43;&#32;&#49;&#47;&#52;&#32;&#61;&#32;&#49;&#47;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"123\" style=\"vertical-align: -5px;\"\/>. So getting an hT is twice as likely as hh. There are more ways to get a mix of outcomes, so we see a mix of outcomes more often. This is a simple statement, but it has a very deep meaning. <\/p>\n\n\n\n<p>Let&#8217;s go to four coin flips. There is only one way to get hhhh, the probability is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-673ff9a996f22a7468855bad5d8c57d4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#61;&#40;&#49;&#47;&#50;&#41;&#94;&#52;&#61;&#49;&#47;&#49;&#54;\" title=\"Rendered by QuickLaTeX.com\" height=\"20\" width=\"145\" style=\"vertical-align: -5px;\"\/>. There are four ways to get three heads and one tail, hhhT, hhTh, hThh, Thhh, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-0d269cfcdcfd13ed90c8910d9a4deb5e_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#61;&#32;&#52;&#47;&#49;&#54;&#32;&#61;&#32;&#49;&#47;&#52;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"124\" style=\"vertical-align: -5px;\"\/>. How many ways are there to get two heads and two tails? hhTT, hThT, ThhT, TThh, ThTh, and hTTh, so 6, with a probability of 6\/16 = 3\/8. This is starting to get tricky. As the combinations get larger, it is harder to keep track, and we are more likely to make a mistake when writing them down. How many ways are there to get four tails and three heads with seven coin flips? I won&#8217;t even try to write it out. <\/p>\n\n\n\n<p>There are two ways to do this. We can calculate the combinations directly using the equation for a binomial coefficient or we can look it up in Pascal&#8217;s triangle. I&#8217;m going to hold off on Pascal&#8217;s triangle because it connects to a lot of cool ideas and is worth its own blog post. The binomial coefficient is written as <\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-e9f0f77297e4b7602c1dad43d695d548_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#123;&#110;&#32;&#92;&#99;&#104;&#111;&#111;&#115;&#101;&#32;&#104;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#110;&#33;&#125;&#123;&#104;&#33;&#84;&#33;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"24\" width=\"74\" style=\"vertical-align: -7px;\"\/><\/p>\n\n\n\n<p>(where <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-5d19cfe200b5c904f1a06a4c7609e792_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#110;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"11\" style=\"vertical-align: 0px;\"\/> is the total number of coin flips, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-ff64e2620257e50c28c495fcd28035b4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"10\" style=\"vertical-align: 0px;\"\/> number that come out heads and <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-c70f5a0f255e58ea4a2e2f390469cc67_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#84;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"13\" style=\"vertical-align: 0px;\"\/> is the number that come out Ts) and uses factorials (!, multiplying the integers together down to one, or two because multiplying by one has no effect). This almost looks like <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-5d19cfe200b5c904f1a06a4c7609e792_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#110;\" title=\"Rendered by QuickLaTeX.com\" height=\"8\" width=\"11\" style=\"vertical-align: 0px;\"\/> divided by <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-ff64e2620257e50c28c495fcd28035b4_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#104;\" title=\"Rendered by QuickLaTeX.com\" height=\"12\" width=\"10\" style=\"vertical-align: 0px;\"\/>  with the dividing bar missing (<img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-b1981d4eaf7616d134c421f31d065873_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#123;&#110;&#32;&#92;&#99;&#104;&#111;&#111;&#115;&#101;&#32;&#104;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"22\" width=\"20\" style=\"vertical-align: -7px;\"\/> versus <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-89756429d38358d4d25a97f26738d758_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#92;&#108;&#101;&#102;&#116;&#40;&#92;&#102;&#114;&#97;&#99;&#123;&#110;&#125;&#123;&#104;&#125;&#92;&#114;&#105;&#103;&#104;&#116;&#41;\" title=\"Rendered by QuickLaTeX.com\" height=\"22\" width=\"24\" style=\"vertical-align: -7px;\"\/>), but it is not and is a form of writing this down that is reserved specifically for the binomial coefficient. <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-b1981d4eaf7616d134c421f31d065873_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#123;&#110;&#32;&#92;&#99;&#104;&#111;&#111;&#115;&#101;&#32;&#104;&#125;\" title=\"Rendered by QuickLaTeX.com\" height=\"22\" width=\"20\" style=\"vertical-align: -7px;\"\/> is read as &#8220;<em>n<\/em> choose <em>h<\/em>&#8220;. It is essentially a bookkeeping equation that keeps track of all the possible ways to divide up the outcomes. This is built into a lot of calculators and programming languages. We can even write &#8220;7 choose 3&#8221; into the Google search bar and get an answer of 35. There are 35 orders of getting three hs and four Ts in seven coin flips, ThhTThT for example. Plugging this into our equation<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-d30e464e7df667bec901496426f18225_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#123;&#55;&#32;&#92;&#99;&#104;&#111;&#111;&#115;&#101;&#32;&#51;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#55;&#33;&#125;&#123;&#51;&#33;&#52;&#33;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#55;&#92;&#116;&#105;&#109;&#101;&#115;&#54;&#92;&#116;&#105;&#109;&#101;&#115;&#53;&#92;&#116;&#105;&#109;&#101;&#115;&#52;&#92;&#116;&#105;&#109;&#101;&#115;&#51;&#92;&#116;&#105;&#109;&#101;&#115;&#50;&#125;&#123;&#51;&#92;&#116;&#105;&#109;&#101;&#115;&#50;&#92;&#116;&#105;&#109;&#101;&#115;&#52;&#92;&#116;&#105;&#109;&#101;&#115;&#51;&#92;&#116;&#105;&#109;&#101;&#115;&#50;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#55;&#92;&#116;&#105;&#109;&#101;&#115;&#54;&#92;&#116;&#105;&#109;&#101;&#115;&#53;&#125;&#123;&#51;&#92;&#116;&#105;&#109;&#101;&#115;&#50;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#50;&#49;&#48;&#125;&#123;&#54;&#125;&#32;&#61;&#32;&#51;&#53;\" title=\"Rendered by QuickLaTeX.com\" height=\"24\" width=\"351\" style=\"vertical-align: -7px;\"\/><\/p>\n\n\n\n<p>So, there are 35 ways to flip a coin seven times and get heads three times (and tails four times). We still need to calculate the probability of an individual outcome, <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-70308834da6f764d5a86f388d0781b4d_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#40;&#49;&#47;&#50;&#41;&#94;&#55;\" title=\"Rendered by QuickLaTeX.com\" height=\"20\" width=\"47\" style=\"vertical-align: -5px;\"\/>, and add the different possible orders to get it by multiplying by 35. The likelihood of this outcome is <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-6783ebd37ef6f5cee6aef54467527b87_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#51;&#53;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#40;&#49;&#47;&#50;&#41;&#94;&#55;&#32;&#92;&#97;&#112;&#112;&#114;&#111;&#120;&#32;&#48;&#46;&#50;&#55;&#51;\" title=\"Rendered by QuickLaTeX.com\" height=\"20\" width=\"152\" style=\"vertical-align: -5px;\"\/> or 27.3%. <\/p>\n\n\n\n<p>By the way, you might ask why it is <em>n<\/em> choose <em>h<\/em> instead of <em>n<\/em> choose <em>T<\/em>. It is arbitrary and doesn&#8217;t matter. You can write it down both ways and still get the same answer. <\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-e2b16c391cceb71262786f8d27da4876_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#123;&#55;&#32;&#92;&#99;&#104;&#111;&#111;&#115;&#101;&#32;&#51;&#125;&#32;&#61;&#32;&#123;&#55;&#32;&#92;&#99;&#104;&#111;&#111;&#115;&#101;&#32;&#52;&#125;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#55;&#33;&#125;&#123;&#51;&#33;&#52;&#33;&#125;&#32;&#61;&#32;&#51;&#53;\" title=\"Rendered by QuickLaTeX.com\" height=\"24\" width=\"157\" style=\"vertical-align: -7px;\"\/><\/p>\n\n\n\n<p>I can&#8217;t resist pointing out that there is also a connection between the behavior of the binomial coefficient as the number of coin flips gets larger and the normal or Gaussian distribution, also known as the bell curve. However, to really talk about this will be a separate post. One cool thing about mathematics, and many fields when you get deep enough into it, is that different ideas start to connect to each other, sometimes in surprising ways, that give you a deeper understanding of the processes involved.<\/p>\n\n\n\n<p>The general likelihood equation we are using is<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-925ff4a5e7583b3e8350bcb3bdfed83b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#68;&#124;&#72;&#41;&#32;&#61;&#32;&#123;&#110;&#32;&#92;&#99;&#104;&#111;&#111;&#115;&#101;&#32;&#104;&#125;&#32;&#80;&#40;&#104;&#41;&#94;&#104;&#32;&#80;&#40;&#84;&#41;&#94;&#84;\" title=\"Rendered by QuickLaTeX.com\" height=\"22\" width=\"209\" style=\"vertical-align: -7px;\"\/>.<\/p>\n\n\n\n<figure class=\"wp-block-image aligncenter size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"880\" height=\"1024\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/Wurfelschauer-880x1024.jpg\" alt=\"\" class=\"wp-image-984\" srcset=\"https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/Wurfelschauer-880x1024.jpg 880w, https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/Wurfelschauer-258x300.jpg 258w, https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/Wurfelschauer-768x894.jpg 768w, https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/Wurfelschauer.jpg 1030w\" sizes=\"auto, (max-width: 880px) 100vw, 880px\" \/><figcaption class=\"wp-element-caption\">Falling dice, Rhetos (2021)<\/figcaption><\/figure>\n\n\n\n<p>In the case of fair coin flips <img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-eba236e6a9528e159705940582ef610b_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#80;&#40;&#104;&#41;&#61;&#80;&#40;&#84;&#41;&#61;&#49;&#47;&#50;\" title=\"Rendered by QuickLaTeX.com\" height=\"19\" width=\"152\" style=\"vertical-align: -5px;\"\/>, but this also works in cases that are unequal. The probability of a &#8220;one&#8221; coming up when rolling a die is 1\/6. The probability it is not one is 5\/6. If we roll a die seven times (or seven dice once) the probability of three ones and four &#8220;not ones&#8221; is<\/p>\n\n\n\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/floydsplace.us\/wpress\/wp-content\/ql-cache\/quicklatex.com-84de4eb1635ff350538abdfc8cf59a43_l3.png\" class=\"ql-img-inline-formula quicklatex-auto-format\" alt=\"&#123;&#55;&#32;&#92;&#99;&#104;&#111;&#111;&#115;&#101;&#32;&#51;&#125;&#32;&#40;&#49;&#47;&#54;&#41;&#94;&#51;&#32;&#40;&#53;&#47;&#54;&#41;&#94;&#52;&#32;&#61;&#32;&#51;&#53;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#49;&#47;&#50;&#49;&#54;&#32;&#92;&#116;&#105;&#109;&#101;&#115;&#32;&#54;&#50;&#53;&#47;&#49;&#50;&#57;&#54;&#32;&#61;&#32;&#92;&#102;&#114;&#97;&#99;&#123;&#50;&#49;&#44;&#56;&#55;&#53;&#125;&#123;&#50;&#55;&#57;&#44;&#57;&#51;&#54;&#125;&#92;&#97;&#112;&#112;&#114;&#111;&#120;&#48;&#46;&#48;&#55;&#56;\" title=\"Rendered by QuickLaTeX.com\" height=\"26\" width=\"454\" style=\"vertical-align: -9px;\"\/>.<\/p>\n\n\n\n<p>So, to wrap this part up, you can multiply and add probabilities together to calculate the likelihood of a particular outcome (in this case flipping coins or rolling dice) when there are two possible outcomes of each event (heads or tails, or fixing eggs for breakfast or not). (More than two outcomes is not that different but will be a separate post.) You can also double-check the calculations to see that the sum of all possible outcomes adds up to 1 or 100%. <\/p>\n\n\n\n<p>The way to really see this and understand the probabilities is to, rather than only passively reading about examples, make up a simple question, draw it out on a piece of paper, and go through the calculation yourself a couple of times to get comfortable with multiplying and adding probabilities together. <\/p>\n\n\n\n<p>Links<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A discussion of the derivation of the binomial coefficient, which I did not go into here but came across and am sharing if you are interested, <a href=\"https:\/\/math.stackexchange.com\/questions\/119480\/derivation-of-binomial-coefficient-in-binomial-theorem\">https:\/\/math.stackexchange.com\/questions\/119480\/derivation-of-binomial-coefficient-in-binomial-theorem<\/a><\/li>\n<\/ul>\n\n\n\n<p>Media<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Coin flipping image from Pieti\u00e4inen (1918) <em>Tasavallan Presidentit<\/em>, <a href=\"https:\/\/commons.wikimedia.org\/wiki\/File:St%C3%A5hlberg_flipping_coin2.jpg\">https:\/\/commons.wikimedia.org\/wiki\/File:St%C3%A5hlberg_flipping_coin2.jpg<\/a><\/li>\n\n\n\n<li>Dice image, Rhetos (2021), <a href=\"https:\/\/commons.wikimedia.org\/wiki\/File:W%C3%BCrfelschauer.jpg\">https:\/\/commons.wikimedia.org\/wiki\/File:W%C3%BCrfelschauer.jpg<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>I started to write a post that incorporated some aspects of basic statistics and it quickly blew up out of control. So, I&#8217;ve decided to break it up into a few smaller posts. This one is focused on calculating the probability of a simple outcome. If two events are independent of each other, we can [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":986,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"cybocfi_hide_featured_image":"yes","footnotes":""},"categories":[56],"tags":[57],"class_list":["post-964","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-math","tag-statistics"],"jetpack_featured_media_url":"https:\/\/floydsplace.us\/wpress\/wp-content\/uploads\/2023\/03\/coin-flip-detail.jpg","views":"","_links":{"self":[{"href":"https:\/\/floydsplace.us\/wpress\/wp-json\/wp\/v2\/posts\/964","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/floydsplace.us\/wpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/floydsplace.us\/wpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/floydsplace.us\/wpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/floydsplace.us\/wpress\/wp-json\/wp\/v2\/comments?post=964"}],"version-history":[{"count":41,"href":"https:\/\/floydsplace.us\/wpress\/wp-json\/wp\/v2\/posts\/964\/revisions"}],"predecessor-version":[{"id":1023,"href":"https:\/\/floydsplace.us\/wpress\/wp-json\/wp\/v2\/posts\/964\/revisions\/1023"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/floydsplace.us\/wpress\/wp-json\/wp\/v2\/media\/986"}],"wp:attachment":[{"href":"https:\/\/floydsplace.us\/wpress\/wp-json\/wp\/v2\/media?parent=964"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/floydsplace.us\/wpress\/wp-json\/wp\/v2\/categories?post=964"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/floydsplace.us\/wpress\/wp-json\/wp\/v2\/tags?post=964"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}