<?xml version="1.0" encoding="UTF-8" standalone="yes"?><oembed><version><![CDATA[1.0]]></version><provider_name><![CDATA[Azimuth]]></provider_name><provider_url><![CDATA[https://johncarlosbaez.wordpress.com]]></provider_url><author_name><![CDATA[John Baez]]></author_name><author_url><![CDATA[https://johncarlosbaez.wordpress.com/author/johncarlosbaez/]]></author_url><title><![CDATA[Game Theory (Part&nbsp;9)]]></title><type><![CDATA[link]]></type><html><![CDATA[<p><a href="https://johncarlosbaez.wordpress.com/2013/01/28/game-theory-part-8/">Last time</a> we talked about independence of a <i>pair</i> of events, but we can easily go on and talk about independence of a longer sequence of events.  For example, suppose we have three coins.   Suppose:</p>
<p>&bull; the 1st coin has probability <img src='https://s0.wp.com/latex.php?latex=p_H&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='p_H' title='p_H' class='latex' /> of landing heads up and <img src='https://s0.wp.com/latex.php?latex=p_T&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='p_T' title='p_T' class='latex' /> of landing tails up;<br />
&bull; the 2nd coin has probability <img src='https://s0.wp.com/latex.php?latex=q_H&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='q_H' title='q_H' class='latex' /> of landing heads up and <img src='https://s0.wp.com/latex.php?latex=q_T&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='q_T' title='q_T' class='latex' /> of landing tails up;<br />
&bull; the 3rd coin has probability <img src='https://s0.wp.com/latex.php?latex=r_H&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='r_H' title='r_H' class='latex' /> of landing heads up and <img src='https://s0.wp.com/latex.php?latex=r_T&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='r_T' title='r_T' class='latex' /> of landing tails up. </p>
<p>Suppose we flip all of these coins: the 1st, then the 2nd, then the 3rd.  What&#8217;s the probability that we get this sequence of results:</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%28H%2C+T%2C+T%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='(H, T, T)' title='(H, T, T)' class='latex' />
</div>
<p>If the coin flips are <i>independent</i>, the probability is just this product:</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=p_H+%5C%2C+q_T+%5C%2C+r_T+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='p_H &#92;, q_T &#92;, r_T ' title='p_H &#92;, q_T &#92;, r_T ' class='latex' />
</div>
<p>See the pattern?  We just multiply the probabilities.  And there&#8217;s nothing special about <i>coins</i> here, or the number <i>three</i>. We could flip a coin, roll a die, pick a card, and see if it&#8217;s raining outside.  </p>
<p>For example, what&#8217;s the probability that we get heads with our coin, the number 6 on our die, an ace of spades with our cards, and it&#8217;s raining?  <i>If these events are independent</i>, we just calculate:</p>
<p>the probability that we get heads, times<br />
the probability that we roll a 6, times<br />
the probability that we get an ace of spades, times<br />
the probability that it&#8217;s raining outside.</p>
<p>Let&#8217;s solve some puzzles using this idea!</p>
<div align="center"><a href="http://blog.boyet.com/blog/blog/unbiased-tosses-from-a-biased-coin/"><img src="https://i2.wp.com/s3.amazonaws.com/boyetblog/Blog%20images/CoinToss.jpg" /></a></div>
<h3> Three flips of a fair coin </h3>
<p><b>Example 1.</b>   Suppose you have a <b>fair</b> coin: this means it has a 50% chance of landing heads up and a 50% chance of landing tails up.  Suppose you flip it three times and these flips are independent.  What is the probability that it lands heads up, then tails up, then heads up?</p>
<p>We&#8217;re asking about the probability of this event:</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%28H%2C+T%2C+H%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='(H, T, H)' title='(H, T, H)' class='latex' />
</div>
<p>Since the flips are independent this is</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=p_%7B%28H%2CT%2CH%29%7D+%3D+p_H+%5C%2C+p_T+%5C%2C+p_H+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='p_{(H,T,H)} = p_H &#92;, p_T &#92;, p_H ' title='p_{(H,T,H)} = p_H &#92;, p_T &#92;, p_H ' class='latex' />
</div>
<p>Since the coin is fair we have</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+p_H+%3D+p_T+%3D+%5Cfrac%7B1%7D%7B2%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ p_H = p_T = &#92;frac{1}{2} } ' title='&#92;displaystyle{ p_H = p_T = &#92;frac{1}{2} } ' class='latex' />
</div>
<p>so </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+p_H+p_T+p_H+%3D+%5Cfrac%7B1%7D%7B2%7D+%5Ctimes+%5Cfrac%7B1%7D%7B2%7D+%5Ctimes+%5Cfrac%7B1%7D%7B2%7D+%3D+%5Cfrac%7B1%7D%7B8%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ p_H p_T p_H = &#92;frac{1}{2} &#92;times &#92;frac{1}{2} &#92;times &#92;frac{1}{2} = &#92;frac{1}{8} } ' title='&#92;displaystyle{ p_H p_T p_H = &#92;frac{1}{2} &#92;times &#92;frac{1}{2} &#92;times &#92;frac{1}{2} = &#92;frac{1}{8} } ' class='latex' />
</div>
<p>So the answer is 1/8, or 12.5%.</p>
<p><b>Example 2.</b>  In the same situation, what&#8217;s the probability that the coin lands heads up exactly twice?</p>
<p>There are 2 &times; 2 &times; 2 = 8 events that can happen:</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%28H%2CH%2CH%29+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='(H,H,H) ' title='(H,H,H) ' class='latex' /><br />
<img src='https://s0.wp.com/latex.php?latex=%28H%2CH%2CT%29%2C+%5C%3B+%28H%2CT%2CH%29%2C+%5C%3B+%28T%2CH%2CH%29+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='(H,H,T), &#92;; (H,T,H), &#92;; (T,H,H) ' title='(H,H,T), &#92;; (H,T,H), &#92;; (T,H,H) ' class='latex' /><br />
<img src='https://s0.wp.com/latex.php?latex=%28H%2CT%2CT%29%2C+%5C%3B+%28T%2CH%2CT%29%2C+%5C%3B+%28T%2CT%2CH%29+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='(H,T,T), &#92;; (T,H,T), &#92;; (T,T,H) ' title='(H,T,T), &#92;; (T,H,T), &#92;; (T,T,H) ' class='latex' /><br />
<img src='https://s0.wp.com/latex.php?latex=%28T%2CT%2CT%29+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='(T,T,T) ' title='(T,T,T) ' class='latex' />
</div>
<p>We can work out the probability of each of these events.  For example, we&#8217;ve already seen that <img src='https://s0.wp.com/latex.php?latex=%28H%2CT%2CH%29&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='(H,T,H)' title='(H,T,H)' class='latex' /> is</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+p_%7B%28H%2CT%2CH%29%7D+%3D+p_H+p_T+p_H+%3D+%5Cfrac%7B1%7D%7B8%7D+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ p_{(H,T,H)} = p_H p_T p_H = &#92;frac{1}{8} }' title='&#92;displaystyle{ p_{(H,T,H)} = p_H p_T p_H = &#92;frac{1}{8} }' class='latex' />
</div>
<p>since the coin is fair and the flips are independent.  In fact, all 8 probabilities work out the same way.  We always get 1/8.  In other words, each of the 8 events is equally likely!  </p>
<p>But we&#8217;re interested in the probability that we get exactly two heads.  That&#8217;s the probability of this subset:</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=S+%3D+%5C%7B+%28T%2CH%2CH%29%2C+%28H%2CT%2CH%29%2C+%28H%2CH%2CT%29+%5C%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='S = &#92;{ (T,H,H), (H,T,H), (H,H,T) &#92;} ' title='S = &#92;{ (T,H,H), (H,T,H), (H,H,T) &#92;} ' class='latex' />
</div>
<p>Using the rule we saw in <a href="https://johncarlosbaez.wordpress.com/2013/01/26/game-theory-part-7/">Part 7</a>, this probability is</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+p%28S%29+%3D+p_%7B%28T%2CH%2CH%29%7D+%2B+p_%7B%28H%2CT%2CH%29%7D+%2B+p_%7B%28H%2CH%2CT%29%7D+%3D+3+%5Ctimes+%5Cfrac%7B1%7D%7B8%7D+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ p(S) = p_{(T,H,H)} + p_{(H,T,H)} + p_{(H,H,T)} = 3 &#92;times &#92;frac{1}{8} }' title='&#92;displaystyle{ p(S) = p_{(T,H,H)} + p_{(H,T,H)} + p_{(H,H,T)} = 3 &#92;times &#92;frac{1}{8} }' class='latex' />
</div>
<p>So the answer is 3/8, or 37.5%.  </p>
<p>I could have done this a lot faster.  I could say &#8220;there are 8 events that can happen, each equally likely, and three that give us two heads, so the probability is 3/8.&#8221;   But I wanted to show you how we&#8217;re just following rules we&#8217;ve already seen! </p>
<h3> Three flips of a very unfair coin </h3>
<p><b>Example 3.</b>  Now suppose we have an unfair coin with a 90% chance of landing heads up and 10% chance of landing tails up!  What&#8217;s the probability that if we flip it three times, it lands heads up exactly twice?  Again let&#8217;s assume the coin flips are independent.</p>
<p>Most of the calculation works exactly the same way, but now our coin has</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+p_H+%3D+0.9%2C+%5Cquad+p_T+%3D+0.1+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ p_H = 0.9, &#92;quad p_T = 0.1 } ' title='&#92;displaystyle{ p_H = 0.9, &#92;quad p_T = 0.1 } ' class='latex' />
</div>
<p>We&#8217;re interested in the events where the coin comes up heads twice, so we look at this subset:</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=S+%3D+%5C%7B+%28T%2CH%2CH%29%2C+%28H%2CT%2CH%29%2C+%28H%2CH%2CT%29+%5C%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='S = &#92;{ (T,H,H), (H,T,H), (H,H,T) &#92;} ' title='S = &#92;{ (T,H,H), (H,T,H), (H,H,T) &#92;} ' class='latex' />
</div>
<p>The probability of this subset is</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cbegin%7Barray%7D%7Bccl%7D+p%28S%29+%26%3D%26+p_%7B%28T%2CH%2CH%29%7D+%2B+p_%7B%28H%2CT%2CH%29%7D+%2B+p_%7B%28H%2CH%2CT%29%7D+%5C%5C++%26%3D%26+p_T+%5C%2C+p_H++%5C%2C+p_H+%2B+p_H+%5C%2C+p_T+%5C%2C+p_H+%2B+p_H+%5C%2C+p_H+%5C%2C+p_T+%5C%5C+%26%3D%26+3+p_T+p_H%5E2+%5C%5C+%26%3D%26+3+%5Ctimes+0.1+%5Ctimes+0.9%5E2+%5C%5C+%26%3D%26+0.3+%5Ctimes+0.81+%5C%5C+%26%3D%26+0.243+%5Cend%7Barray%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;begin{array}{ccl} p(S) &amp;=&amp; p_{(T,H,H)} + p_{(H,T,H)} + p_{(H,H,T)} &#92;&#92;  &amp;=&amp; p_T &#92;, p_H  &#92;, p_H + p_H &#92;, p_T &#92;, p_H + p_H &#92;, p_H &#92;, p_T &#92;&#92; &amp;=&amp; 3 p_T p_H^2 &#92;&#92; &amp;=&amp; 3 &#92;times 0.1 &#92;times 0.9^2 &#92;&#92; &amp;=&amp; 0.3 &#92;times 0.81 &#92;&#92; &amp;=&amp; 0.243 &#92;end{array}' title='&#92;begin{array}{ccl} p(S) &amp;=&amp; p_{(T,H,H)} + p_{(H,T,H)} + p_{(H,H,T)} &#92;&#92;  &amp;=&amp; p_T &#92;, p_H  &#92;, p_H + p_H &#92;, p_T &#92;, p_H + p_H &#92;, p_H &#92;, p_T &#92;&#92; &amp;=&amp; 3 p_T p_H^2 &#92;&#92; &amp;=&amp; 3 &#92;times 0.1 &#92;times 0.9^2 &#92;&#92; &amp;=&amp; 0.3 &#92;times 0.81 &#92;&#92; &amp;=&amp; 0.243 &#92;end{array}' class='latex' />
</div>
<p>So now the probability is just 24.3%.  </p>
<h3> Six flips of a fair coin </h3>
<p><b>Example 4.</b>  Suppose you have a fair coin.  Suppose you flip it six times and these flips are independent.  What is the probability that it lands heads up exactly twice?</p>
<p>We did a similar problem already, where we flipped the coin three times.  Go back and look at that if you forget!  The answer to <i>that</i> problem was </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+3+%5Ctimes+%5Cfrac%7B1%7D%7B8%7D+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ 3 &#92;times &#92;frac{1}{8} }' title='&#92;displaystyle{ 3 &#92;times &#92;frac{1}{8} }' class='latex' />
</div>
<p>Why?  Here&#8217;s why: there were 3 ways to get two heads when you flipped 3 coins, and each of these events had probability</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cleft%28%5Cfrac%7B1%7D%7B2%7D%5Cright%29%5E3+%3D+%5Cfrac%7B1%7D%7B8%7D+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;left(&#92;frac{1}{2}&#92;right)^3 = &#92;frac{1}{8} }' title='&#92;displaystyle{ &#92;left(&#92;frac{1}{2}&#92;right)^3 = &#92;frac{1}{8} }' class='latex' />
</div>
<p>We can do our new problem the same way.  Count the number of ways to get two heads when we flip six coins.  Then multiply this by</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cleft%28%5Cfrac%7B1%7D%7B2%7D%5Cright%29%5E6+%3D+%5Cfrac%7B1%7D%7B64%7D+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;left(&#92;frac{1}{2}&#92;right)^6 = &#92;frac{1}{64} }' title='&#92;displaystyle{ &#92;left(&#92;frac{1}{2}&#92;right)^6 = &#92;frac{1}{64} }' class='latex' />
</div>
<p>The hard part is to count how many ways we can get two heads when we flip six coins.  To get good at probabilities, we have to get good at counting.  It&#8217;s boring to list all the events we&#8217;re trying to count:</p>
<div align="center">
(H,H,T,T,T,T), (H,T,H,T,T,T), (H,T,T,H,T,T), &#8230;
</div>
<p>So let&#8217;s try to come up with a better idea.  </p>
<p>We have to pick 2 out of our 6 flips to be H&#8217;s.  How many ways are there to do this?   </p>
<p>There are 6 ways to pick <i>one</i> of the flips and draw a <font color="red">red H</font> on it, and then 5 ways left over to pick <i>another</i> and draw a <font color="blue">blue H</font> on it&#8230; letting the rest be T&#8217;s.  For example:</p>
<div align="center">
(T, <font color="blue">H</font>, T, T, <font color="red">H</font>, T)
</div>
<p>So, we&#8217;ve got 6 &times; 5 = 30 choices.  But we don&#8217;t really care which H is red and which H is blue&mdash;that&#8217;s just a trick to help us solve the problem.  For example, we don&#8217;t want to count </p>
<div align="center">
(T, <font color="blue">H</font>, T, T, <font color="red">H</font>, T)
</div>
<p>as different from </p>
<div align="center">
(T, <font color="red">H</font>, T, T, <font color="blue">H</font>, T)
</div>
<p>So, there aren&#8217;t really 30 ways to get two heads.  There are only half as many!  There are 15 ways.</p>
<p>So, the probability of getting two heads when we flip the coin six times is </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+15+%5Ctimes+%5Cfrac%7B1%7D%7B64%7D+%3D+%5Cfrac%7B15%7D%7B64%7D+%5Capprox+.234+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ 15 &#92;times &#92;frac{1}{64} = &#92;frac{15}{64} &#92;approx .234 } ' title='&#92;displaystyle{ 15 &#92;times &#92;frac{1}{64} = &#92;frac{15}{64} &#92;approx .234 } ' class='latex' />
</div>
<p>where the squiggle means &#8216;approximately&#8217;.  So: about 23.4%.</p>
<h3> Binomial coefficients </h3>
<p>Now for some jargon, which will help when we do harder problems like this.  We say there are <b>6 choose 2</b> ways to choose 2 out of 6 things, and we write this as</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cbinom%7B6%7D%7B2%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;binom{6}{2} } ' title='&#92;displaystyle{ &#92;binom{6}{2} } ' class='latex' />
</div>
<p>This sort of number is called a <b><a href="http://en.wikipedia.org/wiki/Binomial_coefficient">binomial coefficient</a></b>.  </p>
<p>We&#8217;ve just shown that</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cbinom%7B6%7D%7B2%7D++%3D+%5Cfrac%7B6+%5Ctimes+5%7D%7B2+%5Ctimes+1%7D+%3D+15+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;binom{6}{2}  = &#92;frac{6 &#92;times 5}{2 &#92;times 1} = 15 }' title='&#92;displaystyle{ &#92;binom{6}{2}  = &#92;frac{6 &#92;times 5}{2 &#92;times 1} = 15 }' class='latex' />
</div>
<p>Why write it like this funky fraction: <img src='https://s0.wp.com/latex.php?latex=%5Cfrac%7B6+%5Ctimes+5%7D%7B2+%5Ctimes+1%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;frac{6 &#92;times 5}{2 &#92;times 1}' title='&#92;frac{6 &#92;times 5}{2 &#92;times 1}' class='latex' />?  Because it&#8217;ll help us see the pattern for doing harder problems like this!</p>
<h3> Nine flips of a fair coin </h3>
<p>If we flip a fair coin 9 times, and the flips are independent, what&#8217;s the probability that we get heads exactly 6 times?</p>
<p>This works just like the last problem, only the numbers are bigger.  So, I&#8217;ll do it faster!  </p>
<p>When we flip the coin 9 times there are <img src='https://s0.wp.com/latex.php?latex=2%5E9&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='2^9' title='2^9' class='latex' /> possible events that can happen.   Each of these is equally likely if it&#8217;s a fair coin and the flips are independent.  So each has probability </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B++%5Cfrac%7B1%7D%7B2%5E9%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{  &#92;frac{1}{2^9} } ' title='&#92;displaystyle{  &#92;frac{1}{2^9} } ' class='latex' />
</div>
<p>To get the answer, we need to multiply this by the number of ways we can get heads exactly 6 times.  This number is called &#8216;9 choose 6&#8217; or</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cbinom%7B9%7D%7B6%7D++%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;binom{9}{6}  }' title='&#92;displaystyle{ &#92;binom{9}{6}  }' class='latex' />
</div>
<p>for short.  It&#8217;s the number of ways we can choose 6 things out of a collection of 9.  </p>
<p>So we just need to know: what&#8217;s 9 choose 6?  We can work this out as before.  There are 9 ways to pick <i>one</i> of the flips and draw a <font color="red">red H</font> on it, then 8 ways left to pick <i>another</i> and draw a <font color="blue">blue H</font> on it, and 7 ways left to pick <i>a third</i> and draw a <font color="orange">orange H</font> on it.  That sounds like 9 &times; 8 &times; 7.  </p>
<p>But we&#8217;ve overcounted!   After all, we don&#8217;t care about the colors.  We don&#8217;t care about the difference between this:</p>
<div align="center">
(T, <font color="red">H</font>, T, T, <font color="orange">H</font>, T, T, <font color="blue">H</font>, T)
</div>
<p>and this:</p>
<div align="center">
(T, <font color="orange">H</font>, T, T, <font color="blue">H</font>, T, T, <font color="red">H</font>, T)
</div>
<p>In fact we&#8217;ve counted each possibility 6 times!  Why six?   The first H could be red, green or blue&#8212;that&#8217;s 3 choices.  But then the second H could be either of the two remaining 2 colors&#8230; and for the third, we just have 1 choice.  So there are 3 &times; 2 &times; 1 = 6 ways to permute the colors.</p>
<p>So, the <i>actual</i> number of ways to get 6 heads out of 9 coin flips is </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cfrac%7B9+%5Ctimes+8+%5Ctimes+7%7D%7B3+%5Ctimes+2+%5Ctimes+1%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;frac{9 &#92;times 8 &#92;times 7}{3 &#92;times 2 &#92;times 1} } ' title='&#92;displaystyle{ &#92;frac{9 &#92;times 8 &#92;times 7}{3 &#92;times 2 &#92;times 1} } ' class='latex' />
</div>
<p>In other words:</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cbinom%7B9%7D%7B6%7D+%3D+%5Cfrac%7B9+%5Ctimes+8+%5Ctimes+7%7D%7B3+%5Ctimes+2+%5Ctimes+1%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;binom{9}{6} = &#92;frac{9 &#92;times 8 &#92;times 7}{3 &#92;times 2 &#92;times 1} } ' title='&#92;displaystyle{ &#92;binom{9}{6} = &#92;frac{9 &#92;times 8 &#92;times 7}{3 &#92;times 2 &#92;times 1} } ' class='latex' />
</div>
<p>To get the answer to our actual problem, remember we need to multiply <img src='https://s0.wp.com/latex.php?latex=1%2F2%5E9&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='1/2^9' title='1/2^9' class='latex' /> by this.  So the answer is</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cfrac%7B1%7D%7B2%5E9%7D+%5Ctimes+%5Cbinom%7B9%7D%7B6%7D+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;frac{1}{2^9} &#92;times &#92;binom{9}{6} }' title='&#92;displaystyle{ &#92;frac{1}{2^9} &#92;times &#92;binom{9}{6} }' class='latex' />
</div>
<p>If you&#8217;re a pure mathematician, you can say you&#8217;re done now.  But normal people won&#8217;t understand this answer, so let&#8217;s calculate it out.  I hope you know the first ten powers of two: 1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024.  So:</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+2%5E9+%3D+512+%7D&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ 2^9 = 512 }' title='&#92;displaystyle{ 2^9 = 512 }' class='latex' />
</div>
<p>I hope you can also do basic arithmetic like this:</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cbinom%7B9%7D%7B6%7D+%3D+%5Cfrac%7B9+%5Ctimes+8+%5Ctimes+7%7D%7B3+%5Ctimes+2+%5Ctimes+1%7D+%3D+84%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;binom{9}{6} = &#92;frac{9 &#92;times 8 &#92;times 7}{3 &#92;times 2 &#92;times 1} = 84} ' title='&#92;displaystyle{ &#92;binom{9}{6} = &#92;frac{9 &#92;times 8 &#92;times 7}{3 &#92;times 2 &#92;times 1} = 84} ' class='latex' />
</div>
<p>So, the probability of getting 6 heads when you do 9 independent flips of a fair coin is</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cfrac%7B1%7D%7B2%5E9%7D+%5Ctimes+%5Cbinom%7B9%7D%7B6%7D++%3D+%5Cfrac%7B84%7D%7B512%7D+%3D+0.164025+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;frac{1}{2^9} &#92;times &#92;binom{9}{6}  = &#92;frac{84}{512} = 0.164025 } ' title='&#92;displaystyle{ &#92;frac{1}{2^9} &#92;times &#92;binom{9}{6}  = &#92;frac{84}{512} = 0.164025 } ' class='latex' />
</div>
<p>or 16.4025%. I broke down and used a calculator at the last step.   We&#8217;re becoming serious nerds here.</p>
<p>Okay, that&#8217;s enough for now.  We&#8217;ve been counting how many ways we can get a certain number of heads from a certain number of coin flips.  What we&#8217;re realy doing is taking a set of coin flips, say <img src='https://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> of them, and choosing a subset of <img src='https://s0.wp.com/latex.php?latex=k&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='k' title='k' class='latex' /> of them to be heads.  So, we say</p>
<p><b>Definition.</b>  The <b><a href="http://en.wikipedia.org/wiki/Binomial_coefficient">binomial coefficient</a></b> </p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cbinom%7Bn%7D%7Bk%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;binom{n}{k} } ' title='&#92;displaystyle{ &#92;binom{n}{k} } ' class='latex' />
</div>
<p>called <b><img src='https://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> choose <img src='https://s0.wp.com/latex.php?latex=k%2C&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='k,' title='k,' class='latex' /></b> is the number of ways of choosing a subset of <img src='https://s0.wp.com/latex.php?latex=k&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='k' title='k' class='latex' /> things from a set of <img src='https://s0.wp.com/latex.php?latex=n&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='n' title='n' class='latex' /> things.  </p>
<p>We have seen in some examples that</p>
<div align="center">
<img src='https://s0.wp.com/latex.php?latex=%5Cdisplaystyle%7B+%5Cbinom%7Bn%7D%7Bk%7D+%3D+%5Cfrac%7Bn%28n-1%29%28n-2%29+%5Ccdots+%28n-k%2B1%29%7D%7Bk%28k-1%29%28k-2%29+%5Ccdots+1%7D+%7D+&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='&#92;displaystyle{ &#92;binom{n}{k} = &#92;frac{n(n-1)(n-2) &#92;cdots (n-k+1)}{k(k-1)(k-2) &#92;cdots 1} } ' title='&#92;displaystyle{ &#92;binom{n}{k} = &#92;frac{n(n-1)(n-2) &#92;cdots (n-k+1)}{k(k-1)(k-2) &#92;cdots 1} } ' class='latex' />
</div>
<p>Here there&#8217;s a product of <img src='https://s0.wp.com/latex.php?latex=k&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='k' title='k' class='latex' /> consecutive numbers on top, and <img src='https://s0.wp.com/latex.php?latex=k&#038;bg=ffffff&#038;fg=000&#038;s=0' alt='k' title='k' class='latex' /> on bottom too.  We didn&#8217;t prove this is true in general, but it&#8217;s not hard to see, using the tricks we&#8217;ve used already.</p>
]]></html><thumbnail_url><![CDATA[https://i2.wp.com/s3.amazonaws.com/boyetblog/Blog%20images/CoinToss.jpg?fit=440%2C330]]></thumbnail_url><thumbnail_height><![CDATA[318]]></thumbnail_height><thumbnail_width><![CDATA[377]]></thumbnail_width></oembed>