Chi-Square Goodness-of-Fit SimulationStatLens

Simulated samples

Select a dataset, then draw simulated samples to build the null distribution.

Chi-Square Goodness-of-Fit Simulation

Compare one categorical variable's observed counts to a hypothesized distribution (H0). The tool repeatedly draws a fresh sample of the same size from H0, computes the χ2 statistic each time, and builds the null distribution. Your observed χ2 is marked on it — the p-value is the fraction of simulated samples at least that large.

1
+1 sample
2
+10 samples
3
+100 samples
4
+1000 samples
0
Reset
Space
Play / Pause
?
Show this help
Esc
Close this dialog

New to this tool? Walk through it step by step.

Open guided walkthrough ↗