If you're seeing this message, it means we're having trouble loading external resources on our website.

If you're behind a web filter, please make sure that the domains *.kastatic.org and *.kasandbox.org are unblocked.

### Course: Statistics and probability>Unit 3

Lesson 3: Interquartile range (IQR)

# Interquartile range (IQR)

The IQR describes the middle 50% of values when ordered from lowest to highest. To find the interquartile range (IQR), ​first find the median (middle value) of the lower and upper half of the data. These values are quartile 1 (Q1) and quartile 3 (Q3). The IQR is the difference between Q3 and Q1.

## Want to join the conversation?

• Where is IQR used in math? Is this for only box and whisker plots?
• Its a measure of spread which is useful for data sets which are skewed.
• I have a doubt and I didn't know where else to ask because there isn't any video on Quartile Deviation.

What exactly is Quartile Deviation? From where are we calculating the deviation? For eg. In Mean Absolute Deviation we subtract Mean from each data point, add them all up and divide by the number of data points i.e we're basically calculating the average deviation of data points from the MEAN! but in Quartile Deviation we do not use that formula instead the formula is (Q3-Q1)/2. My question is why is this *(Q3-Q1)/2* the formula?

• The Quartile Deviation (QD) is the product of half of the difference between the upper and. lower quartiles. Mathematically we can define as: Quartile Deviation = (Q3 – Q1) / 2. Quartile Deviation defines the absolute measure of dispersion
• Greetings and salutations to those reading my comment I benjamin chapman require assistance to understand in what situation would one might use Interquartile range I fully grasp the concept of how to calculate with Interquartile range
but can't seem to think how where it would be appropriate to use it,if you are capable of helping me and do so I would very much appreciate you contributing the my knowledge in the subject matter,if you are unable to do so because you are in a similar position as I then I wish you the best of days in searching for the answer to your question,but for now fare well.
benjamin chapman
• As Sal said, the interquartile range gives you an idea of how far apart the data is spread out. For example if we had the data sets: (1, 1, 1, 5, 9, 9, 9) and (2, 3, 4, 5, 6, 7, 8) the median is 5 and the mean is 5 for both of them but if you find the IQR of them you see it is 8 and 4, respectively.
A more practical example of this could be the grades of a math class. The class could have an average of 75%, but that does not tell you what the spread of grades is. An IQR of 10 would mean the data isn't spread out as much as if it were 20.
• How would negative numbers or irrational numbers affect your Interquartile range (IQR)?
• The IQR would still be positive, but possibly irrational.

For example, the data set
{−√2, −1, −√3∕2, −1∕2, 0, 1, 2, 4, 5, 5√3}
would have
Q1 = −√3∕2
Q3 = 4

IQR = Q3 − Q1 = 4 − (−√3∕2) = (8 + √3)∕2
• why do we need Interquartile range? I mean where do we use them?
• In a word statistics. In statistical jobs you want to understand the data as thoroughly as possible, so you want as many ways to get an idea of its pattern. IQR is one of those ways.
• how does he draw with his mouse so perfectly
• I have a feeling, that many people who use the IQR or guantiles in general don't really know how to get them or what they are. I learned that a p-quantile for any number 0<p<1 is
for n*p is a whole number: x_p =1/2*[ x_(n*p) - x_(n*p+1) ]
and for n*p is not a whole number: x_p=x_[n*p+1] with [n*p+1]=the next whole number to n*p!

So with that definition would be for the first example: 4,4,6,7,10,11,12,14,15 where n=9 and Q_1=x_0.25= x_[0.25*9+1]=x_3=6 since n*p=9*0.25=2.25 not a whole number and for p=0.75: p*n=0.75*9=6.75 also not a whole number:
Q_3=x_0.75=x_[0.75*9+1]=x_7=12
With that I would get a IQR=Q_3 - Q_1= 12-6=6
which is not 8 as in the video.

Now I know that the IQR is defined differently from field to field, but as far as I know the quantile function x_p is defined the same for all fields of science or at least in statistical mathematics, so how come you are using it so inconsistently?
And as far as I experienced it "my" method and the method in the video will get the same results more often than not but here it's inconsistent.

Also just as a sidenote: The algorithm at wolframalpha.com gets another IQR of 7 for that data set. which I am absolutely baffled about! http://www.wolframalpha.com/input/?i=iqr+%7B4,+4,+6,+7,+10,+11,+12,+14,+15%7D

So please please plaese make a new video in which you at least aknowledge that there are different definitions of the IQR and in your case even the Quantiles(Or here Quartiles which are the 0.25- , 0.50- and 0.75-Quantiles particularly)

PS: I know you are not the only ones that are making this mistake. But it doesn't mean you should repeat it.
PPS: I really don't get why the IQR is tought in the 6th grade since even bachelor-graduates don't use it that much in most cases. ANd since there seem to be many misunderstandings with the mathematical theory behind it I think the time and sweat to learn it is better spend elsewhere. There seem to be enough problems in understanding statistical methods as it is. But keep up the good work! Everyone makes mistakes and only from them we learn and better ourselves! ;D

My sources:
https://en.wikipedia.org/wiki/Quantile (my definition)
https://de.wikipedia.org/wiki/Interquartilsabstand_(Deskriptive_Statistik) (my definition used)

Edit1:
So did I missunderstand that Q_1 =/=Q_0.25 and Q_3=/=Q_0.75 ?
• what if the median was in beetween two numbers? would u have to add that number in the list of numbers and then solve the inner quartile?
• You can think of it as being "added" in, yes. Say you had a data set of 1, 2, 2, 4, 6, 7: The median would be between the middle 2 and 4 (ie: the median would be 3).
You can imagine now that there the three is included in the data set: 1, 2, 2, [3], 4, 6, 7. *It is important to note however that the three is not actually in the data set!* It is only there to help our calculation of the interquartile range!
Now you have the two quartiles above and below the 'imaginary' 3 as: (1, 2, 2) and (4, 6, 7). Now you can solve for the IQR.
• also what are median mean? dose some one have a song or a riddle etc. to help remeber it maby?
(1 vote)
• median is the middle, idk why but ive always remembered it as middle cause to me median kinda sounds like middle...for whatever reason