Updated · By Pete Bromfield, IB examiner

IA idea · Simulation & Monte Carlo methods

How far does a random walker get? Distance after n steps

AA HLAA SLAI HL Solid Also in: Probability, Pure maths

Research question

How does the typical distance from the start of a random walk grow with the number of steps, in one and two dimensions, and can the simulated pattern be proved?

Adapt it: change the place, the data or the comparison until the question is yours.

Free: the A–E checklist an examiner uses, by email ↓

Why it makes a good exploration

The result (typical distance grows like √n) is surprising, easy to simulate and provable with expected values, so the simulation and the proof support each other.

The mathematics you'll need

  • Simulation of walks in a spreadsheet
  • Expected value and variance of a sum of independent steps
  • Root-mean-square distance and the √n law
  • Log-log plots to find the power
  • HL: proof for two dimensions using vectors

Course labels show where a technique sits; using maths from outside your course is fine if you explain it clearly and say it is new to you.

Where the data comes from

No data needed; simulate. Optionally record a real 'random' process (a coin-tossing walk on a grid) to compare.

Cite every source in a footnote where you use it and in your bibliography. Check the licence of any dataset you download.

A possible outline

  1. Simulate one-dimensional walks for many n.
  2. Plot mean distance and root-mean-square distance against n on log-log axes.
  3. Prove E(Xₙ²) = n for ±1 steps.
  4. Extend to two dimensions and compare.
  5. Reflect on the difference between mean distance and root-mean-square distance.

Pitfalls that cost marks

  • Confusing mean displacement (zero) with mean distance.
  • Too few walks per n, so the pattern is noisy.
  • Fitting a power without justifying it.

Showing personal engagement

  • Play a coin walk on the school field.
  • Predict the distance after 100 steps before simulating.
  • Find a real process that behaves like a random walk.

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

Which course is it for?

CourseFitMaths to lean on
AA SLGood fitSimulation of walks in a spreadsheet; Expected value and variance of a sum of independent steps
AA HLGood fitSimulation of walks in a spreadsheet; Expected value and variance of a sum of independent steps
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 fitSimulation of walks in a spreadsheet; Expected value and variance of a sum of independent steps

Level: Solid. Needs some independent work beyond class examples. See how the IA differs between AA and AI, SL and HL.

How this idea reaches the top bands

Personal engagement (C)

Design the simulation yourself: choose the rules, test them on a small case you can check by hand, and change one rule at a time to answer a question you care about.

Reflection (D)

Compare simulation with exact theory or real data, say how many runs you used and how much the answer varies between batches, and question the random-number assumptions. For this idea, start with: confusing mean displacement (zero) with mean distance — say how it affects your answer.

Use of mathematics (E)

SL: A probability model described precisely, simulated correctly, with the simulated answer compared with an exact calculation for at least one simple case and the results summarised with appropriate statistics.

HL: An estimate of the simulation's error (standard error, or a confidence interval for the estimate), a distribution fitted to the results and tested, or an exact result proved for the general case that the simulation confirms.

Criteria A and B (presentation and communication) work the same way for every idea: see the guides to Criterion A and Criterion B.

Taking it further

Investigate the probability of ever returning to the start in one and two dimensions, or add a bias to the steps.

Extending it for HL

This idea already has HL mathematics in it: proof for two dimensions using vectors. Give a confidence interval for each simulated estimate and show how it narrows as the number of runs grows, or prove a general result that the simulation confirms.

Before you start: the checklist an examiner uses

Every check for Criteria A–E in a 4-page PDF, the mistakes that cost the most marks and a self-assessment grid. We'll email it with a short IA tip every few days, timed to your deadline if you give it. Free — no account, no payment.

Turn this idea into your IA

Similar ideas

All simulation ideas · AA HL ideas · AA SL ideas · AI HL ideas · All 239 IA ideas