Probability and dynamic-programming round.

The final roll

Hard

The question

You roll a fair six-sided die until the running total first exceeds 12. What is the probability the final roll is a 6?

Have a go before you open the solution. If you are stuck after a few minutes, the first paragraph below is usually enough of a nudge.

Show the worked solution

The answer

Approximately 27.93%.

Before the last roll, the running total must be one of 7 through 12. For each possible total, count the roll values that would cross 12 and note whether 6 is among them.

The clean route is to define the probability of eventually finishing on a 6 from each current total, then work backward from totals 12 to 0. The recurrence averages the next six states, with an immediate success when a 6 crosses the boundary and an immediate failure when another value crosses it.

Carrying that recurrence back to a starting total of zero gives 3,647,371,105 / 13,060,694,016, or approximately 27.93%. The stopping rule breaks the apparent symmetry between the six possible final rolls.

What it is testing

Whether you can turn a stopping-time question into a finite backward recursion.

Try these next

Preparing properly

Live opportunities

Interviewing soon? See who is hiring

Open vacancies we track at quant firms, grouped by role and city. Adverts are anonymised.

Hiring for these roles? Brief the desk on a hire or check your fit for a role.

Research desk

Speak to a quant market specialist

Ask what a firm really pays, how a desk hires, or where your profile sits. One reply from the research desk, in confidence, no obligation.