0
$\begingroup$

"A researcher in the rain forest has left his laptop unattended and a curious monkey has come to investigate. When the researcher looks up from the plant he is studying he sees the monkey at the keyboard. He makes threatening noises as he runs back. Assume that every time he shouts there’s a 50% chance that he will manage to disrupt the monkey before it makes another key stroke, and that he will have reached the laptop before he has shouted six times. What do you think is the average number of key strokes the monkey will manage in this situation?"

How should I approach this problem using basic counting and probability formulas?

The answer is 31/32, but I don't know how to get to this result. A tree diagram is suggested for this problem.

1 Answers 1

1

Method I (Indicator Variables) Let $X_i$, for $i=1,\cdots, 5$ be the indicator variable for the $i^{th}$ possible key stroke. Then $E=E[\sum X_i]=\sum E[X_i]$. But $E[X_i]=\frac 1{2^i}$ so the answer is $$E=\frac 12+\frac 14+\frac 18+\frac 1{16}+\frac 1{32}=\frac {16+8+4+2+1}{32}=\frac {31}{32}$$

Note: if it takes our man $N$ shouts to get back the above shows that the answer is $\frac {2^{N-1}-1}{2^{N-1}}$

Method II: (Direct Calculation). There are six possible outcomes: namely, $0,1,2,3,4,5$ key strokes. Let $p_i$ be the probability of outcome $i$. Then $p_0=\frac 12$, as there is a $50-50$ chance the first shout works. Similarly $p_1=\frac 14$ as to get this outcome you need the first shout to fail and the second to work. Continuing in this spirit we see that $p_i=\frac 1{2^{i+1}}$ for $i=0,1,2,3,4$ and $p_5=\frac 1{32}$ Thus our answer is $$E=\sum_{i=0}^5 i\times p_i=0\times \frac 12+1\times \frac 14+2\times \frac 18+3\times \frac 1{16}+4\frac 1{32} + 5\times \frac 1{32}$$$$=\frac {0+1\times 8+2\times 4+3\times 2+4+5}{32}$$ $$=\frac {8+8+6+4+5}{32}=\frac {31}{32}$$

Note: Comparing the two methods gives a strong argument in favor of the indicator variables! For example, while perfectly possible it's a lot more work to extend to $N$ shouts via method II.

  • 0
    Can you explain it more intuitively? I don't know what an indicator variable is.2017-01-10
  • 0
    It's a great technique! very much worth learning. [here](http://math.stackexchange.com/questions/179961/intuition-behind-the-concept-of-indicator-random-variables) is a quick introduction. I'll edit my post to include an alternate method.2017-01-10
  • 0
    Why do I have to multiply the number of keystrokes with the probability of the outcome. I am stuck on the E formula2017-01-10
  • 0
    That's how you compute an average. You look at the possible outcomes weighted by the probability of their occurrence. If you think you'll get $80$ on your next test with probability $\frac 14$ and $90$ with probability $\frac 34$ your expected score is $80\times \frac 14+90\times \frac 34=87.5$2017-01-10
  • 1
    [here](https://en.wikipedia.org/wiki/Expected_value) is an introduction to Expected Value.2017-01-10
  • 0
    Thank you! That's what I needed. I didn't know what this formula represents in order to try to understand it. Great help:)2017-01-10