Definition
The chi-square test works with category counts. The test of independence in a contingency table checks whether two categorical variables are related (gender × product choice); the goodness-of-fit test compares observed counts with expected ones (e.g. a uniform distribution). It measures how much observed frequencies deviate from expected ones.
Statistical tests
The test requires independent observations and sufficient expected counts (rule of thumb: at least 5 per cell). For small 2×2 tables use Fisher's exact test; for paired categories (before/after on the same people) McNemar's test.
A significant result says that an association exists, not how strong it is — strength is expressed by coefficients such as Cramér's V or the odds ratio. For more than two variables or to control for other influences move on to logistic regression or log-linear models.
In Statistica
Contingency tables with the chi-square test, Fisher's exact test, McNemar's test and measures of association (phi, Cramér's V, contingency coefficient) are in Statistics → Basic Statistics/Tables → Tables and banners / Crosstabulation; a 3D histogram or an interaction plot of frequencies complements the table.
Related terms
- Nonparametric testsNonparametric tests do not assume a normal distribution — they work with the ranks of values rather than the values themselves.
- p-valueThe p-value is the probability of obtaining a result at least as extreme as the one observed if the null hypothesis…
- Logistic regressionLogistic regression models the probability of a binary outcome — a patient responds to treatment or not, a customer…
- CorrelationCorrelation measures the strength and direction of a linear relationship between two quantities with a number from −1 to 1.
Knowledgebase guides
FAQ
- What if my table has small counts?
- Fisher's exact test for 2×2 tables, merging sparse categories for larger ones. Statistica warns about low expected counts.
- How do I express the strength of the association?
- With Cramér's V (0 = none, 1 = complete dependence) or, for 2×2 tables, the odds ratio with a confidence interval.
Try it on your own data
Statistica free for 30 days
Full version, no credit card. Or get a pricing estimate in a minute.
Statistical tests
Updated: September 2026.