Number of expected runs in a fair coin flip

1.2k Views Asked by At

I have this question in mind Say we flip a particular fair coin for 20 times and note down the sequences. Then what is the number of expected runs we can get?

Thought process: Let X = number of runs we can obtain (i.e. from 1 to 20 - since we are not asking for a "complete" run) probability of each run = 1/20

Expected # of runs = 1/20 [1+2+3+4...+20] = 10.5 Is my deduction correct or is there a flaw? Thank you!

2

There are 2 best solutions below

0
On BEST ANSWER

The first flip starts a run. After that any given flip has a $0.5$ probability of starting a new run. So after the first flip we would expect half of the succeeding flips to start new runs.

So the expected number of runs is $1+\frac{19}{2}$

0
On

If you are defining a run as a succession of heads or tails, then $$E(R) = 1 + 2n_1n_2 / (n_1+n_2)$$ where $n_1$ is the observed number of heads, $n_2$ is the observed number of tails, and $R$ is the number of runs that can be constructed based on $n_1$ and $n_2$. The development of this result is based on the joint probability distribution of the number of runs of heads and the number of runs of tails possible in a sample of independent coin tosses of size $n$.

But this requires knowledge of the number of heads and tails observed in your sample. If you are really asking what the expected number of runs is before flipping the coin $n$ times, then E(R) is approximately $$2n\lambda(1-\lambda)$$ for $n$ large, where $\lambda = n_1/n$ remains constant as $n$ tends to infinity. If $\lambda=0.5$ for a fair coin and $n=20$ then $E(R)$ is approximately $10$, and just a little different from your intuition!