[Math] Expected number of flips of 3 coins to get all of the same side.

probability

So I need to find the expected value of the random variable X that denotes the number of coin flips needed to get all of the same side (all heads or all tails) when throwing three fair coins at once, but I'm not sure if the way of solving this is different than say for example, expected number of (single) coin flips until you get n heads in a row.

Can someone provide any guidance?

Best Answer

On any one flip, the probability that all three coins come up the same is $\frac{2}{8}=\frac14$ and the probability that they don't is $\frac34$. Hence, the probability that the three coins come up the same for the first time at exactly the $n$-th flip is ${\left(\frac34\right)}^{n-1}\frac14$.

The expectation is therefore given by

$$\sum_{n\geq 1}n{\left(\frac34\right)}^{n-1}\frac14=\frac14\cdot\sum_{n\geq 1}n{\left(\frac34\right)}^{n-1}.$$

Now, consider $f(x)=\sum_{n\geq0}x^n=\frac{1}{1-x}$, $|x|<1$. We have that

$$f'(x)=\sum_{n\geq1}nx^{n-1}=\frac{1}{{(1-x)}^2}.$$

It follows that the expectation equals

$$\frac14\cdot f'\left(\frac34\right)=\frac14\cdot\frac{1}{{\left(\frac14\right)}^2}=\frac14\cdot16=4$$


This was checking the whole thing via definitions. But you could have skipped it all noting that the chance of 'success' at each step is $1/4$, so the expected value, naturally, would be $4$.