Statistics

Chi-Square Test of Independence

Test association in a 2 × 2 count table and inspect the smallest expected cell count.

Data stays on this deviceConvention explained below
Data explorer
Data explorer

Check the dataset and sample convention before interpreting results.

See the method

Add your observations

Runs on your device

Your statistical summary

Your result

Let’s calculate.

Use the Calculate button to see your result.

Review the method below for assumptions and conventions.

How to use this tool

  1. Enter row 1, column 1, row 1, column 2, row 2, column 1, row 2, column 2, significance level.
  2. Select Calculate to view the result.
  3. Check the method and assumptions below before using the result.

The method, explained

Expected count = row total × column total / grand total. Pearson χ² = sum[(O−E)²/E], with one degree of freedom. No Yates continuity correction is applied.

A WORKED EXAMPLE

Using row 1, column 1 = 30, row 1, column 2 = 10, row 2, column 1 = 20, row 2, column 2 = 40, significance level = 0.05, the result is 0.0000445570906 probability. Change these example inputs to match your task; use the method above to check each step.

What to keep in mind

Independent observations, each counted once. Approximation can be poor with sparse cells. Association does not establish causation. A descriptive or probability calculation under the stated assumptions. Check the sample design and model before interpreting results.

Reference: NIST: statistical methods handbook

Common questions

What goes into the four cells?

Enter counts for two categories of one variable crossed with two categories of another. Each observation belongs in exactly one cell. Do not enter percentages or row totals.

Is Yates correction applied?

No. This is the uncorrected Pearson test. The result also shows the smallest expected count so you can assess whether the asymptotic approximation is appropriate.

Methodology maintained by ClarityKit. How these tools are built and checked.