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
Related Radiopaedia articles
- clinical trials
- descriptive studies
- sensitivity and specificity
- positive predictive value (PPV)
- negative predictive value (NPV)
- likelihood ratio (LR)
- normal distribution
- type I error
- type II error
- confidence interval
- ROC curve
- retrospective studies
- prospective studies
- analyzes of variance
- nonparametric statistics
- cognitive bias in image perception