- #1
ephedyn
- 170
- 1
Homework Statement
A biased coin lands heads with probability p and tails with probability 1-p.
(1) What is the expected number of flips, after the initial flip, to land a match to the initial flip?
(2) What is the expected number of flips, after the initial flip, to land a different side from the initial flip? Comment on the extreme values of [itex]p[/itex].
The attempt at a solution
Without loss of generality, assume we land heads on the initial flip. Let [itex]N_H[/itex] be the number of flips required until we land heads again. Since [itex]N_H[/itex] is a geometric random variable, with pmf [itex]f(x) = p(1-p)^{x-1}[/itex], then [tex]E[N_H]=\sum^{\infty}_{x=1} x \cdot f(x)= \sum^{\infty}_{x=1} px(1-p)^{x-1}=\dfrac{p}{1-(1-p)^2}=\dfrac{1}{p}[/tex] and similarly we have [itex]\dfrac{1}{1-p}[/itex] for tails. Let [itex]H[/itex] and [itex]T[/itex] denote the event of landing heads and tails on the initial flip respectively.
So (1) for matching flips, the expected number of flips is [tex]P(H) \times \dfrac{1}{p} + P(T) \times \dfrac{1}{1-p} = p \times \dfrac{1}{p} + (1-p) \times \dfrac{1}{1-p}=2[/tex].
Similarly, (2) for different flips, the expected number of flips is [tex]P(T) \times \dfrac{1}{p} + P(H) \times \dfrac{1}{1-p} = \dfrac{1-p}{p} + \dfrac{p}{1-p}=\dfrac{p^2+(1-p)^2}{p(1-p)}=\dfrac{2p^2-2p+1}{p(1-p)}[/tex]
For the extreme cases, by L'Hopital's rule, we have [tex]\lim_{p\rightarrow0} \dfrac{2p^2-2p+1}{p(1-p)}=\lim_{p\rightarrow0} \dfrac{4p-2}{1-2p}=-2[/tex] and similarly, [tex]\lim_{p\rightarrow1} \dfrac{4p-2}{1-2p}=-2[/tex]
So I realize I must be doing something wrongly because I'm getting negative expectation values in the final part. Any guidance on my working?
Thanks!
A biased coin lands heads with probability p and tails with probability 1-p.
(1) What is the expected number of flips, after the initial flip, to land a match to the initial flip?
(2) What is the expected number of flips, after the initial flip, to land a different side from the initial flip? Comment on the extreme values of [itex]p[/itex].
The attempt at a solution
Without loss of generality, assume we land heads on the initial flip. Let [itex]N_H[/itex] be the number of flips required until we land heads again. Since [itex]N_H[/itex] is a geometric random variable, with pmf [itex]f(x) = p(1-p)^{x-1}[/itex], then [tex]E[N_H]=\sum^{\infty}_{x=1} x \cdot f(x)= \sum^{\infty}_{x=1} px(1-p)^{x-1}=\dfrac{p}{1-(1-p)^2}=\dfrac{1}{p}[/tex] and similarly we have [itex]\dfrac{1}{1-p}[/itex] for tails. Let [itex]H[/itex] and [itex]T[/itex] denote the event of landing heads and tails on the initial flip respectively.
So (1) for matching flips, the expected number of flips is [tex]P(H) \times \dfrac{1}{p} + P(T) \times \dfrac{1}{1-p} = p \times \dfrac{1}{p} + (1-p) \times \dfrac{1}{1-p}=2[/tex].
Similarly, (2) for different flips, the expected number of flips is [tex]P(T) \times \dfrac{1}{p} + P(H) \times \dfrac{1}{1-p} = \dfrac{1-p}{p} + \dfrac{p}{1-p}=\dfrac{p^2+(1-p)^2}{p(1-p)}=\dfrac{2p^2-2p+1}{p(1-p)}[/tex]
For the extreme cases, by L'Hopital's rule, we have [tex]\lim_{p\rightarrow0} \dfrac{2p^2-2p+1}{p(1-p)}=\lim_{p\rightarrow0} \dfrac{4p-2}{1-2p}=-2[/tex] and similarly, [tex]\lim_{p\rightarrow1} \dfrac{4p-2}{1-2p}=-2[/tex]
So I realize I must be doing something wrongly because I'm getting negative expectation values in the final part. Any guidance on my working?
Thanks!