Source and clean data, choose and justify a model, judge its fit with residuals and new data, use hypothesis tests with their conditions checked, and use technology while still showing the mathematics.
Most AI explorations either build a model from data or answer a statistical question with data. Both follow the same arc: get trustworthy data, choose a method that suits them for a reason you can state, carry it out correctly, and judge honestly how far the result answers your aim. The mathematics is usually from topics 2 and 4 of the course; what turns it into a strong exploration is the care taken at every step and the reasoning written down alongside it.
Two worked threads run through what follows: one real data set taken through the modelling process (the annual mean concentration of carbon dioxide measured at Mauna Loa, Hawaii) and a hypothetical survey taken through a statistical test. Every number in both can be reproduced with a GDC or a spreadsheet.
Primary data give you full control and can provide strong evidence of personal engagement: you decide what to measure, how and how often, and you know every weakness of the method. The cost is time, and a careful design is needed so that the data are reliable (repeat measurements agree) and valid (they measure what the aim needs). Measurement error, a small sample and a sample that is not representative are the usual problems.
Secondary data are often larger, longer and more accurate than anything a student could collect: decades of climate records, national population figures, sports results. They must be cited, and you must understand how they were collected, because their definitions may not match your question. "Unemployment", "average income" and even "population" are defined differently by different agencies, and a series may change its method part-way through.
Primary data | Secondary data | |
|---|---|---|
Control over what is measured | Full | None: take it as published |
Size | Usually small | Often large |
Time needed | Collection takes weeks | Download in minutes; understanding takes longer |
Main risks | Measurement error, bias in a small sample | Definitions that do not fit, changes of method, unreliable sources |
Evidence of engagement | Strong if the design is explained | Strong if the data are questioned and cleaned |
A primary-data exploration needs a written method before any data are collected. State what will be measured, with what instrument and to what precision; how the sample is chosen (random, stratified, systematic or convenience sampling, from subtopic 4.1) and why; how many observations are needed and why; and how bias will be reduced. Each student collects their own data, even when measurements are taken as a group, and any combining of data is described.
Surveys of people raise extra issues. Questions must be neutral and unambiguous, participants must consent and stay anonymous, and sensitive topics need care or are best avoided. A pilot survey with a few people often shows that a question is misunderstood before it ruins the whole data set.
Good secondary sources publish their methods: national statistics offices, the World Bank, the United Nations, scientific bodies such as NOAA, and sports' official governing bodies. Download the data directly from the source, keep the file, and record the date of access, because many series are revised. Read the notes that come with the data; they often explain gaps, changes of definition and the uncertainty of each value.
Raw data are rarely ready to use. Cleaning means checking and preparing them before any analysis, and every decision you make must be stated in the report, because a reader cannot judge the result without knowing what was removed or changed.
Check units and definitions. Make every value use the same unit (minutes, not a mix of minutes and seconds) and the same definition.
Look for missing values. Decide whether to omit the case, use a different period, or (rarely) estimate the value, and say which and why.
Look for duplicates and typing errors. A height of 1720 cm is almost certainly 172.0 cm; a survey answer recorded twice must be removed once.
Identify outliers. Use a rule such as values more than beyond the quartiles (subtopic 4.3), then investigate each one.
Record what was done. A short table of changes is enough.
The fourth step needs judgement. An outlier caused by an error should be corrected or removed; a genuine but unusual value (a record-breaking race, an unusually hot year) is part of the data, and removing it to improve the fit is not acceptable. If an outlier is kept, the analysis should be repeated without it to see whether the conclusion changes, and the result reported.
A model is chosen for two kinds of reason: what the context says about how the quantity should behave, and what a graph of the data shows. Neither alone is enough. A context argument without a graph can be contradicted by the data; a graph argument without context leads to choosing whatever curve happens to fit, which can behave absurdly outside the data.
Model family | Typical form | Context that suggests it |
|---|---|---|
Linear | Change at a constant rate (cost per item, steady speed) | |
Quadratic | Rate of change itself changing steadily (projectile height, accelerating growth over a limited period) | |
Exponential | Change by a constant percentage (depreciation, compound growth, cooling towards room temperature) | |
Power | Scaling between sizes (area or volume with length, metabolic rate with mass) | |
Sinusoidal | Repeating cycles (tides, daylight hours, temperature over a year) | |
Logistic (HL) | Growth limited by a maximum (spread of a product, a population with a capacity) |
Each model's parameters should mean something in the context. In a linear model of cost, is the cost per item; in an exponential model of depreciation, is the fraction of value kept each year; in a sinusoidal model of daylight, the period should be about a year. Being able to say what each parameter means is strong evidence of understanding.
The annual mean concentration of carbon dioxide in the atmosphere has been measured at the Mauna Loa Observatory in Hawaii since 1958. The aim in this case study is to find a simple function that describes the rise from 1960 to 2015 and to test how well it predicts 2020 and 2025. Let be the number of years after 1960 and the annual mean concentration in parts per million (ppm). Every fifth year is used, to keep the data manageable while covering the whole period.
Year | (ppm) | Year | (ppm) | ||
|---|---|---|---|---|---|
1960 | 0 | 316.91 | 1995 | 35 | 360.97 |
1965 | 5 | 320.04 | 2000 | 40 | 369.71 |
1970 | 10 | 325.68 | 2005 | 45 | 379.98 |
1975 | 15 | 331.13 | 2010 | 50 | 390.10 |
1980 | 20 | 338.76 | 2015 | 55 | 401.01 |
1985 | 25 | 346.35 | 2020 | 60 | 414.21 |
1990 | 30 | 354.45 | 2025 | 65 | 427.35 |
Source: NOAA Global Monitoring Laboratory, Mauna Loa CO₂ annual mean data (data before 1974 from the Scripps Institution of Oceanography), accessed October 2026.
The values for 2020 and 2025 are held back: the models are fitted to the twelve values from 1960 to 2015 only, so that the last two years can test them fairly. A model always fits the data it was built from reasonably well, so only data kept out of the fitting give an independent check of its predictions.
The scatter diagram rises steadily, so a linear model is a natural first try. The regression line of on from the GDC is
The gradient means the concentration rose by about 1.54 ppm a year on average over 1960–2015. A correlation coefficient of 0.993 is very strong, and many explorations stop at this point, which leaves the shape of the model untested.
A residual is the observed value minus the value the model predicts, . If a model has the right shape, the residuals scatter randomly above and below zero; a pattern in them shows that the model's shape is wrong. The residuals of the linear model are positive at both ends and negative in the middle.
The U-shaped pattern means the rate of increase is itself increasing: the concentration is accelerating. A high value of measures only how close the points lie to some straight line; it cannot show that a straight line is the right shape. This is a reason, drawn from the data, to try a model whose rate of change grows with time.
A quadratic model has a rate of change that grows steadily with time, which matches the residual pattern. Fitting it first by hand shows understanding: choose three data points spread across the range (1960, 1990 and 2015) and solve the simultaneous equations they give.
Solving with the GDC's simultaneous-equation solver gives , , (3 s.f. for and ). Quadratic regression on all twelve points, which minimises the sum of the squared residuals, gives
The two quadratics are close, as they should be, and the regression version fits better overall because it uses every point rather than three. Doing both and comparing them is good evidence of understanding. Quadratic regression itself belongs to subtopic 4.13 (HL); at SL, mathematics slightly beyond the course is not penalised, and the fit by hand through three points keeps the method within SL.
Two measures help compare the models on the fitting data. The sum of squared residuals, , is 127.1 for the line and 5.17 for the regression quadratic. The coefficient of determination is 0.985 for the line (equal to ) and 0.999 for the quadratic. Both measures favour the quadratic, but neither settles the question alone: a model with more parameters always fits the same data at least as well, so a quadratic's can never be larger than a line's. and belong to subtopic 4.13 (HL); an SL exploration can use them as long as they are explained, or can compare models with residuals and percentage errors instead.
The fair test is the held-back data. Percentage error compares each prediction with the observed value.
Year | Observed (ppm) | Linear prediction | Error | Quadratic prediction | Error |
|---|---|---|---|---|---|
2020 | 414.21 | 403.00 | −2.7% | 412.17 | −0.5% |
2025 | 427.35 | 410.70 | −3.9% | 424.11 | −0.8% |
The quadratic predicts both test years to within 1%, while the line under-predicts by 3–4% and the gap is growing. That is strong evidence for the quadratic over this period. Both models still under-predict 2025, which suggests the acceleration may itself be increasing, a point that a strong exploration would raise as a limitation and a next step.
The derivative of the regression quadratic, , gives the model's rate of increase: about 0.88 ppm a year in 1960 and about 2.21 ppm a year in 2015. The observed average rise from 2010 to 2015 was ppm a year, which agrees well. Reading the derivative as a rate in ppm per year makes the fitted curve a statement about the atmosphere that can be checked against the data.
The model has clear limits. It describes the annual means, not the seasonal cycle inside each year. It says nothing about causes. Extrapolating it far beyond 2025 assumes that the acceleration continues unchanged, which depends on future emissions, not on mathematics; a parabola also has a minimum (at , around 1924) that has no meaning in the context. Stating such limits, and their effect, is what reflection looks like in a modelling exploration.
Using a model inside the range of the data (interpolation) is usually reliable if the model fits well. Using it outside the range (extrapolation) is risky, because the data give no evidence about behaviour there, and the further out the prediction, the less it can be trusted. A linear model of a child's height that fits ages 2 to 12 well (growth of about 6 cm a year) predicts a height of over 2 metres at age 25. Any prediction outside the data needs a warning and a reason to think the trend continues.
A hypothesis test is only valid when its conditions hold, and checking them is part of the mathematics. The table lists the tests most AI explorations use (subtopics 4.10, 4.11 and, at HL, 4.18) with their main conditions.
Test or measure | Use it for | Conditions to check and state |
|---|---|---|
Pearson's | Strength of a linear relationship | Scatter diagram looks linear; no extreme outliers driving it |
Spearman's | Strength of a monotonic relationship | Data can be ranked; ties given average ranks |
test for independence | Whether two categorical variables are related | Counts, not percentages; every expected frequency greater than 5 |
goodness of fit test | Whether data follow a given distribution | Expected frequencies greater than 5; degrees of freedom reduced for estimated parameters |
t-test (two samples) | Whether two population means differ | Independent random samples; data roughly normal in each group |
When expected frequencies are 5 or less, the statistic is unreliable. The usual remedy is to combine neighbouring categories so that every expected frequency exceeds 5, and to say which were combined and why; if that is impossible, the limitation must be acknowledged. For a t-test with small samples, a histogram or box-and-whisker diagram of each group shows whether normality is plausible.
A test in an exploration is written out in full, in the same order every time:
State and in words and in context.
Choose the significance level before seeing the result, and say why.
Check and state the conditions.
Give the data entered (the observed table, the two samples) and the technology used.
Report the test statistic, the degrees of freedom where relevant, and the p-value.
Compare the p-value with the significance level and conclude in context, without overclaiming.
Three errors of interpretation appear again and again. The first is treating "fail to reject " as proof that is true; it means only that the data are consistent with it. The second is treating a significant result as important: with a large sample, a tiny and practically meaningless difference can be significant. The third is reading correlation as causation: two variables can be strongly correlated because both depend on a third, or by coincidence, so a causal claim needs an argument from the context (or an experiment), not a correlation coefficient.
YouTubeEvaluation runs through the whole exploration, not only the conclusion. After each result, ask how reliable it is and what it changes. The limitations worth discussing are specific to your work, with their likely effect on the conclusion.
Generic (weak) | Specific (strong) |
|---|---|
"More data would make it more accurate." | "Only twelve points were used to fit the models; using every year from 1960 to 2015 would give a better estimate of the quadratic coefficient, though the residual pattern makes it unlikely the choice of model would change." |
"There could be errors in the data." | "The values before 1974 come from a different laboratory's measurements (Scripps) than later years (NOAA); if they were systematically different, the curvature of the model would be affected." |
"The measurements might not be consistent." | "After the 2022 eruption of Mauna Loa, measurements from December 2022 to early July 2023 were taken at a site about 21 miles away, and the most recent year's value is provisional; both could shift the 2025 test value slightly, though not by enough to change the comparison of the models." |
"The sample might be biased." | "Only students present on one day were surveyed, so students absent for sports fixtures, who are more likely to prefer team sport, are under-represented." |
Spreadsheets, GeoGebra, Desmos, Python and the GDC all make an exploration stronger when used well: they handle large data sets, fit models, draw clear graphs and test many cases quickly. Technology is encouraged, and an analytic method is never required for its own sake. What technology cannot do is demonstrate your understanding; that has to be on the page.
Explain before computing. Say what the method does and why it suits the data before showing its output.
Show one instance in full. One residual, one expected frequency, one step of Euler's method, worked by hand; then a table produced by technology.
Say what was entered. "Quadratic regression on the twelve points (t, C) using a spreadsheet's polynomial trendline of order 2" tells the reader exactly what was done.
Write results in mathematical notation. Software syntax such as =LINEST(B2:B13,A2:A13) or y = 0.0121x^2 belongs only in a screenshot, if at all; the text uses .
Interpret every output. A number from software is the start of an argument, not the end.
Primary data give control and engagement but need careful, ethical design; secondary data must come from a reliable source, be understood and be cited.
Clean data before analysis: units, missing values, errors, outliers; investigate outliers rather than deleting them to improve a fit, and record every change.
Choose a model from the context and the shape of the data, and say what each parameter means.
Fit at least one instance by hand where reasonable, then use technology; compare models with residual plots and with data held back from the fitting.
A high or alone does not justify a model; a pattern in the residuals shows the wrong shape, and more parameters always improve the fit to the same data.
Choose tests whose conditions hold (expected frequencies above 5 for , linearity for Pearson's , rough normality for a t-test), set them out fully and conclude in context.
Not rejecting is not proof; significance is not importance; correlation is not causation.
State specific limitations with their effect, and keep the mathematics visible whenever technology does the computing.
With a free account, Augment remembers where you stopped in the notes and which questions you have marked.