1. May 29, 2007

### haiha

I ve got this simple problem and I can can not find the solution.
Two men play head and tails. Each man flips the coin n times, every time he has head, he should add one point to his score. At the end, they compare the scores, whose score has more points , the man is the winner.
A is the probability of a man lose or win, B is the probability when the two have the same points. Calculate A and B?
Thanks

2. May 29, 2007

### daveb

The first thing you want to do is show us where you're stuck. As a hint, find the probability that person 1 rolls m heads, then find the probability that the other rolls more than m heads.

3. May 29, 2007

### haiha

My way is to find the B value meaning the two are equal. So i tried to calculate the probabiltiy of 1st man to have m heads, then the 2nd also must have m heads, which is called Pm. Then I will sum up Pm with m running from 0 to n. But the formula is very long and i think there must be mistakes somewhere..
P0 = 1/2^(2n)
P1=2.n/2^2n
P2=..

4. May 29, 2007

### chroot

Staff Emeritus
Your sum is correct. Are you sure you have to actually evaluate the sum, or can you just leave your answer in terms of the sum?

This is not a trivial sum to compute.

- Warren

Last edited: May 29, 2007
5. May 30, 2007

### haiha

Can anyone find the general formula for Pm?, at least one that can be computed using a program.

6. May 30, 2007

### chroot

Staff Emeritus
"Pm" is simple -- it's a Binomial distribution:

$p \left( m \right) = \left( {\begin{array}{*{20}c} n \\ m \\ \end{array} } \right)p^m \left( {1 - p} \right)^{n - m} = \left( {\begin{array}{*{20}c} n \\ m \\ \end{array} } \right)2^{ - n}$

where p is the probability of heads (1/2), n is the number of flips, and m is the number of heads.

Remember that the probability of both men getting m heads is actually $[p(m)]^2$.

- Warren

Last edited: May 30, 2007
7. May 30, 2007

### haiha

So I can not calculate P0, when the two men both have no heads ?

Oh I m sorry, I thought (n/m) is a division!.

Last edited: May 30, 2007
8. May 30, 2007

### AlephZero

You can get an approximate answer by replacing the binomial distribution by a normal distribution. The pdf of the "two scores are equal" distribution is the square of the pdf of the normal distribution.

Since $$(e^{-x^2})^2 = e^{-2x^2}$$ this is similar to a normal distribution so you can integrate it.

The approximate probability of equal scores after n tosses is $$1/\sqrt{n\pi}$$.

9. May 7, 2009

### listle

please explain me how do this