Understanding the X² Test Statistic
The X² test statistic measures how far observed counts move from expected counts. It is used with count data, not averages. A small value suggests the counts match the model closely. A large value suggests the gap is too large to ignore. This calculator supports common reporting needs. It can compare observed and expected lists. It can also build expected counts from a contingency table.
Why This Calculator Helps
Manual work is simple for one category. It becomes slower when many cells are used. Each cell needs a contribution. Each contribution must be added. A table test also needs row totals, column totals, and degrees of freedom. This page keeps those steps together. It also displays residuals. Residuals show which cells create the biggest difference. That helps explain the result, not just report it.
Goodness Of Fit Use
A goodness of fit test checks one categorical variable. You enter observed counts for each group. Expected counts may come from a fixed theory, a market share, a genetic ratio, or equal distribution. If expected counts are not known, enter weights or probabilities. The calculator scales them to the observed total. You may also subtract estimated parameters from the degrees of freedom.
Independence And Homogeneity Use
A table test checks two categorical dimensions. Independence asks whether two variables are associated. Homogeneity asks whether several groups share the same distribution. The arithmetic is the same. Expected counts are found from row totals and column totals. Each expected count equals row total times column total, divided by the grand total.
Reading The Result
The statistic is compared with a chi square distribution. The p value shows the chance of seeing a statistic this large, assuming the null model is true. When the p value is below alpha, the result is statistically significant. You should still check sample design, expected counts, and practical size. Cramer's V or Cohen's w gives extra context. A clear report should include the test type, statistic, degrees of freedom, p value, alpha, decision, and any important cell residuals. Always avoid using percentages alone. The test needs raw counts. For small samples, combine sparse categories when possible. Use exact methods when assumptions fail badly in practice.