Chi Square Distribution

The chi-squared distribution is frequently encountered when testing hypotheses about model parameters

Owais Siddiqui
22 Sept 2022
1 min read
Updated

The chi-square distribution is a key probability distribution in statistics — the engine behind some of the most widely-used statistical tests, including tests of whether data fits an expected pattern and whether two characteristics are related. This guide explains what the chi-square distribution is, its properties, and the tests it underpins — in clear, plain language. It complements our guides to the t-distribution and the Central Limit Theorem, and is relevant to anyone studying statistics or quantitative finance.

What is the chi-square distribution?

The chi-square (χ2) distribution is a continuous probability distribution that arises when you add up the squares of independent standard normal variables. Because it's built from squared values, it is always non-negative (it only takes values of zero or above). Its shape is right-skewed — especially when there are few degrees of freedom — with a long tail to the right, though it becomes more symmetric and bell-like as the degrees of freedom increase.

The role of degrees of freedom

Like the t-distribution, the chi-square distribution is defined by its degrees of freedom. The degrees of freedom determine its exact shape: with few degrees of freedom, the distribution is heavily skewed to the right; as the degrees of freedom increase, it spreads out and becomes more symmetric, gradually resembling a normal distribution. The degrees of freedom in a chi-square test depend on the specific test and the size of the data — for example, on the number of categories or the dimensions of a table.

The tests it underpins

The chi-square distribution is best known for the statistical tests it makes possible:

  • Goodness-of-fit test — tests whether observed data matches an expected distribution (for example, whether a die is fair, or whether data follows a particular pattern).
  • Test of independence — tests whether two categorical variables are related, using a contingency table (for example, whether a customer's region is related to the product they choose).
  • Test about a variance — used in inference about the variance of a normally-distributed population.

In each case, you compare observed values with expected values, and the chi-square statistic measures how far apart they are — a large value suggesting the observed data is unlikely under the assumption being tested.

How a chi-square test works

The general logic is to calculate a chi-square statistic that sums up the squared differences between observed and expected values (each scaled by the expected value), then compare it against the chi-square distribution with the appropriate degrees of freedom. If the statistic is large — falling in the far right tail — it means the observed data differs from what was expected by more than chance would comfortably explain, so you reject the hypothesis being tested. If it's small, the data is consistent with the hypothesis. This compare-observed-to-expected approach is what makes the chi-square test so versatile across categorical data.

A simple example

Suppose you roll a die 60 times to test whether it's fair. If it were fair, you'd expect each face to come up 10 times. Say you observe: 8, 9, 12, 11, 7, 13. The chi-square statistic adds up the scaled squared gaps between observed and expected — for each face, (observed − expected)2 ÷ expected — giving a single number that measures how far the results stray from a perfectly fair die. You then compare that number against the chi-square distribution (here with 5 degrees of freedom, one less than the six categories). A large statistic would suggest the die is biased; a small one would be consistent with it being fair. That observed-vs-expected comparison is the heart of every chi-square test.

Where it's used

Chi-square tests are used widely across research, business and finance. They're a standard tool for analysing categorical data — survey responses, classifications, contingency tables — and for checking whether data fits an assumed distribution, which matters in model validation. In finance, this includes testing whether returns or other data follow an assumed distribution, and analysing relationships between categorical variables. Wherever you need to compare observed counts against expectations, the chi-square distribution is likely involved.

Frequently asked questions

What is the chi-square distribution?

A continuous, always-non-negative, right-skewed probability distribution that arises from summing the squares of independent standard normal variables, defined by its degrees of freedom.

What is a chi-square test used for?

Mainly goodness-of-fit tests (does data match an expected distribution?), tests of independence (are two categorical variables related?), and inference about a variance.

How does a chi-square test work?

It calculates a statistic summing the scaled squared differences between observed and expected values, then compares it against the chi-square distribution — a large value suggests the data differs from expectation by more than chance.

Why is the chi-square distribution always positive?

Because it's built from squared values (squares of standard normal variables), and squares can't be negative — so the distribution only takes values of zero or above.

Build your quantitative skills with Learnsignal

Statistical tools like the chi-square distribution underpin data analysis and finance. Learnsignal's tutor-led ACCA and CIMA courses build the quantitative foundations behind them — with flexible, supported online study that fits around work.

This page was last updated:

Owais Siddiqui

Expert Tutor at Learnsignal

Qualified professional with years of experience in teaching and helping students achieve their accounting qualifications.

View all posts by Owais Siddiqui

Subscribe to Our Newsletter

Join over 30,000+ Learnsignal students and get regular insights delivered to your inbox.

Ready to Start Your Risk & Quantitative Finance Journey?

Join thousands of successful students who have achieved their qualifications with Learnsignal.

Ready to get started?

Join 100,000+ students across 130 countries. Choose a plan that fits your goals — cancel anytime.

View Pricing