Overview
Use a contingency table to test whether two or more categorical variables are independent: for example, whether handedness is independent of sex. The tests examine the null hypothesis that the frequencies of one variable are independent of the other; a small P value suggests the variables are related, such as left-handedness being more common in one sex than the other.
statistiXL cross-tabulates frequencies and compares the observed counts with the counts expected if the variables were independent, showing observed, expected and observed − expected values for each cell. The help also shows how to use the tests for heterogeneity and subdivided chi-square analyses.
Methods
- Two-way contingency tables
- n-way (three-way and higher) contingency tables
Running the analysis
Enter the data as a cross-tab, for a table of two variables, or as a list with one column per variable and an optional frequency column, for two or more variables.

Click Contingency Tables on the statistiXL ribbon and choose Two-Way or n-Way. In the dialog, select your data and the output location, and set any options.


What the output includes
- A table of observed and expected frequencies and their differences for each cell (optional)
- Chi-square and log-likelihood ratio (G) tests, with degrees of freedom and P values
- For 2 × 2 tables, the Yates and Cochran continuity corrections and Fisher's exact test (one- and two-tailed)
