In simple terms
A friendly intro before the formal notes — no formulas yet.
From one sample to the whole population
You almost never get to measure a whole population, so you measure a sample and reason back to the population. A confidence interval reports a range of plausible values for the true mean together with how sure you are; a hypothesis test decides whether the sample is surprising enough to overturn a claim. Both are point-and-read on the GDC once you have entered the sample mean, standard deviation and size, so the skill being marked is setting the test up correctly and reading the result honestly.
Think of a food company claiming its cereal boxes hold 500 g. You cannot weigh every box, so you weigh a sample and get an average close to, but not exactly, 500 g. A confidence interval is you saying, 'based on my sample I am 95% confident the true average box weight is between 494 g and 502 g.' A hypothesis test is the sharper question, 'is my sample far enough below 500 g that the company's claim looks wrong, or could this just be sampling luck?' The p-value measures exactly that luck: how easily a sample this extreme could appear if the claim were actually true.
- 1
Read the sample summary. You are given, or you read from a list on the GDC, the sample mean , the sample standard deviation and the sample size .
- 2
Choose the procedure. To estimate a range for , run the confidence interval (t-interval). To test a claim about one mean, run a one-sample -test; to compare two means, run a two-sample -test.
- 3
State hypotheses and read the output. Write and , decide one- or two-tailed, then read the interval, or the -value, straight off the GDC screen.
- 4
Interpret in context. For an interval, say what range the true mean plausibly lies in and how confident you are. For a test, compare with , decide, and translate the decision back into the language of the question.
Explore the concept
Use the live diagram, PhET or GeoGebra sim, and synced steps — play it, drag controls, or tap a step.
Step 1
Read the sample summary. You are given, or you read from a list on the GDC, the sample mean , the sample standard deviation and the sample size .
Key formulas
Tap any symbol to reveal exactly what it means and its units.
Full topic notes
Formal explanation with the rigour you need for the exam.
The confidence interval for a population mean
You want the population mean but you only have a sample. The sample mean is your single best guess, a point estimate, but it is almost never exactly . A confidence interval upgrades that single guess to an honest range: a lower and an upper bound, centred on , together with a confidence level such as 90%, 95% or 99% that reports how reliable the method is. In AI HL you never build the interval by hand; you give the GDC the sample mean, the sample standard deviation and the sample size, choose the confidence level, and read the interval off.
GDC: use the t-interval (interval for a mean, population standard deviation unknown). \n Enter: (sample mean), (sample standard deviation), (sample size), C-Level (e.g. 0.95). \n Structure: interval , where the margin of error and the GDC supplies the factor .
The interpretation must be worded with care. A 95% confidence interval of grams means 'we are 95% confident that the true mean box weight lies between 494 g and 502 g.' It does NOT say that 95% of individual boxes weigh between those values, nor that a particular box has a 95% chance of doing so; the interval is about the mean of the whole population, not about any single member of it. The honest long-run meaning is that if you repeated the sampling many times and built an interval each time, roughly 95% of those intervals would capture the true .
A confidence interval for is a range of plausible values for the true population mean, computed from a sample.
It needs three inputs: the sample mean , the sample standard deviation and the sample size , plus a chosen confidence level .
The interval is centred on ; its half-width (the margin of error) is the standard error scaled by a factor that grows with the confidence level.
Because is unknown but fixed, the confidence is a statement about the method, not about a single interval: over many samples, about of the intervals produced would contain .
What makes the interval wider or narrower
Two levers control the width of a confidence interval, and examiners test whether you know which way each one pushes. The confidence level sets how big a net you cast, and the sample size sets how sharp your estimate is. A third factor, how variable the data is, you usually cannot change, but it matters too.
Higher confidence level wider interval. To be more sure of trapping (95% to 99%), the interval must reach further, so it widens. Lower confidence gives a narrower but riskier interval.
Larger sample size narrower interval. The standard error shrinks as grows, so more data sharpens the estimate. Because of the , quartering the width needs roughly sixteen times the data; halving it needs about four times.
Greater variability () wider interval. Noisier data gives a less precise estimate. You rarely control this, but it explains why two samples of the same size can give intervals of different widths.
Hypothesis testing: the logic
A hypothesis test is a disciplined way to decide whether a claim about a population is contradicted by sample evidence. You set up two competing hypotheses, assume the 'no effect' one is true, and then ask how surprising your sample would be under that assumption. If it would be very surprising, you take that as evidence against the assumption. The whole procedure is built to keep the risk of a false alarm at a level you choose in advance.
The p-value is the single most misread number in the topic, so pin down its meaning: it is the probability of getting a result as extreme as, or more extreme than, the one observed, ASSUMING the null hypothesis is true. It is not the probability that is true, and not the probability that you have made a mistake. A small p-value simply says 'a sample like this would rarely happen if held', which is why a small p-value counts as evidence against .
Null hypothesis : the default 'no effect / no difference' claim, e.g. or . You assume it until the data forces you to abandon it.
Alternative hypothesis : the claim you are testing for. Two-tailed uses ; one-tailed uses or , chosen from the wording.
Significance level : the risk of rejecting when it is actually true. Fixed before the test, usually 0.05, sometimes 0.01 or 0.10.
p-value: the probability, computed by the GDC, of a sample at least as extreme as yours if were true.
Decision: if reject ; if do not reject . Always translate the decision into the context of the question.
The one-sample t-test for a mean
Use a one-sample -test when you want to test whether a single population mean equals some claimed value , using one sample, when the population standard deviation is unknown and so is estimated from the sample. The GDC does the work: you enter the claimed mean , the sample mean, the sample standard deviation, the sample size and the tail, and it returns the p-value. Your job is to frame the hypotheses, pick the tail, and interpret.
One-sample test of a mean against a claimed value : \n \n (two-tailed), or or (one-tailed). \n GDC inputs: , , , , and the chosen tail; output: the -value.
The two-sample t-test for the difference of two means
Use a two-sample -test to compare the means of two independent groups, for example two fertilisers, two teaching methods, or a treatment against a placebo. You have two samples, each with its own mean, standard deviation and size, and you want to know whether the underlying population means differ. The populations are assumed to be normally distributed; you do not need to know their standard deviations. Unless the question tells you the two populations have equal variances, choose the unpooled option ('Pooled: No') on the GDC.
Comparing two population means and : \n \n (two-tailed), or or (one-tailed). \n GDC inputs: each sample's , , ; the chosen tail; Pooled: No (default). Output: the -value.
Common mistakes examiners penalise
Interpreting a confidence interval as being about individuals — a 95% CI for the mean is about the population MEAN , not the spread of individual values, and not the probability for the next single item.
Getting the width effects backwards — a HIGHER confidence level widens the interval and a LARGER sample size narrows it. Saying more confidence makes it narrower, or more data makes it wider, loses the mark.
Choosing the wrong tail — 'different / changed' is two-tailed (); 'greater / less / increased / reduced' is one-tailed ( or ). The wrong tail mis-states and usually changes the p-value.
Not stating or the comparison — you must state the significance level and write the explicit comparison (or ) before deciding. A conclusion with no p-value and no comparison forfeits method marks.
Writing 'accept ' — we never accept . When we 'do not reject ', meaning the evidence was insufficient, not that is proven.
Misdescribing the p-value — it is the probability of data this extreme GIVEN , not the probability that is true and not the probability of an error.
Stopping at 'reject ' — the final mark needs a sentence in context (about box masses, plant heights, and so on), not just the statistical verdict.
Model answer — marked the way our engine marks it
On Paper 2 the marks are analytic: each is tied to a specific line of working. A method mark (M) rewards the correct approach; an accuracy mark (A) rewards a correct result and depends on the method mark it follows; follow-through (FT) means an error made earlier does not have to cost the marks that depend on it, provided the later step is carried out correctly on your own figures. The engine also ignores subsequent working once a correct answer appears, and accepts any equivalent wording. That protection only exists if the reasoning is on the page. Study how each mark below is earned by a specific line.
Where this leads
Confidence intervals and -tests are the working core of inference, and the rest of the statistics course leans on the same habits. The standard error that sets an interval's width is the same quantity that drives every test statistic you meet; the p-value-versus- decision rule reappears unchanged in the chi-squared tests for goodness of fit and independence; and the discipline of stating hypotheses, choosing a tail, reading the GDC and concluding in context is exactly what regression significance and further HL inference reward. Master the two moves here, estimate a mean with an honest interval, and test a claim with an honest p-value, and the inference that follows is variation on a routine you already own.
Worked examples
See the formulas applied — reveal one step at a time, like the exam.
A biologist measures the wingspan of a random sample of 40 butterflies of one species. The sample has mean wingspan 52.4 mm and standard deviation 6.0 mm. \n (a) Find a 95% confidence interval for the mean wingspan of the species. \n (b) Find a 99% confidence interval for . \n (c) Explain, with reference to your answers, the effect of raising the confidence level. [6]
- 1
This is a Paper 2 question, so use the t-interval on the GDC with , , .\n\n**(a) 95% interval.** Enter the summary statistics and C-Level . [M1: correct GDC procedure with the three inputs]\nThe GDC returns mm (3 s.f.). [A1]\n\n**(b) 99% interval.** Keep the same inputs and change C-Level to .\nThe GDC returns mm (3 s.f.). [A1]\n\n**(c) Effect of the confidence level.** The 99% interval, of width about mm, is wider than the 95% interval, of width about mm. [A1: correct comparison of widths]\nRaising the confidence level forces the interval to reach further so that it is more likely to contain the true mean, so greater confidence is bought at the price of a less precise (wider) interval. [R1: correct explanation]\n\nNotice both intervals are centred on the same sample mean mm; only the margin of error changes.
A machine is set to fill bags with a mean mass of 500 g. A quality inspector suspects the setting has drifted. She weighs a random sample of 25 bags and finds a sample mean of 496 g with standard deviation 8 g. Test, at the 5% significance level, whether the mean mass differs from 500 g. [6]
- 1
Let be the true mean mass of all bags filled by the machine.\n\n1. Hypotheses. The word 'differs' signals a two-tailed test:\n\n [A1]\n\n2. Significance level. . [A1]\n\n3. Test on the GDC. Run a one-sample -test with , , , , alternative . [M1: correct procedure and inputs]\n\n4. p-value. The GDC returns (3 s.f.). [A1]\n\n5. Compare and decide. Since , reject . [R1: correct comparison and decision]\n\n6. Conclusion in context. There is sufficient evidence at the 5% significance level to conclude that the mean mass of the bags differs from 500 g, so the inspector's suspicion that the setting has drifted is supported. [A1]
A gardener compares two fertilisers on a plant species. With fertiliser A, a sample of 15 plants has mean height 48.2 cm and standard deviation 5.1 cm. With fertiliser B, a sample of 18 plants has mean height 52.9 cm and standard deviation 4.6 cm. Assuming heights are normally distributed, test at the 5% significance level whether fertiliser B produces a greater mean height than fertiliser A. [6]
- 1
Let and be the true mean heights with fertilisers A and B.\n\n1. Hypotheses. 'Greater' is directional, so this is one-tailed:\n\n (fertiliser B gives the greater mean). [A1]\n\n2. Significance level. . [A1]\n\n3. Test on the GDC. Run a two-sample -test.\nSample A: , , .\nSample B: , , .\nAlternative: ; Pooled: No. [M1: correct procedure, inputs and tail]\n\n4. p-value. The GDC returns (3 s.f.). [A1]\n\n5. Compare and decide. Since , reject . [R1]\n\n6. Conclusion in context. There is sufficient evidence at the 5% significance level to conclude that fertiliser B produces a greater mean plant height than fertiliser A. [A1]
A sample of 30 batteries has a mean life of 42.0 hours with standard deviation 3.5 hours. A 95% confidence interval for the mean life is (40.7, 43.3) hours. Interpret this interval, and state whether it supports a claim that the mean life is 45 hours. [4]
- 1
Model answer — full working.\n\nInterpretation. We are 95% confident that the true mean life of the batteries lies between 40.7 hours and 43.3 hours.\n\nTesting the claim. The claimed mean of 45 hours does not lie in the interval , since .\n\nConclusion. Because 45 is outside the 95% confidence interval, the claim that the mean life is 45 hours is not supported at the 5% level.\n\n---\nHow our marking engine awards the 4 marks:\n\n- M1 — interpretation of the interval. A method mark for correctly reading the interval as a confidence statement about the population MEAN (not individual batteries), framed as 'we are 95% confident the true mean lies in the interval'.\n- A1 — the interpretation stated precisely. Awarded for the completed statement 'we are 95% confident the true mean life lies in hours', with the correct bounds and the correct object (the mean). This accuracy mark depends on the M1 above.\n- M1 — checking the claimed value. A method mark for testing whether 45 lies inside the interval, i.e. comparing 45 with the bounds and observing , so 45 is outside.\n- A1 — conclusion, with follow-through. Awarded for the reasoned conclusion that, since 45 is outside the interval, the 45-hour claim is not supported at the 5% level. This is FT on the candidate's own interval: a student who read slightly different bounds but correctly checked 45 against THEIR interval and drew the matching conclusion still earns it.\n\n**'Accept equivalent forms.'** The engine accepts 'we can be 95% confident', 'the plausible range for the mean is 40.7 to 43.3 hours', and a conclusion phrased either as 'the claim is not supported' or 'there is evidence the mean is not 45 hours'. Once a correct conclusion appears, ISW means a later restatement does not lose marks.\n\nBottom line: of the 4 marks, two are method marks that survive a small numerical slip, and the accuracy marks are shielded by follow-through, but only if you actually write the interpretation and the comparison. A bare 'no, 45 is wrong' with no confidence statement and no comparison risks losing 3 of the 4 marks.
How it all connects
The big idea sits in the middle — tap a linked idea to explore the link.
Tap a linked idea to see how it connects back to the main topic — that connection is what examiners reward.
Glossary
Try to recall each definition before you reveal it.
Quick check
Answer in your head first — then tap to check. No pressure.
Revision flashcards
Flip the card. Test yourself before the exam.
Confidence interval for
A range of plausible values for the unknown population mean, built from a sample. On the GDC you supply , , and the confidence level , and it returns the interval. It is centred on .
Key takeaways
Review these before you close the topic — retrieval beats re-reading.
- ✓
A confidence interval for is a range of plausible values for the true population mean, computed from a sample.
- ✓
It needs three inputs: the sample mean , the sample standard deviation and the sample size , plus a chosen confidence level .
- ✓
The interval is centred on ; its half-width (the margin of error) is the standard error scaled by a factor that grows with the confidence level.
- ✓
Because is unknown but fixed, the confidence is a statement about the method, not about a single interval: over many samples, about of the intervals produced would contain .
Practice — then mark it
The whole point: a real Cambridge question, marked mark-by-mark.
Get a Paper 2 inference question marked: state the hypotheses, read the p-value and conclude with full working
Get a Paper 2 inference question marked: state the hypotheses, read the p-value and conclude with full working
Extra simulations & links
PhET, GeoGebra and other curated tools — open in a new tab.
Frequently asked
Checkpoint
One marked question is worth ten re-reads — close the loop before you move on.
Reading it isn’t knowing it — prove it.
Before you move on: do Get a Paper 2 inference question marked: state the hypotheses, read the p-value and conclude with full working on paper, snap a photo, and get examiner-style feedback on exactly where you win and lose marks.