Maths IA · Statistics and probability · topic 23 of 40
Benford's law: does your data follow it? · IB Maths IA idea: guide, sample graph and step-by-step plan
surprising result, easy to explain badlyIn many real data sets, about 30% of numbers start with 1 and fewer than 5% start with 9. Does your data play along, and what happens when it doesn't?
- ✓ you like surprising patterns
- ✓ you enjoy logarithms
- ✓ you can find and justify data sets
The big idea
Benford's law says the share of numbers with first digit d is log₁₀(1 + 1/d). It tends to appear in data that spreads across several orders of magnitude, such as populations, river lengths or financial figures. You choose several data sets from different fields, count first digits, and compare with the law using a chi-squared goodness-of-fit test. The data choice matters more than the test: sets with a narrow range fail the law for a reason you can explain. A good exploration also explains why the law holds, using logarithms and scale invariance, instead of just quoting the formula. At HL, make that explanation rigorous.
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 →
Use at least three data sets from different areas, such as populations, prices and sports scores.
→ You compare fit across fields and have to explain which kinds of data suit the law and why.Take a data set that fits and restrict its range, for example people's heights.
→ You see the law fail and can link the failure to the range of the data, a strong reflective moment.Test the law for the second digit as well.
→ The predicted shares are much flatter, so the test is harder to pass; you discuss sample size needs.Show that a data set uniform on a logarithmic scale gives Benford's shares.
→ This justification is the logarithm maths at the heart of the topic and lifts criterion E at both levels.Use a second measure such as mean absolute deviation alongside chi-squared.
→ You discover that with a big sample almost every data set 'fails' chi-squared, so you must judge size of departure.Test a data set that has been tampered with or made up, or invent one yourself.
→ Benford becomes a tool, linking to the idea behind fraud checks; you discuss false alarms.Your Maths IA research question: run the check
Write your own question first. Then make sure it ticks every box:
- Names the data sets (or kind of data) and why each is a sensible choice.
- Says what you count (leading digits of which quantity, in which units).
- Names the test and the significance level you will use to say 'fits' or 'does not fit'.
- Says what you will do about very small or very large samples.
- Allows for the data not fitting; you are not forced to find a match.
The model
The bars are the shares Benford's law predicts. Your data gives the circles. The test asks whether the gaps are bigger than chance would give.
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.
Why Benford's law interested you, what you predict for each data set before counting.
The formula, and an explanation of where it comes from using logarithms. At HL, make the argument rigorous.
Each data set, source, why it was chosen, units, how many numbers, what was excluded.
A table of observed counts and shares for each set, with the method for extracting first digits.
Hypotheses, expected counts, degrees of freedom, the test statistic, p-value, and conditions on expected counts.
A graph with bars for the law and points for each data set, plus a second measure of distance.
Which data sets fit and which do not, and what separates them.
Sample size, choice of data, what a pass or fail really means, and a next step with a reason.
Data sources with dates, and sources for the law.
What your Maths IA graph could look like
proportions, not countsMade-up data shares, to show the form of a strong graph. example only
- Proportions (not counts) let data sets of different sizes sit on the same graph.
- Error bars show sampling error, which shrinks as the sample grows.
- The flat line shows what 'no pattern' would look like.
- Join the Benford points only if you say it is a guide to the eye: digits are discrete.
- Another graph to consider: deviation from the Benford share for each digit, which shows which digits drive the chi-squared value.
Is the sample big enough?
check YOUR sample size!Chi-squared tests need expected counts in each cell (a common rule of thumb is 5 or more). Digit 9 has the smallest predicted share, so it limits you. Check your own sample against this.
Your game plan
Tick steps off as you go. We'll remember on this device.
0 of 10 done
- Read about the lawFind the formula and a source for why it arises. Calculate the nine shares yourself before looking at any data.
- Choose data setsPick at least three from different fields. For each, write one sentence on why you expect it to fit or not.
- Trial runTake 50 numbers from one set and count first digits by hand. Check for traps such as numbers starting 0.0 or negative values.
- Collect dataDownload, clean and record. Note units, dates and anything excluded, with reasons.
- Extract digitsDecide how you will pull first digits accurately (with a formula or by code) and check some by eye.
- Test the fitChi-squared goodness of fit for each set. Check expected counts and say what you did if they were too small.
- Look beyond pAdd a second measure of distance and graph shares with error bars.
- Explain whyUse logarithms to explain why some data fits. Check each step is justified.
- ReflectWhich data failed, and why? What does 'fits Benford' mean for a data set?
- Write, then cutOne worked chi-squared calculation, then tables for the rest. Define every symbol, then check before your teacher's draft.
Maths you'll need
- Hypothesis testing and chi-squared →
- Exponents and logarithms (AI) →
- Exponentials and logarithms (AA) →
- Using your GDC for statistics →
Traps to avoid in this Maths IA
choose the data for a reason- Picking data sets because they fit, with no reason given.
- Data with a narrow range (heights, ages, exam marks) then being surprised it fails.
- Expected counts under 5 in the chi-squared test.
- Reading a p-value from a huge sample as a small departure.
- Quoting log₁₀(1 + 1/d) with no explanation of where it comes from.
- At HL: a formula and a test with no derivation or justification; criterion E asks for rigour.
- Counting first digits of numbers that start with 0 or decimals without a rule.
More Maths IA ideas like this
- Tie-breaks: do league rules change who wins?●●○
- Markov chains: what is the long-run weather?●●●
- Card and dice games: what is the best strategy?●○○
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.