Interquartile range

From TCS Wiki
Jump to navigation Jump to search

Template:Complex

The interquartile range (IQR) is a number that indicates how spread out scores are and tells us what the range is in the middle of a set of scores. The interquartile range is not sensitive to outliers (scores that are much higher or much lower than the other scores) as it eliminates them. It is calculated as the range of the middle half of the scores. The scores are divided into four equal parts, separated by the quartiles [math]\displaystyle{ Q_1, Q_2 }[/math] and [math]\displaystyle{ Q_3 }[/math], after the scores have been arranged in ascending (becoming bigger as you go further) order. The second quartile [math]\displaystyle{ Q_2 }[/math] is also known as the median. The interquartile range IQR is then defined as:

[math]\displaystyle{ \mathrm{IQR}=Q_3-Q_1 }[/math]

Example

If we have 20 scores arranged from smallest to largest:

1, 2, 2, 2, 3, 4, 6, 8, 8, 8, 8, 8, 9, 11, 11, 14, 14, 15, 15, 29

we put them into four different groups of five numbers each::

1, 2, 2, 2, 3 | 4, 6, 8, 8, 8 | 8, 8, 9, 11, 11 | 14, 14, 15, 15, 29

The groups are separated by:

[math]\displaystyle{ Q_1=3{.}5,\ Q_2=8,\ Q_3=12{.}5. }[/math]

Hence the interquartile range is:

[math]\displaystyle{ \mathrm{IQR}=Q_3-Q_1=12{.}5-3{.}5=9. }[/math]

Suppose the observation 29 has accidentally been written down as 92. This number is an outlier. Notice that the interquartile range is not affected.