t-test (AI HL)
A t-test decides whether a sample gives enough evidence that a population mean differs from a claimed value, when the standard deviation is not known. You state and , find the p-value, and compare it with the significance level to reach a conclusion in context. It covers one-sample and paired tests. It's part of the broader Hypothesis Testing topic.
18 questions on this sub-topic.
Syllabus
| Code | Syllabus content |
|---|---|
| SL4.11 | Formulation of null and alternative hypotheses ( and ), significance levels and p-values. The test for independence (contingency tables, degrees of freedom, critical value) and the goodness-of-fit test - only upper-tail tests at common significance levels (1%, 5%, 10%) are set, and expected frequencies must be greater than 5. |
Official IB source: Mathematics: applications and interpretation subject brief (PDF, ibo.org).
Skills practised on this page:
- Formulate a null and alternative hypothesis for a given context, as an equation, inequality, or in words.
- Compare a p-value to a given significance level and state a conclusion in context.
The decision rule
Your GDC runs the t-test itself; you supply the hypotheses and the conclusion.
Decision rule
Reject if significance level
Not in the formula booklet - this is the rule that applies to every hypothesis test on the course, not just the t-test.
Degrees of freedom (one-sample)
Not in the formula booklet. The GDC works this out for you when you enter the sample size, but you should be able to state it.
Need the full syllabus wording and formula-booklet reference table? See Hypothesis Testing.
Key terms
What are the null and alternative hypotheses?
The null hypothesis is the claim assumed true, such as a stated mean. The alternative hypothesis is what the evidence is tested for, and it decides whether the test is one-tailed or two-tailed.
e.g. To test whether a mean exceeds , write and .
What is a p-value?
A p-value is the probability of obtaining a result at least as extreme as the sample, assuming is true. A small p-value is evidence against .
e.g. A p-value of is less than , so is rejected at the 5% level.
What is a paired t-test?
A paired test is used when each observation has a matching partner, such as before and after measurements on the same people. Find the difference for each pair, then carry out a one-sample test on those differences.
e.g. Scores and before, and and after, give differences and , and the test is carried out on these differences.
What is a significance level?
The significance level is the probability, chosen before the test, of rejecting when it is actually true. Common choices are 1%, 5% and 10%.
e.g. At the 5% significance level, the cut-off for the p-value is .
Worked examples
A two-tailed test gives a p-value of 0.08.
(a) State whether is rejected at the 5% level.
(b)(i) If the equivalent one-tailed test were appropriate and the sample is in the predicted direction, find the one-tailed p-value.
(b)(ii) State the conclusion at the 5% level.
Worked solution
(a) , so do not reject . M1 A1
(b)(i) One-tailed A1
(b)(ii) Result: , so reject . A1On the GDC. Halve the two-tailed p-value to get the one-tailed p-value The calculator shows about 0.04. The calculator steps below are for (b)(i).
A sample of has mean and Test, at the 5% level, whether the population mean exceeds 50.
(a)(i) State
(a)(ii) State
(a)(iii) Find the p-value.
(a)(iv) State the conclusion, in context.
Worked solution
(a)(i) A1
(a)(ii) A1
(a)(iii) One-sample -test on the graphic display calculator with against : M1
A1
(a)(iv) Since , R1 do not reject : insufficient evidence the mean exceeds 50. A1On the GDC. Test against given , , , and find the p-value. The calculator shows about 0.0762. The calculator steps below are for (a)(iii).
A researcher tests whether favourite music genre is associated with age group.
(a) State
(b) State
Worked solution
(a) Standard independence hypotheses: R1
: music genre and age group are independent. R1
(b) : music genre and age group are not independent (associated). A1
Note. Hypotheses describe the populations, not the sample data.On the GDC. Enter the observed/contingency table and run the χ test for the statistic, p-value and df (expected frequencies are produced too).
Casio fx-CG50: Statistics → TEST → CHI → 2WAY / GOF.
Casio fx-CG100: HOME → Statistics → Setup tab → Hypothesis Test → chi-squared Test.
TI-Nspire CX: menu → Statistics → Stat Tests → χ 2-way / GOF.
Common mistakes
- Forgetting to state the conclusion in context. "Reject " alone rarely earns full marks - the final answer needs to say what that means for the actual situation, e.g. "there is evidence the mean exceeds 50."
- Using the wrong t-test for paired data. If the same individuals are measured twice (before/after), it's a paired t-test on the differences, not a two-sample test on two independent groups.
- Mixing up one-tailed and two-tailed p-values. A two-tailed p-value must be halved before comparing it to a one-tailed significance level, and only when the sample result is in the predicted direction.
Using your GDC
Every step below is a real button sequence, not a vague "use your calculator" hint - covering the TI-84 Plus, TI-Nspire, and Casio fx-9860/fx-CG50. Pick your model to filter down to just the steps that apply to you.
Needed before most t-tests - to find or confirm the sample mean and standard deviation you'll feed into the test.
- Enter the data into a list.
- STAT → Edit → type values into L1. Then STAT → CALC → 1:1-Var Stats, choose L1, Calculate.TI-84
- Add a Lists & Spreadsheet page, name a column and enter data; then a Calculator page → menu → Statistics → Stat Calculations → One-Variable Statistics.Nspire
- Statistics menu → enter data in List 1 → CALC (F2) → 1-VAR.Casio
- Read (mean), (sample sd) or (population sd), and the five-number summary.
- For frequency data, put values in one list and frequencies in another and set the frequency list.
Tip: vs : use (population) for a complete data set, (sample) for a sample. A t-test always uses the sample standard deviation.
Underpins normal-based hypothesis tests and critical-value questions - converts a significance level into a critical z-value.
- Work out the area to the LEFT of the value you want.
- 2nd → VARS (DISTR) → invNorm(area, μ, σ). Newer OS lets you pick the tail.TI-84
- menu → Probability → Distributions → Inverse Normal; enter the area, μ and σ.Nspire
- Main menu → Statistics → DIST → NORM → InvN; set the tail and enter area, σ, μ.Casio
Tip: invNorm needs the area to the LEFT. For a 5% upper-tail critical value, use area = 0.95.
See the full GDC guide for more calculator models and topics.
Quick questions
When do I use a t-test instead of a z-test?
Use a t-test whenever the population standard deviation is unknown and is estimated from the sample - this is almost every t-test question you'll see on the GDC paper.
What is the decision rule for a hypothesis test?
Reject if the p-value is less than the stated significance level; otherwise do not reject . See the parent topic's GDC guidance for how to run the test itself.
How do I turn a two-tailed p-value into a one-tailed p-value?
If the sample result lies in the direction given by , halve the two-tailed p-value. A two-tailed p-value of gives a one-tailed p-value of .
What does 'do not reject the null hypothesis' mean?
It means the sample does not give enough evidence against , not that has been proved true. State it in context, such as that there is insufficient evidence that the mean has changed.
Does the population need to be normal for a t-test?
The test assumes the population is normally distributed, and IB questions state or assume this. The t-distribution is used for any sample size when the standard deviation is not known.
Ready to practise properly?
18 t-test questions, marked instantly like the real exam.