LibraryInterview questions

Waiting for Six Then Five on a Fair Die

Quant interview question · medium · members

The question

A fair six sided die is rolled repeatedly.

  1. What is the expected number of rolls until the two most recent rolls read a six followed by a five?
  2. What is the expected number of rolls until the two most recent rolls read a six followed by a six?
  3. What is the expected number of rolls until the three most recent rolls read six, ...

The rest of the question is for members

Hint

Track how much of the pattern the most recent rolls already match, and ask what a failed attempt leaves behind in each case.

The idea behind it

A pattern that can overlap itself wastes progress when it fails, and the wasted progress is exactly the extra wait. Density of occurrence is equal for both patterns; the spacing is not.

The rest of the question and the solution are for members

You have the opening of the question, a hint and the idea. It derives the expected number of rolls for both patterns, and explains whether the two take the same time on average and why.

The full question and its solution are part of Thuztra Learn membership, which is a paid subscription. Install the app to read them:

Download on the Microsoft Store Download for Android

On Android, the app is a direct download, not a Google Play listing. Which devices, and what each one needs.

Further reading

Topics

Also in the library