Master the Chi-Square Test

An interactive toolkit for comparing categorical data, analyzing sample independence, and calculating confidence intervals for proportions.

Concept Lab

Before calculating, understand the mechanics. The Chi-Square ($\chi^2$) test measures how expectations compare to actual observed data. Use the interactive graph below to see how the "Degrees of Freedom" ($df$) changes the probability distribution.

The Chi-Square Distribution

Current df: 3

Notice how lower $df$ curves skew heavily to the left, while higher $df$ curves become more symmetrical (normal-like).

Null Hypothesis ($H_0$)

Assumes there is no relationship between the variables. Any difference is due to chance.

The Statistic

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

Sum of (Observed - Expected)² divided by Expected.

P-Value

The probability of seeing these results if $H_0$ were true.
P < 0.05 usually means "Significant".

The Analyst (Test of Independence)

Enter your raw count data below. This tool is perfect for analyzing Sample 1 vs Sample 2 scenarios (e.g., Treatment vs Control outcomes). It will automatically calculate the "Expected" values based on row/column totals.

Group / Outcome Totals