Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Flip a coin 2n times; chance of n heads

  1. Aug 3, 2010 #1
    1. The problem statement, all variables and given/known data

    I don't my book to give me the exact wording of the question, but the essence is finding a formula for the probability of n heads after flipping a coin n times.

    2. Relevant equations

    "n choose k" = n! / k!(n-k)!

    3. The attempt at a solution

    Obviously you have a 1:2 chance of flipping n heads. But I'm not sure how to show this, and I think I'm supposed to use the above equation. The number of possible combinations will be 22n; half of those will have n heads.
  2. jcsd
  3. Aug 3, 2010 #2


    User Avatar
    Science Advisor
    Homework Helper

    The odds of flipping exactly n heads in 2n flips isn't 1/2. If n is large it's extremely small. Now if you forget trying to prove it's 1/2, can you solve the problem? You have some of the right ingredients.
  4. Aug 4, 2010 #3
    Guys, guys, guys ...

    I'll draw a picture out for y'all


    After 2 flips, a 1/2 chance of getting 1 head

    After 4 flips, a 6/16 chance of getting 2 heads

    Not sure where those numbers come from, but ...

    When there's an even number of flips --- for example, 3 --- it's impossible to have the same amount of heads as tails. Since you can have 2 heads or 2 tails, though, you can use the paths that give you 2 heads/tails and have a 1/2 chance of getting the same number of heads an tails when that path continues into the 4th flip.

    (See what I'm saying? If you look at the 2nd T from the left on the 3rd flip line, you see that 2 H's preceded it, meaning you will have 2 H's and 2 T's for one of the paths that extends from that T to the next flip.)
  5. Aug 4, 2010 #4


    User Avatar
    Science Advisor
    Homework Helper

    I'm not sure what you are trying to say here. Your diagram method is correct. The odds of getting two heads in four flips is 6/16. The point of the problem is to compute that without drawing the whole diagram. Use the "n choose k" number and the 2^(2n) total possibilities observations to write a formula for the number of ways to get n heads in 2n flips.
  6. Aug 4, 2010 #5
    Well, yeah, there are 22n possibilities to choose from and we want to choose the number that have half as many heads as total coins flipped. How do I find that number?

    I understand how "n choose k" works, but don't see how it fits into this problem because somewhere, somehow, I have to sum up the number of heads.
    Last edited: Aug 4, 2010
  7. Aug 4, 2010 #6


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    You're thinking of generating a piece of data by:
    (2n)-many times:
    Flip a coin.
    Write down whether it was heads or tails.​
    Count how many heads there are.
    If there are n heads, keep this sequence. Otherwise discard it.​

    You are obviously having trouble counting the set of all possible results of this procedure. Can you think of any other way to generate the same set of data?
  8. Aug 4, 2010 #7
    Well, yeah. I could use Stats, but this a Math Reasoning class.

    This keeps track of how many heads:

    +1 +0

    The average is: (+1+0)/2 = 1/2

    After 2n flips, the expected value is (1/2)*2n = n

    The Standard Error is: [ ( (1-1/2)2+(0-1/2)2 ) / 2 ]1/2 * √(2n)

    etcetera ...
  9. Aug 4, 2010 #8


    User Avatar
    Staff Emeritus
    Science Advisor
    Homework Helper
    Education Advisor

    If you write down the 16 possible outcomes from four flips with 2 heads, you get
    Code (Text):

    H H T T
    H T H T
    H T T H
    T H H T
    T H T H
    T T H H
    Can you see how [tex]\begin{pmatrix}4 \\ 2\end{pmatrix}=6[/tex] might apply here?
  10. Aug 5, 2010 #9


    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    You haven't changed how to generate the data at all -- all you changed is what information you are extracting from the data.
  11. Aug 5, 2010 #10
    Oh .......

    2=n, and that's the number you need to choose (since 2n=4).

    But where did the 22*2 come into play for this problem?
  12. Aug 5, 2010 #11
    That's the 16 possible outcomes of 4 flips, out of which 6 = (4 choose 2) are favorable.
  13. Aug 5, 2010 #12
    So the probability P(n) would be

    "2n choose n" / 22n = [ (2n)! / n! (2n-n)! ] / 22n
  14. Aug 5, 2010 #13


    User Avatar
    Science Advisor
    Homework Helper

    That's it.
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook