-1
$\begingroup$

I flip a coin three times, and then another three times. If the number of heads is the same the first and second time, I win. If the number of heads is different, then I win. If I win, you pay me one dollar. If you win, I give you 3 dollars. Is this game worth playing?

So I've figured out that for this game the $E[X] = 3p - (1-p)$ but I'm having a hard time coming up with $p$.

  • 0
    They're commenting on a typo in the text regarding who wins when.2012-10-16

2 Answers 2

2

Let's suppose player A wins if the two sets have the same number of heads and the coins are fair. The probability of this is $\left(\frac{1}{8}\right)^2 + \left(\frac{3}{8}\right)^2+\left(\frac{3}{8}\right)^2+\left(\frac{1}{8}\right)^2 = \frac{5}{16}.$

Suppose B wins if the two sets are different. The probability of this is $1-\frac{5}{16}=\frac{11}{16}.$

So if A gains 3 dollars when winning and loses 1 dollar when losing, then A's expected net gain is $3 \times \frac{5}{16} -1 \times \frac{11}{16} = +\frac14$ per game.

1

Well, the probabily of seeing the same number of heads twice is the probability that you get $0$ both times plus the probability that you get $1$ both times plus the probability that you get $2$ both times.

Now, to find the probability that you get $k$ heads if you flip a coin $n$ times, observe that the probability of seeing the specific sequence (head, tail, head) is $p_{head}(1-p_{head})p_{head}$ = $p_{head}^2(1-p_{head})^1$. In general, the probability of seeing a particular sequence with $k$ heads is $p_{head}^k(1-p_{head})^{n-k}$. To get the probabily of seeing $k$ heads, you thus have to multiply that with the number of sequences with $k$ heads. That is the same as the number of ways that you can pick $k$ elements from $n$, i.e. $\binom{n}{k}$ = $\frac{n!}{k!(n-k)!}$. You thus get that the probability of seeing $k$ heads if you flip a coin $n$ times is $ \binom{n}{k}p_{head}^k(1-p_{head})^{n-k} $

For the special case of a fair coin, i.e. $p_{head}=0.5$, you get $ \binom{n}{k}\frac{1}{2^n} $

Now, summing up the square of those probability for all possible numbers of heads gives you the probability that the same number of heads turns up twice in a row, i.e. you get $ \sum_{k=0}^{n} \left(\binom{n}{k}\frac{1}{2^n}\right)^2 = \frac{1}{2^{2n}} \sum_{k=0}^{n} \binom{n}{k}^2 $

Thus, for $n=3$ you get the probability $ \frac{1^2 + 3^2 + 3^2 + 1^2}{2^6} = \frac{20}{64} = \frac{5}{16} $ of seeing the same number of heads twice in two rows of 3 coin flips

  • 0
    @Emir And was apparently also unable to correctly compute $1^2+3^2+3^2+1^2$ - how I got $11$ there is beyond me. Fixed also.2012-10-16