HL AI · Stats

Hypothesis testing in IB Maths: chi-squared and t-tests demystified

07 Aug 2026 · by Pete Bromfield · 8 min read

In my decade-plus experience teaching IB Mathematics, I have seen many students grapple with hypothesis testing. It is a topic that can feel abstract, full of Greek letters and statistical jargon. Yet, it is also one of the most practical areas of the syllabus, equipping you with the tools to make data-driven decisions in almost any field, from scientific research to business analysis. Understanding hypothesis testing is not just about passing an exam; it is about developing a critical approach to information.

My goal here is to demystify the core concepts behind chi-squared tests and t-tests, which are central to hypothesis testing in both the IB Applications and Interpretation (AI) SL/HL and Analysis and Approaches (AA) HL courses. We will break down when to use each test, what they tell you, and how to approach them systematically, as I teach my students in the classroom. This isn't about memorizing formulas; it's about grasping the underlying logic.

The Foundational Principles of Hypothesis Testing

At its heart, hypothesis testing is a method for making decisions about a population parameter based on sample data. We start by formulating two opposing statements about the population: the null hypothesis ($H_0$) and the alternative hypothesis ($H_1$).

Once we have our hypotheses, we collect sample data and calculate a test statistic. This statistic measures how far our observed sample data deviates from what we would expect if the null hypothesis were true. We then compare this test statistic to a critical value or, more commonly in IB, use its corresponding p-value.

The significance level ($\alpha$) is a pre-determined threshold, typically 5% (0.05) or 1% (0.01). It represents the probability of rejecting the null hypothesis when it is actually true (a Type I error). The p-value is the probability of observing our sample data (or more extreme data) if the null hypothesis were true.

My students learn this decision rule: If the p-value is less than $\alpha$, we reject $H_0$. This suggests that our observed data is unlikely to have occurred by chance if $H_0$ were true, giving us evidence in favor of $H_1$. If the p-value is greater than or equal to $\alpha$, we fail to reject $H_0$. This means our data does not provide sufficient evidence to conclude that $H_0$ is false.

Tip: Always state your hypotheses, significance level, and conclusion in context. Simply saying "reject $H_0$" isn't enough; explain what that means for the problem you are solving.

Chi-Squared Tests: Analyzing Categorical Data

Chi-squared ($\chi^2$) tests are designed for categorical data. In my classroom, I emphasize that these tests help us answer questions about frequencies or counts. The IB syllabus covers two main types:

Chi-Squared Test for Goodness of Fit (AI SL/HL, AA HL)

This test determines whether an observed frequency distribution matches an expected distribution. For example, I might ask my students to test if a die is fair by rolling it 60 times and comparing the observed counts for each face to the expected count of 10 for each face. The null hypothesis, $H_0$, would state that the observed distribution fits the expected distribution (e.g., "the die is fair"), while $H_1$ would state it does not.

The chi-squared test statistic is calculated as:

$$\chi^2 = \sum \frac{(O_i - E_i)^2}{E_i}$$

where $O_i$ are the observed frequencies and $E_i$ are the expected frequencies for each category. The degrees of freedom for a goodness of fit test are $n-1$, where $n$ is the number of categories.

Chi-Squared Test for Independence (AI SL/HL, AA HL)

This test determines whether two categorical variables are independent of each other. For instance, I might survey my students to see if there is a relationship between their preferred study method (e.g., flashcards, group work, individual notes) and their performance on a recent test. $H_0$ would state that the two variables are independent (e.g., "study method and test performance are independent"), and $H_1$ would state they are not.

For a test of independence, we construct a contingency table of observed frequencies. The expected frequencies for each cell are calculated using the formula:

$$E = \frac{\text{row total} \times \text{column total}}{\text{grand total}}$$

The $\chi^2$ statistic is calculated using the same formula as for goodness of fit. The degrees of freedom for a test of independence are $(r-1)(c-1)$, where $r$ is the number of rows and $c$ is the number of columns in the contingency table.

In both cases, after calculating the $\chi^2$ statistic (often with the help of a Casio fx-CG50 or TI-84 calculator), we find the p-value and compare it to our chosen significance level $\alpha$. My students regularly practice using their calculators to execute these tests efficiently, as manual calculation of expected frequencies and the sum can be time-consuming in an exam.

T-Tests: Comparing Means

T-tests are used when we want to compare the means of one or two small samples (typically less than 30) or when the population standard deviation is unknown. These tests are particularly prominent in the AI courses (SL/HL) but also appear in AA HL.

