Overview
A chi test statistic measures how far observed counts move from expected counts. It is useful when data is grouped into categories. This calculator supports goodness of fit tests and contingency table tests. It also gives residuals, contributions, degrees of freedom, and p values. These details help you review more than one final number.
When to Use It
Use a goodness of fit test when one categorical variable has expected proportions. A common example compares survey answers with a planned distribution. Use a test of independence when two categorical variables form a table. Examples include product preference by age group or result type by treatment group. The calculator also works for homogeneity tests, because the table statistic is the same.
Understanding the Output
The chi square statistic adds category contributions. A large contribution shows a cell with a large gap between observed and expected counts. The p value estimates how unusual the statistic is when the null hypothesis is true. If the p value is below alpha, the result is usually called statistically significant. The effect size gives practical context. For goodness of fit, Cohen's w is shown. For tables, Cramer's V is shown.
Good Data Practices
Counts should be raw frequencies, not percentages. Expected counts should usually be at least five. Small expected counts can make the approximation weak. Combine rare categories when it is reasonable and planned. Do not remove categories only to force significance. Your categories should be independent, clear, and mutually exclusive. Always check assumptions before final reporting.
Practical Example
Suppose a school expects equal enrollment in four clubs. Actual counts are 32, 25, 21, and 42. The calculator can compare those counts with equal expected counts. It then shows which club causes the largest contribution. That makes the result easier to explain. The same workflow applies to survey choices, defect categories, genetics examples, and market research tables.
Reporting Tips
Report the test name, statistic, degrees of freedom, p value, alpha, and conclusion. Include effect size when possible. Mention important residuals if they explain the result. For a table, review which rows and columns drive the pattern. For a goodness of fit test, state the expected distribution. Clear reporting makes the conclusion easier to audit.