If I flip a fair coin 100 times, and each time I get a heads immediately followed by tails, I win $5. How much am I expected to win during the game?
I know that the probability of getting a head = probability of getting a tail = $\frac{1}{2}$, so the probability of a heads then a tails = $\frac{1}{2} \cdot \frac{1}{2} = \frac{1}{4}$. But this is the same probability as any combination of two flips (i.e. two heads, two tails, or tails then a heads). So how can I determine how many of the desired combination would be expected in 100 flips?
$\endgroup$ 42 Answers
$\begingroup$Let $\{X_n\}_{n=1}^\infty$ the Bernoulli process (1: head, 0: tail), you can define the profit Y as:$$Y=5\sum_{n=2}^{100}\mathbf{1}\{X_n=0,X_{n-1}=1\}$$Then, the expectation is:$$\mathbf{E}[Y]=5\sum_{n=2}^{100}\mathbf{P}(X_n=0,X_{n-1}=1)=5\times\frac{99}{4}=123.75$$
$\endgroup$ 2 $\begingroup$This is equivalent to lining up $100$ balls where each ball can be black or white with equal probability, then you win $5 for each black ball that was followed immediately by white ball.
Place a stick between adjacent balls with different color. For each space between adjacent balls, the probability of stick placed on it is $0.5$. Thus the expected number of sticks is $0.5\times 99=49.5$. Because of symmetry, half of these sticks are between black followed by white and the other half are between white followed by black. Therefore the expected winnings are:
$$ 0.5\times 99\times 0.5\times $5=$123.75 $$
$\endgroup$