You can calculate a mean, understand a probability distribution, and use your graphing calculator confidently. But when an IB Maths AI HL question asks you to perform a hypothesis test, you may still be unsure where to begin.
Should you use a chi squared test or a t test? What should your null hypothesis say? How do you interpret a p value? And what exactly does it mean to reject a hypothesis?
These questions are important because hypothesis testing is not just about obtaining a calculator result. You must choose an appropriate statistical test, interpret the evidence, and communicate a conclusion in context.
This guide explains the main ideas behind IB Maths AI HL hypothesis testing, including worked examples, decision rules, and common examination mistakes.
Table of Contents
What is hypothesis testing in IB Maths AI HL?
Hypothesis testing is a statistical method used to evaluate a claim about a population using sample data.
For example, a company claims that its products have an average weight of 500 grams. You collect a sample and investigate whether the evidence suggests that the actual population mean is different.
You cannot usually measure every item in the population. Instead, you use a sample to assess whether the observed results provide sufficient evidence against the original claim.
A hypothesis test begins with two statements:
Null hypothesis, (H_0)
This represents the starting assumption, often stating that there is no difference, no effect, or no association.
Alternative hypothesis, (H_1)
This represents the competing claim that you are investigating.
You then use a statistical test to decide whether the sample provides sufficient evidence to reject the null hypothesis.
The five steps of hypothesis testing
Use this structure when answering an examination question.
- State the hypotheses. Write (H_0) and (H_1) using appropriate statistical notation or words.
- Identify the significance level. For example, a 5% significance level means (\alpha=0.05).
- Choose the appropriate statistical test. Consider the type of data and the claim being investigated.
- Calculate the test statistic or p value. Use the required mathematical method and technology.
- Make a decision and interpret it. Compare the p value with the significance level, then explain the result in the context of the question.
The final step matters. A numerical decision without a contextual conclusion is incomplete.
Understanding significance levels and p values
Before looking at individual tests, understand two important ideas.
What is a significance level?
The significance level is the threshold used to decide whether the evidence is sufficiently strong to reject (H_0).
Common significance levels include:
| Significance level | Decimal form |
|---|---|
| 1% | 0.01 |
| 5% | 0.05 |
| 10% | 0.10 |
For example, if a question specifies a 5% significance level, you compare the p value with 0.05.
What is a p value?
The p value is the probability, assuming the null hypothesis is true, of obtaining a test statistic at least as extreme as the one observed.
It helps you measure how unusual the sample result would be under the null hypothesis.
The decision rule is:
[
p<\alpha \Rightarrow \text{Reject }H_0
]
[
p\geq\alpha \Rightarrow \text{Do not reject }H_0
]
For example, if:
[
p=0.032,\quad \alpha=0.05
]
Then:
[
0.032<0.05
]
You reject the null hypothesis.
If the p value were 0.08 instead, you would not reject the null hypothesis at the 5% significance level.
Important: A p value is not the probability that the null hypothesis is true. It measures how unusual the observed evidence is under the assumption that (H_0) is true.
Chi squared tests in IB Maths AI HL
The chi squared test is used with frequency data.
There are two important types:
- Chi squared goodness of fit test.
- Chi squared test for independence.
Both compare observed frequencies with expected frequencies.
1. Chi squared goodness of fit test
A goodness of fit test investigates whether observed frequencies are consistent with a specified theoretical distribution.
For example, suppose a school believes that students choose three optional subjects in equal proportions.
You collect data and compare the observed choices with the frequencies expected under equal proportions.
The hypotheses might be:
[
H_0:\text{The three choices are equally popular}
]
[
H_1:\text{The three choices are not equally popular}
]
The test evaluates whether the differences between observed and expected frequencies are large enough to provide evidence against the proposed distribution.
The chi squared test statistic is:
[
\chi^2=\sum\frac{(O-E)^2}{E}
]
where:
- (O) is the observed frequency.
- (E) is the expected frequency.
A larger chi squared statistic indicates a greater difference between the observed and expected frequencies.
2. Chi squared test for independence
A test for independence investigates whether two categorical variables are associated.
For example, you might investigate whether students’ year groups are associated with their preferred study methods.
You collect data in a contingency table and compare the observed frequencies with the frequencies expected if the variables were independent.
The hypotheses are:
[
H_0:\text{The variables are independent}
]
[
H_1:\text{The variables are associated}
]
The expected frequency for each cell is calculated using:
[
E=\frac{\text{Row total}\times\text{Column total}}
{\text{Grand total}}
]
The degrees of freedom are:
[
df=(r-1)(c-1)
]
where (r) is the number of rows and (c) is the number of columns.
Worked Example 1: Chi squared test for independence
A school surveys 200 students about their preferred study method.
The students are divided into Year 12 and Year 13 groups.
The observed results are:
| Year group | Notes | Videos | Practice | Total |
|---|---|---|---|---|
| Year 12 | 28 | 22 | 30 | 80 |
| Year 13 | 22 | 38 | 60 | 120 |
| Total | 50 | 60 | 90 | 200 |
At the 5% significance level, investigate whether year group and preferred study method are independent.
Step 1: State the hypotheses
[
H_0:\text{Year group and study method are independent}
]
[
H_1:\text{Year group and study method are associated}
]
The significance level is:
[
\alpha=0.05
]
Step 2: Calculate an expected frequency
For Year 12 students who prefer notes:
[
E=\frac{80\times50}{200}
]
[
E=20
]
Repeat this calculation for every cell.
The expected frequency table is:
| Year group | Notes | Videos | Practice |
|---|---|---|---|
| Year 12 | 20 | 24 | 36 |
| Year 13 | 30 | 36 | 54 |
All expected frequencies are greater than 5.
Step 3: Find the degrees of freedom
There are two rows and three columns, excluding totals.
[
df=(2-1)(3-1)
]
[
\boxed{df=2}
]
Step 4: Calculate the test statistic
Using:
[
\chi^2=\sum\frac{(O-E)^2}{E}
]
Substituting all six observed and expected frequencies gives:
[
\chi^2\approx7.278
]
Using technology, the corresponding upper tail p value is approximately:
[
p=0.0263
]
Step 5: Make the decision
Compare:
[
0.0263<0.05
]
Therefore, reject (H_0).
Conclusion: At the 5% significance level, there is sufficient statistical evidence of an association between year group and preferred study method.
Notice that we do not claim that being in a particular year group causes students to prefer a particular study method. The test establishes evidence of an association, not causation.
Hypothesis testing with the t distribution
The t test is important in the higher level extension of IB Maths AI.
It can be used to investigate a claim about a population mean when the population standard deviation is unknown and a normal population model is appropriate.
The test statistic for a one sample t test is:
[
t=\frac{\bar{x}-\mu_0}{s/\sqrt{n}}
]
where:
- (\bar{x}) is the sample mean.
- (\mu_0) is the hypothesised population mean.
- (s) is the sample standard deviation.
- (n) is the sample size.
The degrees of freedom are:
[
df=n-1
]
The t distribution accounts for the additional uncertainty from estimating the population standard deviation using the sample.
Worked Example 2: One-sample t-test
A manufacturer claims that its products have a mean weight of 50 grams.
A sample of 25 products has:
[
\bar{x}=52.4
]
[
s=6
]
At the 5% significance level, investigate whether there is evidence that the actual population mean weight is greater than 50 grams.
Step 1: State the hypotheses
Let (\mu) represent the population mean weight.
[
H_0:\mu=50
]
[
H_1:\mu>50
]
This is an upper tail test because the alternative hypothesis investigates whether the mean is greater than 50.
Step 2: Calculate the test statistic
Use:
[
t=\frac{\bar{x}-\mu_0}{s/\sqrt n}
]
Substitute the values:
[
t=\frac{52.4-50}{6/\sqrt{25}}
]
[
t=\frac{2.4}{1.2}
]
[
\boxed{t=2}
]
Step 3: Calculate the degrees of freedom
[
df=25-1
]
[
\boxed{df=24}
]
Step 4: Find the p value
Using the t distribution with 24 degrees of freedom, the upper tail p value is approximately:
[
p=0.0285
]
Step 5: Make the decision
The significance level is:
[
\alpha=0.05
]
Since:
[
0.0285<0.05
]
we reject (H_0).
Conclusion: There is sufficient statistical evidence at the 5% significance level that the population mean weight is greater than 50 grams.
Other hypothesis tests included in AI HL
The AI HL syllabus extends beyond the basic chi squared tests and tests involving a population mean.
You should also be aware of the following areas:
| Test or concept | What it investigates |
|---|---|
| Test for a population mean | A claim about the mean of a normal population |
| Test for a proportion | A claim about a population proportion using a binomial distribution |
| Test for a population mean using Poisson | A claim about the mean of a Poisson distribution |
| Test for correlation | Whether the population product moment correlation coefficient is zero |
| Type I and Type II errors | The two possible kinds of decision error in hypothesis testing |
For the AI HL extension, the syllabus includes critical values and critical regions. It also specifies one tailed tests for the binomial and Poisson tests.
You should understand the conditions of each test and be able to choose an appropriate method from the information given in a question.
Type I and Type II errors
Hypothesis testing involves uncertainty. Even when you follow the correct procedure, a decision can be wrong.
There are two important types of error.
Type I error
A Type I error occurs when you reject a null hypothesis that is actually true.
For example, a test concludes that a new teaching method changes average performance when, in reality, it does not.
The significance level controls the probability of a Type I error under the null hypothesis.
Type II error
A Type II error occurs when you do not reject a null hypothesis that is actually false.
For example, a test fails to detect a genuine difference in average performance.
| Reality | Decision | Result |
|---|---|---|
| (H_0) is true | Reject (H_0) | Type I error |
| (H_0) is true | Do not reject (H_0) | Correct decision |
| (H_0) is false | Reject (H_0) | Correct decision |
| (H_0) is false | Do not reject (H_0) | Type II error |
Do not confuse a Type I error with a Type II error. One involves rejecting a true hypothesis, while the other involves failing to reject a false hypothesis.
Common mistakes in IB Maths AI HL hypothesis testing
1. Writing the hypotheses incorrectly
Your hypotheses must describe population parameters or the relationship being tested.
For example, a test about a population mean should use (\mu), not simply the sample mean (\bar{x}).
2. Choosing the wrong statistical test
A chi squared test is used for frequency data, while a t test can be used to investigate a population mean under the appropriate assumptions.
Always identify what type of data the question provides.
3. Confusing the p value with the significance level
The p value comes from the sample evidence. The significance level is chosen or specified before making the decision.
You compare the two. They are not interchangeable.
4. Saying that you have proved the null hypothesis
If the p value is greater than or equal to the significance level, you do not reject (H_0).
This does not prove that (H_0) is true.
5. Forgetting the degrees of freedom
Different tests use different degrees of freedom.
For a one sample t test:
[
df=n-1
]
For a chi squared test for independence:
[
df=(r-1)(c-1)
]
Make sure you use the formula that matches the test.
6. Giving a conclusion without context
Do not finish with only:
“Reject (H_0).”
Explain what the result means in the situation described by the question.
How to practise hypothesis testing effectively
A good revision session should develop both statistical understanding and examination technique.
Try this 60 minute routine:
First 10 minutes: Review the concepts
Revise null hypotheses, alternative hypotheses, significance levels, p values, and the difference between the main statistical tests.
Next 15 minutes: Practise choosing tests
Read several short questions and decide which test is appropriate before performing any calculations.
Next 20 minutes: Complete worked problems
Attempt one chi squared question and one t test question. Write every important step.
Final 15 minutes: Review your mistakes
Check whether your errors came from:
- Incorrect hypotheses.
- Choosing the wrong test.
- Incorrect calculator settings or data entry.
- Misinterpreting the p value.
- Missing degrees of freedom.
- An incomplete conclusion.
This review helps you identify the exact skill that needs more practice.
How Mathzem helps you practise statistics
Hypothesis testing questions often involve several stages. You may choose the correct test but make an error when entering data. Or your calculations may be correct, but your final conclusion may not answer the question.
With Mathzem, you can select IB Mathematics practice questions, solve them independently, and upload your handwritten working for AI Examiner feedback.
The feedback can help you review your mathematical method, identify mistakes, and understand where your solution needs improvement.
This is particularly useful when you want to check more than the final numerical result.
You can also use the Student Dashboard and weakness tracking to review your performance across different topics.
Start with IB Mathematics practice and feedback on Mathzem and focus on writing complete statistical conclusions.
Frequently asked questions about IB Maths AI HL Hypothesis Testing
1. What is hypothesis testing in IB Maths AI HL?
Hypothesis testing uses sample data to evaluate a claim about a population. Students formulate null and alternative hypotheses, apply an appropriate statistical test, and interpret the result using a significance level or critical region.
2. What is the difference between a chi squared test and a t test?
A chi squared test investigates differences between observed and expected frequencies or whether categorical variables are independent. A t test investigates a claim about a population mean when the population standard deviation is unknown and the relevant assumptions are appropriate.
3. How do I know when to reject the null hypothesis?
For a p value approach, reject (H_0) when the p value is smaller than the significance level. Otherwise, do not reject (H_0).
4. What does a 5% significance level mean?
It means that the test is set up with a 5% probability of a Type I error when the null hypothesis is true, under the assumptions of the test.
5. Are chi squared tests included in IB Maths AI HL?
Yes. Chi squared tests for independence and goodness of fit are included in the AI course. AI HL also includes additional statistical hypothesis tests.
6. Do I need a calculator for hypothesis testing?
Technology is an important part of AI Mathematics. Students are expected to use technology for relevant statistical calculations, including chi squared statistics and p values. You should still understand the hypotheses, test selection, decision rule, and conclusion.
Final thoughts
Hypothesis testing becomes easier when you understand the purpose of each stage.
Start by identifying the population claim. Write the hypotheses, choose the appropriate test, calculate the relevant statistic or p value, and compare the result with the significance level.
Then explain what your decision means in context.
Do not treat a calculator result as the complete answer. The statistical reasoning and conclusion are just as important.
Practise different types of hypothesis tests, review your working, and make sure you can explain why your chosen test is appropriate.
Practise IB Maths with Mathzem, upload your working, and learn from the mistakes that affect your results.




