Pearson's chi-squared test
Citation, DOI, disclosures and article data
At the time the article was created Matt A. Morgan had no recorded disclosures.View Matt A. Morgan's current disclosures
At the time the article was last revised Candace Makeda Moore had no recorded disclosures.View Candace Makeda Moore's current disclosures
The Pearson's chi-squared test is one of the most common statistical tests found in radiology research. It is a type of non-parametric test, used with two categorical variables (not continuous variables).
The heart of the chi-squared test is a 2 x 2 contingency table.
We usually have a set of patients and a set of controls. We then want to test whether our independent variable is associated with our dependent variable (or not).
- first we fill out the 2 x 2 table as if there were no association ("expected values", Ei). Divide the cases and controls (proportionally) into the four cells of the contingency table.
- then fill in the actual values that you found from your study ("observed values", Oi).
- this is the [Oi - Ei] per cell.
Next, square these [Oi - Ei] values so that the sum does not equal zero.
Finally, divide each [Oi - Ei] value by Ei. This move accounts for the distribution of values around the mean (sort of the standard deviation). The reason this is legitimate is because the values in the table follow a Poisson distribution.
The final result of this maneuver is
χ2 = Σ ([Oi - Ei]2 / Ei)
This results in a chi-squared number (χ2), which can be checked in a table for significance. The degree of freedom for a 2 x 2 table is 1. If the χ2 value is above the level in the table, then we can reject the null hypothesis (no association between the variables).
- chi-squared tests work with categorical variables (e.g. disease vs no disease, got imaging test vs did not get imaging test, etc)
- it is not meant for continuous variables (e.g. length, time, radiation dose, etc)
- chi-squared tests work best with a reasonably high n
- for low n studies, consider other non-parametric tests that compare medians, not means