Interquartile range
Definition taught in Descriptive statistics, part of Data analysis
Interquartile range

| 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 95The 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
- Taught in Descriptive statistics, where the derivation and examples are.
- All 2 questions on Descriptive statistics
See also
Sample quantile · Five-number summary and boxplot · Sample variance and standard deviation · Normal quantile plot