1

Question: Keep flipping a biased coin (π = p [heads] = 1/3). We will not stop until the first head is observed and let X be the number of flips resulting. Find E[X].

My answer:

$E(X) = \sum_{x=1}^\infty(x\cdot(1-\pi)^{x-1}\cdot\pi) = \pi\sum_{x=1}^\infty(x\cdot(1-\pi)^{x-1})$

I am stucked here....

The answer key is 3

2 Answers2

1

Doesn't the thing that is being summed look like the derivative of some function in $\pi$ to you ? Try to do the sum before differentiating and then finally differentiate, you should find what you are looking for (if you can commute infinite sum and derivation in this case it is because of a particular case of dominated convergence theorem).

Popyaitte
  • 268
  • 1
    Rather, it looks like the derivative of some function of $\pi$ (well, some of variable evaluated at that specific value).$$\begin{align}\mathsf E(X)&=\pi\sum_{k=1}^\infty k(1-\pi)^{k-1}\&=-\left.\dfrac{\mathrm d~~~}{\mathrm d~y}\sum_{k=1}^\infty(1-y)^k\right\vert_{y=\pi}\end{align}$$ – Graham Kemp Oct 16 '19 at 00:06
  • Oops, wrote too fast, edited. – Popyaitte Oct 16 '19 at 00:08
0

While it's a good idea to memorize the fact that a geometrically distributed random variable with parameter $p$ has expectation $1/p$, you can solve this problem without computing the sum by finding a recursive equation (this is called conditioning the expectation).

Let's look at only the outcome of the first coin flip. There are two cases to consider. If we flip heads (with probability $1/3$), our number of coin flips has increased by one, and we'll stop the coin flipping process. On the other hand, if we flip tails (with probability $2/3$), we will add one to our coin flip count, but now we've effectively "restarted" our coin flipping process (with our count increased by one).

By the law of total probability, this gives the equality

$$E(X) = \underbrace{\frac{1}{3} (1)}_{\text{heads}} + \underbrace{\frac{2}{3}(E(X) + 1)}_{\text{tails}}$$

You can solve this equation to find $E(X) = 3$.

Ekesh Kumar
  • 3,500