What would you like to understand?

Popular destinationsCalculatorsCoursesPracticeFormulas

Unlock Premium Help

Explore every tutor and study workspace for seven days, with no daily AI cap during the trial.

Choose a billing period
Ask a parent to pay

Nothing is charged during the first seven days. Unless you cancel, the plan you selected begins when the trial ends and renews on its stated schedule. Manage cancellation from your plan page. Stripe handles the payment details.

Chi-square statistic formula: what it means and how to use it

Compare observed categorical counts with counts expected under a null model. This hypothesis tests relationship belongs to statistics. Read the symbols against the problem, confirm the required conditions, and estimate the scale before calculating.

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

Define the population, event, or assumptions first

It assumes independent counts and expected values large enough for the chi-square curve to approximate the true distribution, usually taken as every expected count at least 5. With expected counts of 1 or 2 the p-value can be far off, and an exact test such as Fisher's is the right tool instead.

What each quantity represents in Chi-square statistic

Name the experiment or data-generating process, distinguish sample information from population parameters, and state the event or estimate in words. Rebuild missing background in the statistics subject guide, then use statistics practice to retrieve the relationship without being told its name.

Interpret a complete Chi-square statistic calculation

The numerical line is only the middle of the answer; connect it back to the event, data, or uncertainty:

\[A cell with $O=12,E=10$ contributes $(12-10)^2/10=0.4$.\]

Compute without losing the statistical question

  1. Name the unknown, and the unit the answer has to come out in.
  2. Match the symbols to your values. $O$ and $E$ are observed and expected cell counts.
  3. Check the conditions before substituting. Counts must be independent and expected counts sufficiently large for the chi-square approximation.
  4. Substitute, keep exact values to the last line, then test the sign, size, and unit against a rough estimate - The check that catches most statistics slips.

Check the range, direction, and interpretation

After using Chi-square statistic, repeat the calculation with units attached and test the result against a boundary case or a quick numerical estimate.

An inference this formula does not justify

What goes wrong: Entering percentages into the table rather than raw counts.

Why it fails: Percentages throw away the sample size, which is the only thing that makes a gap convincing. Sixty against fifty out of 100 contributes 2 to the total, but 600 against 500 out of 1000 contributes 20.

Repair: Always build the table from actual frequencies. Convert to percentages afterwards for describing the result, never before computing it.

Questions about interpreting Chi-square statistic

Which number goes in the denominator, observed or expected?

Always expected. It sets the scale that the gap is being judged against, and using the observed count instead changes the answer and breaks the reference distribution.

How do I compute the expected counts for a two-way table?

Multiply the row total by the column total and divide by the grand total. That is what the counts would look like if the two variables carried no information about each other.

How many degrees of freedom should I use?

For a goodness-of-fit test it is the number of categories minus one. For a two-way table it is the rows minus one times the columns minus one.

Can the statistic come out negative?

No. Every term is a square divided by a positive expected count, so the total is zero or more, and zero would mean the observed counts matched the model exactly.

Make it yours

Change one input, predict whether the output should rise, fall, or stay fixed, and only then recalculate.