"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.