0

We have an unfair coin with a probability of 0.6 of obtaining a heads. Each flip is independent.

How many tails do you expect to see before getting three heads?

For example, imagine you see the third heads on the tenth trial. This would mean you have seen 2 heads in the first 9 trials followed by a heads on the tenth. Then your answer would be observing 7 tails. Generalize this to the i^th trial.

I am not sure where to go from here. My thinking is somewhere along the lines of a negative binomial but I cannot seem to get it to work correctly.

$$P(X=r) = \begin{pmatrix} n-1\\ r-1 \end{pmatrix} p^rq^{k-r} $$ $$ E(X) = \sum_{x}^n xP(X=x)\\ E(X) = \sum_{x}^n x \begin{pmatrix} n-1\\ r-1 \end{pmatrix} p^rq^{k-r} $$

My alternative was to use geometric distribution:

$$P(X=x) = q^{x-q}p $$ $$ E(X) = \sum_{x}^n xP(X=x)\\ E(X) = \sum_{x}^n x q^{x-q}p $$

However I am not sure if this is correct. Additionally I am not sure how to address k if this is correct.

2 Answers2

2

Let $X$ be the count of tails before the third head, and $p$ the coins success rate for heads, then we seek the probability for 2 heads among $k+2$ tosses, then a third head. Your settup would be: $$\begin{align}\Pr(X=k)&=\dbinom{k+2}{2}p^3(1-p)^{k}\,\mathbf 1_{k\in\Bbb N}\\\mathsf E(X) &= p^3\sum_{k=0}^\infty k\dbinom{k+2}{2}(1-p)^k\\&=p^3\dbinom 31\sum_{k=1}^\infty \binom{k+2}3(1-p)^k\\&= \dfrac{3p^3}{(1-p)^2}\sum_{\ell=3}^\infty \binom{\ell}3(1-p)^{\ell}\end{align}$$

Then just find the closed form for that series.


However, as the commenters suggest, it is much easier to use Linearity of Expectation.

Let $X_0,X_1,X_2$ be the counts of tails between subsequent heads, so $X=X_0+X_1+X_2$. $$\mathsf E(X)=\mathsf E(X_0)+\mathsf E(X_1)+\mathsf E(X_2)$$ Then we just note that these three random variables are identically (0-shifted) geometrically distributed, with success rate $p$ so...$$\mathsf P(X_0=k)=p(1-p)^k\,\mathbf 1_{k\in\Bbb N}\\~\\\mathsf E(X_0)={\dfrac 1p-1}\quad~~$$

Graham Kemp
  • 129,094
0

P(heads) $= 0.6 = \frac35= p \;(say)$

We want $np = 3 \to \;n= 5$

and expected number of tails seen before three heads $=5-3 =2$