# Flip a coin 2n times; chance of n heads

1. Aug 3, 2010

### Jamin2112

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. Aug 3, 2010

### Dick

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.

3. Aug 4, 2010

### Jamin2112

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.)

4. Aug 4, 2010

### Dick

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.

5. Aug 4, 2010

### Jamin2112

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
6. Aug 4, 2010

### Hurkyl

Staff Emeritus
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.

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?

7. Aug 4, 2010

### Jamin2112

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 ...

8. Aug 4, 2010

### vela

Staff Emeritus
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 $$\begin{pmatrix}4 \\ 2\end{pmatrix}=6$$ might apply here?

9. Aug 5, 2010

### Hurkyl

Staff Emeritus
You haven't changed how to generate the data at all -- all you changed is what information you are extracting from the data.

10. Aug 5, 2010

### Jamin2112

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?

11. Aug 5, 2010

### owlpride

That's the 16 possible outcomes of 4 flips, out of which 6 = (4 choose 2) are favorable.

12. Aug 5, 2010

### Jamin2112

So the probability P(n) would be

"2n choose n" / 22n = [ (2n)! / n! (2n-n)! ] / 22n

13. Aug 5, 2010

That's it.