The underlying assumption for t-tests is that the data comes from a population that is approximately normally distributed. If the sample size is large enough (generally $n \ge 30$), the Central Limit Theorem helps mitigate deviations from normality.

One-Sample T-Test (AI SL/HL, AA HL)

This tests if the mean of a single sample ($\bar{x}$) is significantly different from a known or hypothesized population mean ($\mu$). For example, I might test if the average score on a practice paper for my current class is significantly different from the historical average score for all previous classes. $H_0: \mu = \text{historical mean}$ and $H_1: \mu \neq \text{historical mean}$ (or one-sided, $\mu > \text{historical mean}$ or $\mu < \text{historical mean}$). The degrees of freedom are $n-1$, where $n$ is the sample size.

Two-Sample (Independent) T-Test (AI SL/HL, AA HL)

This compares the means of two independent groups to see if they are significantly different. For example, I might want to compare the average test scores of students who used my IB Maths flashcards versus those who did not. $H_0: \mu_1 = \mu_2$ and $H_1: \mu_1 \neq \mu_2$. This test assumes that the population variances are either equal (pooled variance) or unequal. The degrees of freedom are typically $n_1 + n_2 - 2$ for pooled variance, or a more complex calculation for unequal variances (which calculators handle automatically).

Paired T-Test (AI SL/HL, AA HL)

This is used when data points in two samples are related or dependent, such as "before and after" measurements on the same subjects, or measurements on matched pairs. For example, I might test if a specific revision intervention improves student scores by comparing each student's score before and after the intervention. Here, we are testing if the mean difference ($\mu_d$) is significantly different from zero. $H_0: \mu_d = 0$ and $H_1: \mu_d \neq 0$. The degrees of freedom are $n-1$, where $n$ is the number of pairs.

Calculating the t-statistic manually for these tests is cumbersome. Fortunately, IB exams expect you to use your calculator's statistical functions. The key is to correctly identify which t-test is appropriate for the given scenario and correctly input the data and hypotheses. I always tell my students that context is king: understand what the numbers represent before drawing conclusions.

Navigating the IB Exam with Hypothesis Tests

Exam questions involving hypothesis testing typically follow a predictable structure. My students are trained to approach them systematically:

  1. State Hypotheses: Clearly define $H_0$ and $H_1$ in terms of the population parameter and the problem context.
  2. State Significance Level: Identify the given $\alpha$. If not given, assume 5% (0.05).
  3. Identify Test and Assumptions: Determine if it's a chi-squared or t-test (and which type). Briefly check if assumptions are met (e.g., sufficient sample size for normal approximation, expected frequencies $\ge 5$ for chi-squared).
  4. Calculate Test Statistic/p-value: Use your graphic display calculator (GDC) for this. This is where proficiency with your specific model (Casio fx-CG50 users, pay attention to the menu options!) is vital.
  5. Make Decision: Compare the p-value to $\alpha$. Reject $H_0$ if $p < \alpha$, otherwise fail to reject $H_0$.
  6. State Conclusion in Context: This is crucial for full marks. Explain what your decision means in relation to the original problem. For instance, "There is sufficient evidence at the 5% significance level to suggest that the mean scores of the two groups are different."

A common trap I observe is misinterpreting the p-value or making a decision without connecting it back to the real-world scenario. Remember, failing to reject $H_0$ does not mean $H_0$ is true; it simply means we don't have enough evidence to prove it false. It's like a "not guilty" verdict in court – it doesn't mean the person is innocent, just that there wasn't enough evidence to convict.

Mastering hypothesis testing requires consistent practice and a clear conceptual understanding. Reviewing the specific formulas and conditions on IB Maths flashcards can reinforce the details, but it's the application that builds confidence. Don't just plug numbers into your calculator; understand what those numbers are telling you.

Hypothesis testing is a cornerstone of statistical inference and a valuable skill that extends far beyond the IB diploma. By understanding chi-squared and t-tests, you are not just learning to pass an exam; you are learning to question data, evaluate claims, and make informed judgments. This analytical mindset is precisely what the IB curriculum aims to cultivate.

My advice remains consistent: practice, practice, practice. Work through past paper questions, paying close attention to the wording and the context provided. When you encounter a hypothesis testing problem, pause and identify the variables, the type of data, and the question being asked. This systematic approach, honed through regular engagement, will allow you to confidently tackle any hypothesis testing problem thrown your way.

Want to actually drill this?

Every IB Maths topic on this page has a full practice engine at ibmathrevision.com — with AI grading trained on real IB mark schemes.

Get access →