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

IA idea · Statistics & hypothesis testing

Does Benford's law hold for the populations of the world's towns?

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

Research question

Do the leading digits of the populations of [a set of places] follow Benford's law, and does the fit depend on how many orders of magnitude the data spans?

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

In many real datasets, 1 is the leading digit about 30% of the time — Benford's law. It is used to detect fraud. Testing it, and finding when it fails, is a surprising and rigorous statistics IA.

The mathematics you'll need

  • Logarithms: P(d) = log₁₀(1 + 1/d)
  • Chi-squared goodness-of-fit test
  • Understanding why scale-invariance leads to Benford's law
  • Comparing datasets with different ranges

Where the data comes from

Use country and city population tables from the UN or World Bank, and a second dataset with a narrow range (e.g., adult heights) for contrast.

Real data for this idea

  1. Primary source: World Bank Open Data: Population, total (SP.POP.TOTL). Download the CSV and turn one country's row into year and population columns. Licence: CC BY 4.0 for most datasets (the World Bank's licence page lists any exceptions).
  2. Also useful: UN World Population Prospects: World Population Prospects data portal. Choose total population, or population by five-year age group, for one country and export CSV. Licence: Check the terms on the UN site.
  3. Readable chart: Our World in Data: Population. Use it to see the pattern; download your numbers from the primary source or the chart's own download. Cite as: Our World in Data, ‘Population’, CC BY 4.0. Original source: HYDE (2023); Gapminder (2022); UN World Population Prospects (2024).

Links checked October 2026; we link to the data and never copy it. More free data sets.

A possible outline

  1. Explain Benford's law and where the formula comes from.
  2. Extract leading digits for each dataset.
  3. Test the fit with chi-squared.
  4. Compare datasets spanning many or few orders of magnitude.
  5. Reflect on why fraud detectors use it and its limits.

Pitfalls that cost marks

  • Small samples with low expected counts for 8 and 9.
  • Choosing a dataset that cannot follow Benford (narrow range) without realising why.
  • Quoting the formula without explanation.

Showing personal engagement

  • Test it on data from your own life (bank statement amounts, a book's page references).
  • Predict which datasets will fail and why.
  • Explore the second-digit law.

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 fitLogarithms: P(d) = log₁₀(1 + 1/d); Chi-squared goodness-of-fit test
AI SLGood fitLogarithms: P(d) = log₁₀(1 + 1/d); Chi-squared goodness-of-fit test
AI HLGood fitLogarithms: P(d) = log₁₀(1 + 1/d); Chi-squared goodness-of-fit test

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

Reflection (D)

For this idea, start with the weak points: small samples with low expected counts for 8 and 9; and choosing a dataset that cannot follow Benford (narrow range) without realising why. Say how each one affects your answer.

Use of mathematics (E)

SL: logarithms: P(d) = log₁₀(1 + 1/d); chi-squared goodness-of-fit test; understanding why scale-invariance leads to Benford's law; comparing datasets with different ranges, each explained in your own words and carried out correctly.

How statistics explorations reach the top bands in general: Statistics & hypothesis testing IA ideas. Guides: A · B · C · D · E · self-grade sheet.

Taking it further

HL: show that a scale-invariant distribution of log₁₀x leads to the Benford probabilities.

Extending it for HL

Add an HL technique the question genuinely needs: what an HL statistics exploration adds.

Frequently asked questions

Which IB Maths course is this IA idea for?

It works for AI SL, AI HL and AA HL. We rate it Solid: it needs some independent work beyond class examples.

What mathematics does this IA use?

Logarithms: P(d) = log₁₀(1 + 1/d), chi-squared goodness-of-fit test, understanding why scale-invariance leads to Benford's law and comparing datasets with different ranges.

Where can I get data for this IA?

Use country and city population tables from the UN or World Bank, and a second dataset with a narrow range (e.g., adult heights) for contrast. Checked sources and tools: World Bank Open Data, UN World Population Prospects, Our World in Data and UN World Population Prospects 2024.

Turn this idea into your IA

The planner opens with “Does Benford's law hold for the populations of the world's towns?” 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 statistics, step by step

Similar ideas

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