Updated · By Pete Bromfield, former Head of Maths with IB examining experience

IA idea · Matrices, transformations & Markov chains

Gambler's ruin: how long until someone runs out?

AI HLAA HL Ambitious Also in: Probability, Simulation

Research question

If two players repeatedly bet one coin on a slightly unfair game, what is the probability that each is ruined and how long does the game last on average, from matrices, from a recurrence and from simulation?

Make it yours, then agree it with your teacher.

Next step: plan this IA free — the planner opens with this question filled in. For feedback on your own draft, the IA package (€39 once) gives you 5 AI feedback credits and every annotated exemplar in full.

Why it makes a good exploration

Three methods for the same answer that check each other: an absorbing Markov chain, a difference equation solved exactly, and a simulation.

The mathematics you'll need

  • Absorbing Markov chains and the fundamental matrix (new)
  • Recurrence relations solved with a characteristic equation
  • Expected duration
  • Simulation to check
  • Effect of a small bias over many bets

Where the data comes from

No data needed; optionally play a real coin game to compare.

A possible outline

  1. Set up the chain for small totals.
  2. Find ruin probabilities with matrices.
  3. Solve the recurrence for general totals.
  4. Find expected duration and check by simulation.
  5. Reflect on what a small bias does in a casino.

Pitfalls that cost marks

  • Using the fundamental matrix without explaining it.
  • Algebra errors in the recurrence; check with small cases.
  • Too few simulations.

Showing personal engagement

  • Predict the answer for a fair game first.
  • Find the bias that makes a game 'feel' fair but isn't.
  • Play the game with a friend.

See Criterion C: personal engagement for what examiners look for.

Which course is it for?

CourseFitMaths to lean on
AA SLNot a natural fitThe core technique sits in the AI course or at HL; an AA SL student could use it only as clearly explained new mathematics.
AA HLGood fitAbsorbing Markov chains and the fundamental matrix (new); Recurrence relations solved with a characteristic equation
AI SLNot a natural fitThe mathematics is mainly AA or HL (calculus or proof beyond AI SL); an AI SL version would need a data-driven, technology-based approach.
AI HLGood fitAbsorbing Markov chains and the fundamental matrix (new); Recurrence relations solved with a characteristic equation

Level: Ambitious. Suits confident students; expect to learn some mathematics on your own. See how the IA differs between AA and AI, SL and HL.

How this idea reaches the top bands

Reflection (D)

For this idea, start with the weak points: using the fundamental matrix without explaining it; and algebra errors in the recurrence; check with small cases. Say how each one affects your answer.

Use of mathematics (E)

HL: absorbing Markov chains and the fundamental matrix (new); recurrence relations solved with a characteristic equation; expected duration; simulation to check; effect of a small bias over many bets, each explained in your own words and carried out correctly.

How matrices & markov explorations reach the top bands in general: Matrices, transformations & Markov chains IA ideas. Guides: A · B · C · D · E · self-grade sheet.

Taking it further

Allow bets of different sizes, or find the strategy that maximises the chance of reaching a target.

Extending it for HL

Add an HL technique the question genuinely needs: what an HL matrices & markov exploration adds.

Frequently asked questions

Which IB Maths course is this IA idea for?

It works for AI HL and AA HL. We rate it Ambitious: it suits confident students, who should expect to learn some mathematics on their own.

What mathematics does this IA use?

Absorbing Markov chains and the fundamental matrix (new), recurrence relations solved with a characteristic equation, expected duration, simulation to check and effect of a small bias over many bets.

Where can I get data for this IA?

No data needed; optionally play a real coin game to compare. Checked sources and tools: Desmos graphing calculator.

Turn this idea into your IA

The planner opens with “Gambler's ruin: how long until someone runs out?” filled in: the question, the maths and the data sources.

Plan this IA free

Your plan is kept in this browser. A free account keeps it with your drafts on any device: Join free · Sign in

Also: free IA self-check · A–E checklist (PDF) · have a draft? AI feedback or a review with Pete (€100)

Writing it up: how to write a Maths IA, step by step · structure and format · mistakes that cost marks · IA modelling, step by step

Similar ideas

All matrices & markov ideas · AI HL ideas · AA HL ideas · All 239 IA ideas