HomeStatisticsChi-Square Test: Observed vs Expected Frequencies

Chi-Square Test: Observed vs Expected Frequencies

Interactive 3D chi-square goodness-of-fit simulator: draw random samples from a biased or fair categorical generator, watch observed vs expected bars rise, and read a live chi-square statistic, degrees of freedom, p-value and reject/fail-to-reject decision.

Statistics3DModerate60 FPS📱 Mobile-adapted⇄ 2D version
ds-topic-99 ↗ Open standalone

This simulator makes the chi-square goodness-of-fit test tangible: pick a number of categories and a sample size, choose how "loaded" the true generator secretly is, then roll a random sample and watch three bars rise for every category — the expected count under fairness, the actual observed count, and a glowing amber rod showing exactly how much that category contributes to the total χ² statistic. Live readouts track the χ² statistic, degrees of freedom, an approximate p-value, and the α = 0.05 critical value, with a clear reject/fail-to-reject verdict — the same statistical machinery used to test whether a die is fair, a survey matches an expected split, or an A/B test's category counts diverge from chance.

⚙ Under the hood

Draw random samples from a fair or deliberately biased categorical generator and watch a live 3D chi-square goodness-of-fit test: observed vs expected bars, per-category residual contributions, and a reject/fail-to-reject verdict.

chi-squarehypothesis-testinggoodness-of-fitp-valuestatisticscategorical-data

3D · Three.js / WebGL renderer · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)