Interquartile range

Definition taught in Descriptive statistics, part of Data analysis

Interquartile range

Serum creatinine for the 299 patients. From Descriptive statistics.
Type Definition
Taught in Descriptive statistics
Part Data analysis
Worked examples 1

The interquartile range is the difference between the third and first quartiles. It is the width of the central half of the sample.

Examples

The ages of 299 patients

Worked example from Descriptive statistics

Question. Summarise the patients’ ages.

Solution.

mean(heart$age); median(heart$age)     # 60.83  60
quantile(heart$age, c(0.25, 0.75))     # 51  70
IQR(heart$age)                          # 19
sd(heart$age)                           # 11.89
range(heart$age)                        # 40  95

The patients are aged 40 to 95. The mean and median are close, 60.8 and 60, so the ages are roughly symmetric. The middle half lies between 51 and 70, an interquartile range of 19 years, and the standard deviation is 11.9 years. For a roughly normal sample the interquartile range is about 1.35 standard deviations; here 19/11.9=1.6, so the ages are a little flatter than normal.

Used in

See also

Sample quantile · Five-number summary and boxplot · Sample variance and standard deviation · Normal quantile plot

Glossary and index