1001Ferramentas
🧪 Calculators

Chi Square Frequency Test Calculator

Computes chi square goodness of fit statistic from observed and expected frequencies of each category for a hypothesis test.

Chi-square test: comparing observed vs. expected frequencies

The chi-square statistic asks a simple question: how far do your observed counts sit from what a hypothesis would predict? You add up χ² = Σ (O − E)² / E across every cell. Karl Pearson introduced it in 1900, and it has been the standard tool for categorical data ever since. The degrees of freedom change with the design. For a goodness-of-fit test with k categories you use df = k − 1; for an r×c independence table it becomes df = (r − 1)(c − 1). As a rough check, keep every expected count at 5 or above, or reach for Fisher's exact test instead. Take a quick example: observed 10, 20, 30, 40 against expected 12, 18, 30, 40 gives χ² = (4/12) + (4/18) + 0 + 0 ≈ 0.556 with df = 3 and p ≈ 0.91, which gives you no reason to doubt the model.

Applications

Checking Mendelian inheritance ratios (3:1, 9:3:3:1). Comparing conversion across A/B variants. Validating random number generators. Deciding whether dice or roulette wheels are fair. Spotting bias in how survey responses are distributed.

FAQ

When does the test fail? Once any cell's expected count slips below 5. At that point you can pool categories, or move to Fisher's exact test for small samples, or use a likelihood ratio G-test.

What does a large χ² mean? Your observed counts are sitting far from the expected ones. Hold that value against the critical value for your df and α (0.05 in most cases). When the p-value falls below α, you reject the null hypothesis that there is no difference.

One-tailed or two-tailed? Chi-square is one-tailed by its nature. Only large values flag a discrepancy, and there is no negative direction to worry about.

What if my data is paired? For 2×2 paired binary data, reach for McNemar's test rather than the standard chi-square independence test.

Related Tools