1

Two coins are simultaneously tossed until one of them comes up a head and the other a tail. The first coin comes up a head with probability $p$ and the second with probability $q$. All tosses are assumed independent.

(a) Find the PMF, the expected value, and the variance of the number of tosses.

$$P(X=k) = (1-p(1-q) - q(1-p))^{k-1}(p(1 − q) + q(1 − p)), \ \ k=1,2...$$ And the above is clear for me. Now, we would like determine expected value: $$E[X] = \sum_{k>0} kP(X=k)$$ and from solution: $$E[X] = \frac{1}{p(1-q)+q(1-p) }$$ And I don't understand this. Please explain me.

user180834
  • 1,453

2 Answers2

2

Hint. One may recall the useful evaluation: $$ 1+r+r^2+\cdots+r^n+...=\frac{1}{1-r}, \quad |r|<1, \tag1 $$ giving by differentiation and multiplication by $r$:

$$ \sum_{k>0} k\: r^k=r+2r^2+3r^3+\cdots+nr^{n}+\cdots=\frac{r}{(1-r)^2}, \quad |r|<1\tag2 $$ and now put $$ r:=1-p(1-q) - q(1-p) $$ in $(2)$.

Olivier Oloa
  • 120,989
2

You are dealing with geometric distribution having parameter $r=p\left(1-q\right)+q\left(1-p\right)$.

Let $S,F$ denote the events that success resp. failure is there at the first toss.

Then: $$\mathbb{E}X=\mathbb{E}\left(X\mid S\right)P\left(S\right)+\mathbb{E}\left(X\mid F\right)P\left(F\right)=1r+\left(1+\mathbb{E}X\right)\left(1-r\right)=1+\left(1-r\right)\mathbb{E}X$$ leading to: $$\mathbb{E}X=\frac{1}{r}$$

drhab
  • 151,093