# Chi-squared test

The chi-squared test is one of the most common statistical tests found in radiology research. It is a type of nonparametric test, used with two categorical variables (not continuous variables).

#### Concept

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).

1. 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.
2. Then fill in the actual values that you found from your study ("observed values", Oi).
3. 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 these maneuver is

###### x2 = Σ ([Oi - Ei]2 / Ei)

This results in a chi-squared number (x2), which can be checked in a table for significance. The degree of freedom for a 2 x 2 table is 1. If the x2 value is above the level in the table, then we can reject the null hypothesis (no association between the variables).

#### Points

• 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 nonparametric tests that compare medians, not means

## Article information

rID: 35441
Synonyms or Alternate Spellings:
• Chi square test
• Chi squared
• Chi square

## Cases and figures

• Figure 1: chi-squared test
Drag here to reorder.

Unable to process the form. Check for errors and try again.

Thank you for updating your details.