All articles
Mathematics
alevel-statistics

Mastering Chi-Squared Tests for A-Level Mathematics

Unlock the essentials of Chi-squared tests for your A-Level statistics exams. Learn how to perform goodness of fit and contingency table tests with step-by-step guidance.

Math Instructor AI 22 September 2026 8 min read

Mastering Chi-Squared Tests for A-Level Mathematics

In A-Level statistics, hypothesis testing is a fundamental skill. While you may be familiar with tests involving the normal distribution, the Chi-squared ($\chi^2$) test is essential for analysing categorical data. Whether you are checking if a die is biased or determining if two variables are independent, the $\chi^2$ test provides a robust framework for statistical inference.

This article will guide you through the two primary applications of the $\chi^2$ test: the Goodness of Fit test and the Test of Independence using contingency tables. By the end, you will understand how to formulate hypotheses, calculate test statistics, and interpret results with confidence.

The Chi-Squared Statistic

The core of any $\chi^2$ test is the calculation of the test statistic, which measures the discrepancy between observed frequencies ($O$) and expected frequencies ($E$). The formula is:

$$\chi^2 = \sum \frac{(O - E)^2}{E}$$

This statistic follows a $\chi^2$ distribution. The larger the value of $\chi^2$, the greater the difference between your observed data and the theoretical model, suggesting that the null hypothesis ($H_0$) is less likely to be true.

Goodness of Fit Tests

A Goodness of Fit test determines whether an observed frequency distribution matches a theoretical distribution (such as a uniform, binomial, or Poisson distribution).

Worked Example: A student rolls a die 60 times to test if it is fair. The results are: 1 (12), 2 (8), 3 (10), 4 (12), 5 (7), 6 (11).

  1. Hypotheses: $H_0$: The die is fair. $H_1$: The die is not fair.
  2. Expected Frequencies: For a fair die, each outcome has a probability of $1/6$. Thus, $E = 60 \times (1/6) = 10$ for each category.
  3. Calculation: $\chi^2 = \frac{(12-10)^2}{10} + \frac{(8-10)^2}{10} + \frac{(10-10)^2}{10} + \frac{(12-10)^2}{10} + \frac{(7-10)^2}{10} + \frac{(11-10)^2}{10}$ $\chi^2 = 0.4 + 0.4 + 0 + 0.4 + 0.9 + 0.1 = 2.2$
  4. Degrees of Freedom: $df = n - 1 = 6 - 1 = 5$.

Contingency Tables and Independence

When you have two categorical variables, you use a contingency table to test for independence. $H_0$ states that the two variables are independent, while $H_1$ states they are associated.

Worked Example: A survey asks 100 people about their preference for tea or coffee across two age groups.

| | Tea | Coffee | Total | |---|---|---|---| | Under 30 | 20 | 30 | 50 | | Over 30 | 40 | 10 | 50 | | Total | 60 | 40 | 100 |

To find the expected value for a cell, use: $E = \frac{\text{Row Total} \times \text{Column Total}}{\text{Grand Total}}$. For the 'Under 30/Tea' cell: $E = (50 \times 60) / 100 = 30$. Repeat this for all cells, calculate $\chi^2$, and compare against the critical value using $df = (r-1)(c-1)$. Here, $df = (2-1)(2-1) = 1$.

Degrees of Freedom and Critical Values

Degrees of freedom ($df$) are crucial for finding the critical value in statistical tables. For Goodness of Fit, $df = n - 1$ (where $n$ is the number of categories). For contingency tables, $df = (r-1)(c-1)$ where $r$ is the number of rows and $c$ is the number of columns. Always ensure your significance level (usually 5% or 0.05) matches the table column.

Common Mistakes

  1. Using Percentages: Always use raw frequencies ($O$ and $E$) in the $\chi^2$ formula, never percentages or proportions.
  2. Incorrect $df$: Confusing the $df$ formula for Goodness of Fit with that of contingency tables is a frequent error.
  3. Small Expected Frequencies: If an expected frequency is less than 5, you should combine adjacent categories to ensure the test remains valid.
  4. Misinterpreting the Null: Remember that $H_0$ is the assumption of 'no difference' or 'independence'.

FAQ

What is the difference between Goodness of Fit and Independence tests? Goodness of Fit tests one variable against a theoretical distribution; Independence tests look for a relationship between two categorical variables.

What happens if my calculated $\chi^2$ is less than the critical value? If $\chi^2 < \text{critical value}$, you fail to reject $H_0$. There is insufficient evidence to suggest a significant difference.

Why must expected frequencies be at least 5? The $\chi^2$ distribution is an approximation. If expected values are too small, the approximation becomes unreliable.

Conclusion

Chi-squared tests are a powerful tool in your A-Level statistics toolkit. By mastering the calculation of expected frequencies and understanding the role of degrees of freedom, you can tackle any exam question on this topic. For a deeper, visual understanding, head over to MathInstructor AI to generate a free animated lesson on Chi-squared tests today.

Topics

chi squared test
goodness of fit
a level statistics
contingency tables
hypothesis testing
alevel-statistics
maths revision
statistical inference

Want this explained out loud?

Turn any question into a narrated, animated lesson in seconds.

Try the Studio free