2

You are repeatedly tossing a fair die. How many tosses until you get a 5 or a 6.

I got the answer $3$ using $P_iX_i$ that is creating a infinite series but the hint to the problem says

One approach is to sum an infinite series. Another is to notice that the problem either ends or restarts after first toss: this lets to express answer recursively, meaning you can set up an equation where answer appears on both sides

I'm not sure how to interpret the second part. It makes sense that the problem end or restarts but I don't understand what to make of it or how to solve it using recursion

Parcly Taxel
  • 103,344
Anvit
  • 3,379

1 Answers1

2

Suppose the expected number of rolls is $E$. Then when a roll is made:

  • there is a $\frac13$ probability that a 5 or 6 is rolled, stopping the process
  • there is a $\frac23$ probability that a 5 or 6 is not rolled, leaving an expected $E$ more rolls to go

This gives the equation $$E=\frac13\cdot1+\frac23\cdot(1+E)$$ $$\frac13E=1$$ $$E=3$$

Parcly Taxel
  • 103,344