Interquartile range (IQR)
The interquartile range (IQR) measures the variability in a dataset splitting the dataset into quartiles.
Quartiles divide a rank-ordered dataset into 4 equal portions typically denoted by Q1, Q2 and Q3.
- Q1 is the median, or the “middle” value, of the first half of the dataset
- Q2 is the median of the entire dataset
- Q3 is the median, or the “middle” value, of the second half of the dataset
And the IQR = Q3 – Q1
Interquartile range (IQR) visualized
Say we have the following dataset: 1, 3, 5, 8, 10, 12, 15, 16, 19
The median is 10 as it is the middle number. It has four digits to the left and four digits to the right. The IQR is the difference between the median of the first half of the upper side of the median of the dataset and the median of the lower half of the dataset.
The IQR is usually illustrated graphically with a Boxplot. Let’s see a boxplot illustrating the dataset above: 1, 3, 5, 8, 10, 12, 15, 16, 19:
Learnings on IQR
Khan Academy video: Interquartile range (IQR)
Freelance Data Analyst
+34 616 71 29 85
Spain: Ctra. 404, km 2, 29100 Coín, Malaga
Denmark: c/o Musvitvej 4, 3660 Stenløse
Drop me a line
What are you working on just now? Can I help you, and can you help me?
Learning statistics. Doing statistics. Freelance since 2005. Dane. Living in Spain. With my Spanish wife and two children.
Connect with me
What they say
20 years in sales, analysis, journalism and startups. See what my customers and partners say about me.