Maths IA · Statistics and probability · topic 25 of 40

Markov chains: what is the long-run weather? · IB Maths IA idea: guide, sample graph and step-by-step plan

stretching, but great at HL

Will it rain tomorrow if it rained today? Where will you be on the board after 100 turns? Matrices can say, if you're careful about what they assume.

Difficulty●●● Stretch
KitWeather records or board game, matrix software
TimeAbout 15 hours
FitsAI HL
  • ✓ you like matrices
  • ✓ you enjoy a long-run question
  • ✓ you want HL-level maths

The big idea

eigenvector = steady state

A Markov chain moves between states with fixed probabilities that depend only on the current state. Put those probabilities in a transition matrix and powers of it give the future; the long run settles to a steady state. The steady state is an eigenvector of the matrix, for the eigenvalue 1. You estimate the matrix from real records (daily weather, or a board game you simulate), predict the long run, and test the prediction against real data. The depth comes from the justifications: why powers of the matrix give n-step probabilities, why the chain converges, and how fast. Transition matrices and eigenvectors are AI HL content. AA has no matrices, so on AA you would be teaching yourself a whole topic.

Make it yours: pick one twist

Copying a classic won't show your choices. Pick one of these (or invent your own) and your IA becomes yours.

Swipe for more twists →

Real weather data

Use daily records for a place you know and count transitions between states such as dry and wet.

→ The matrix comes from your data, and you test whether the Markov property is plausible with a goodness-of-fit check.
Board game positions

Model a board game with snakes and ladders or a loop of squares and find the average number of turns.

→ You get a bigger matrix, absorbing states and expected game length: a more advanced use of matrices.
Speed of convergence

Use the second eigenvalue to explain how quickly the chain forgets its start.

→ This links eigenvalues to a graph of probability against time and lifts the sophistication.
Longer memory

Compare a one-day memory with a two-day memory, using pairs of days as states.

→ You test a model assumption head on and discuss whether the extra complexity helps.
Seasonal change

Estimate separate matrices for summer and winter and compare steady states.

→ Your model has to cope with a changing process, and you reflect on a constant-matrix assumption.
Prove the steady state

Prove existence and uniqueness for your matrix, or at least for the 2-state case.

→ This provides the rigour HL criterion E asks for, instead of reading the answer off software.

Your Maths IA research question: run the check

Write your own question first. Then make sure it ticks every box:

  • Names the process and the states (how many, and how they are defined).
  • Says where the transition probabilities will come from: data, a published source, or a simulation.
  • Says what long-run quantity you will find and how you will check it against data.
  • Is narrow enough that the matrix is no bigger than you can justify by hand.
  • Allows for the Markov property failing, and says how you will test it.

Get your RQ checked · S$29

The model

Each arrow is a transition probability. All arrows out of a state sum to 1. The matrix collects them so you can use algebra. The IB AI course writes the transpose (columns sum to 1): pick one convention and keep it.

sunnyrainy0.20.40.80.6P =0.80.20.40.6each row of P sums to 1does the start state matter?steady state: πP = πmemoryless: is that fair?

How your Maths IA could be laid out

The usual order for a topic like this, what each part needs to show, and roughly how much of your 12 to 20 pages it takes. The words are all yours.

Aim and context~1 page
Why this process; what you expect about the long run; what the states are and why.
Markov chains and matrices~2.5 pages
State space, transition matrix, why the n-step matrix is a matrix power. At HL, justify the link instead of quoting it.
Estimating the matrix~2 pages
Data source, how transitions were counted, a table of counts, the estimated matrix and its limits.
Steady state~2.5 pages
Method (solve πP = π, or eigenvectors), a worked example, and a check that probabilities sum to 1.
Convergence~2 pages
How fast the chain approaches the steady state, ideally linked to the other eigenvalue, with a graph.
Testing against reality~2 pages
Compare predicted long-run proportions with the real data or a simulation, with a number for the difference.
Is it really Markov?~1.5 pages
Test or argue the memoryless assumption, such as comparing one-day with two-day memory.
Conclusion~1 page
The long-run answer with its limits.
Reflection and limits~1.5 pages
Assumptions, data size, constant matrix, and a next step with a reason.
Bibliographynot counted
Data and method sources.

What your Maths IA graph could look like

show the limit as a line

Made-up values for a two-state chain, to show the form of a strong graph. example only

0123456780.00.10.20.30.40.50.60.70.80.91.01.11.2Number of days n since the startProbability that day n is sunnystarts sunnystarts rainysteady statesimulated from a sunny start (made up)both curves forget wherethey started: how quickly?ILLUSTRATIVE · MADE-UP DATA
  • Both starting states drawn: the picture shows the chain forgetting its start.
  • A horizontal line marks the steady state so the reader sees the limit.
  • Simulated points have error bars from the number of simulated runs (state it).
  • Axis titles say what is plotted: a probability, not a count.
  • Another graph to consider: the distance from the steady state on a log scale, which is a straight line if one eigenvalue controls the decay.

Your game plan

Tick steps off as you go. We'll remember on this device.

0 of 10 done

  1. Choose a processWeather in your town, or a board game. Decide on states you can observe without ambiguity.
  2. PredictWrite down what you think the long-run proportions will be, before calculating.
  3. Learn matricesMatrix multiplication, powers, eigenvalues and eigenvectors, if your course includes them. Do a 2-state chain by hand.
  4. Trial runTake 30 days of data (or 30 turns of the game). Count transitions. Are your states clear? Is any state too rare?
  5. Collect properlyGather enough transitions so each row of the matrix has a sensible count, and record the source.
  6. Build the matrix and the steady stateEstimate the probabilities, check rows sum to 1, find the steady state by two methods (algebra and a high matrix power).
  7. Study convergencePlot the probability against time. Link the speed to the matrix.
  8. Test the modelCompare predicted and observed long-run proportions. Test the Markov assumption.
  9. Reflect and extendState the model's limits. Pick one extension, such as memory length or seasons, and say why.
  10. Write, then cutShow one worked matrix calculation, then tables. Notation for matrices must be proper, not software syntax. Check before your teacher's draft.

Maths you'll need

Traps to avoid in this Maths IA

check your rows!
  • Rows of the matrix that do not sum to 1 because of rounding or a counting slip.
  • Choosing states because they are easy to count, not because they make sense.
  • Estimating from too little data, so a rare transition has probability 0 by luck.
  • Reading the steady state from software without showing the working or checking it.
  • Assuming a Markov chain without ever testing the memoryless property.
  • At HL: only the 2-by-2 routine with no proof or comparison; criterion E needs sophistication and rigour.
  • Mixing up row and column conventions part-way through.

More Maths IA ideas like this

Make sure it's yours

This guide shows how a topic like this is usually approached. It is not an IA. Your question, choices, data, analysis and words must be your own: change something, tell your teacher where the idea came from, and follow your school's rules on outside help.

Get your RQ checked · S$29