A fair coin is tossed repeatedly and independently until two consecutive heads or two consecutive tails appear. Find the PMF, the expected value, and the variance of the number of tosses. Let X be a total number of tosses And it is a problem of geometric distribution.

1)The pmf is clear for me: $ pmf = (1/2)^{k-1}$

The problem is with expected value:

2)My solution: $E[X] = 1/p = 2$

Solution of the book: $E[X] = E[Y] + 1 = 3$

I can't understand the book's solution. How we came to this? I need some explanation. Thanks.

  • 2
    $\begingroup$ The p$\color{red}{\text{d}}$f is supported on $[2,+\infty]$, hence we are computing the expected value of a shifted geometric distribution. $\endgroup$ – Jack D'Aurizio Sep 25 '15 at 12:20
  • $\begingroup$ No, it is a probability mass function, and the support is on $\{2;\infty\}$; however it is indeed a shifted geometric distribution. $\endgroup$ – Graham Kemp Sep 25 '15 at 12:33
  • $\begingroup$ What is $\{2;\infty\}$? The support is $\{2,3,4,\ldots\}=\{n\in\mathbb N\mid n\geqslant2\}$. $\endgroup$ – Did Sep 25 '15 at 12:34
  • $\begingroup$ Yes, that is what it is. The integer interval from $2$ towards infinity. $\endgroup$ – Graham Kemp Sep 25 '15 at 12:47

Quite simply you cannot have two consecutive head-or-tails until you have at least the second flip.   If $X$ is the count of flips required, then: $\mathsf P(X{=}1)=0,\, \mathsf P(X{=}2)=\tfrac 1 2, \,\ldots,\, \mathsf P(X{=}k) = \frac 1{2^{k-1}} \;\mathbf 1_{k\in\{2;\infty\}}$

That is, to have a consecutive head-or-tail on flip $k$, you need the first flip (what ever it is), the next $k-2$ flips to all be different to each of their predecessors, and last flip to be identical to its predecessor.

This means: $(X-1)\sim \mathcal{Geo_1}(\frac 1 2)$, that is $X$ has a shifted geometric distribution.

Let $Y\sim\mathcal{Geo_1}(\frac 1 2)$, then $X=Y+1$ and $\mathsf E(X)=1+\mathsf E(Y)=1+2=3$

That is all.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.