Hypothesis testing: chi-squared and t-tests
IB Mathematics Applications and Interpretation SLΒ· Unit 4: Statistics and Probability, Section 12Β· 25 min read
1. Core Hypothesis Testing Frameworkβ β ββββ± 5 min
All 3 tests follow the same 5-step standard workflow required for full marks in IB exams: 1) State Hβ and Hβ, 2) Define the significance level Ξ±, 3) Calculate the test statistic and p-value via GDC, 4) Compare p-value to Ξ±, 5) Write a contextual conclusion.
Significance Level
The pre-defined threshold for rejecting the null hypothesis, most commonly 5% (0.05) for IB AI SL questions
A cafΓ© owner claims average daily sales are $1200. A staff member suspects the true average is lower. Write the null and alternative hypotheses for a t-test.
- 1
Define the population parameter first: ΞΌ = true average daily sales at the cafΓ©
- 2
Write Hβ as the statement of no effect, matching the owner's claim:
- 3
Write Hβ as the staff's directional suspicion:
What is the maximum standard significance level used in IB AI SL hypothesis tests?
0.01
0.05
0.10
0.20
Reveal answer
0.05 β5% (0.05) is the default threshold specified in almost all IB AI SL assessment questions
2. Chi-Squared Goodness of Fit Testβ β β βββ± 7 min
This test checks if an observed frequency distribution matches a specified theoretical model (e.g. uniform, binomial, normal). Expected frequencies are calculated by multiplying the total sample size by the theoretical probability for each category.
A 6-sided die is rolled 60 times, with observed frequencies [7, 12, 11, 9, 10, 11]. Test at Ξ±=0.05 if the die is fair.
- 1
State hypotheses: Hβ = die is fair (each outcome has 1/6 probability), Hβ = die is not fair
- 2
Calculate expected frequencies: 60 * 1/6 = 10 for all 6 outcomes
- 3
Calculate degrees of freedom: 6 categories - 1 = 5
- 4
Run test on GDC to get ΟΒ² = 2.0, p-value = 0.849
- 5
Conclusion: 0.849 > 0.05, so there is insufficient evidence to reject Hβ, the die can be assumed fair
Exam tip:
IB exam markers award 1 mark for correctly stating the degrees of freedom, so always write this value explicitly before running your GDC calculation
3. Chi-Squared Test for Independenceβ β β βββ± 7 min
This test checks if two categorical variables are associated, using a contingency table of observed frequencies. Expected frequency for each cell = (row total * column total) / grand total.
A survey tests if snack preference is independent of age group, with a 3-row (age group) x 4-column (snack type) contingency table. Calculate degrees of freedom for the test.
- 1
Identify number of rows r = 3, number of columns c = 4
- 2
Apply the independence test df formula:
4. One-Sample t-Test for Population Meanβ β β β ββ± 6 min
This test compares a sample mean to a hypothesized population mean, used when the population standard deviation is unknown and the data is approximately normally distributed. Degrees of freedom = sample size n - 1.
Sample of 15 students has a mean test score of 72, sβββ = 8. Test at Ξ±=0.05 if the population mean is different from 75.
- 1
State hypotheses: Hβ: ΞΌ =75, Hβ: ΞΌ β 75 (two-tailed test)
- 2
Calculate t-statistic:
- 3
df = 15 - 1 =14, GDC returns p-value = 0.168
- 4
Conclusion: 0.168 > 0.05, insufficient evidence to reject Hβ
5. Common Pitfalls
Wrong move:
Stating 'the null hypothesis is proven true' when p > Ξ±
Why:
You can never confirm the null hypothesis, only find insufficient evidence to reject it
Correct move:
Write 'there is insufficient evidence at the Ξ± significance level to reject the null hypothesis'
Wrong move:
Using population standard deviation instead of sβββ for t-test inputs
Why:
This produces an incorrect z-statistic instead of the required t-statistic, losing method marks
Correct move:
Always select the unbiased sample standard deviation sβββ from your GDC menu
Wrong move:
Forgetting to adjust degrees of freedom after merging categories with expected frequencies <5
Why:
Unadjusted df will return an invalid p-value that does not match IB mark scheme values
Correct move:
Recalculate df using the new smaller number of categories after merging
Wrong move:
Using a one-tailed test for a t-test when no direction is specified in the question
Why:
IB AI SL defaults to two-tailed tests for unstated alternative hypotheses
Correct move:
Confirm the number of tails from the question prompt before running the test on your GDC
Wrong move:
Mixing up goodness of fit and independence test df formulas
Why:
This is the most common mark-losing error for chi-squared questions
Correct move:
Write the df formula explicitly on your working page before calculating the value
6. Quick Reference Cheatsheet
Test Type | Primary Use Case | Degrees of Freedom Formula | Core GDC Inputs |
|---|---|---|---|
Chi-squared Goodness of Fit | Match observed distribution to theoretical model | Observed frequencies, theoretical probabilities | |
Chi-squared Independence | Test association between two categorical variables | Full contingency table of observed values | |
One-sample t-test | Compare sample mean to hypothesized population mean | Sample data, hypothesized population mean |
When this came up on past exams
AI-estimated based on syllabus patterns β cross-check with official past papers for accuracy. Use only as revision-focus signals.
- 2024 Β· Paper 2
Chi-squared independence test for survey data
- 2023 Β· Paper 2
One sample t-test for population mean of test scores
- 2022 Β· Paper 2
Chi-squared goodness of fit for uniform distribution
What's Next
These three hypothesis tests make up ~15% of your total IB Math AI SL assessment marks, and appear on nearly every recent Paper 2. Next, you will practice scenario identification to select the correct test type for mixed question prompts, a skill that trips up 40% of candidates. You will also refine your GDC workflow to avoid common input errors, and practice writing full, mark-aligned conclusions that meet IB examiner standards. This foundation will also support your upcoming work on hypothesis testing for Pearson's correlation coefficient later in the unit.
