Professional Documents
Culture Documents
org/wiki/Interquartile_range
1 Use
2 Algorithm
3 Examples
3.1 Data set in a table
3.2 Data set in a plain-text box plot
4 Distributions
4.1 Interquartile range test for normality of
distribution
5 Outliers
6 See also
7 References
Unlike total range, the interquartile range has a breakdown point of 25%,[3] and is thus often preferred to the
total range.
The IQR is used to build box plots, simple graphical representations of a probability distribution.
For a symmetric distribution (where the median equals the midhinge, the average of the first and third quartiles),
half the IQR equals the median absolute deviation (MAD).
1 of 5 10/4/2017 7:15 PM
Interquartile range - Wikipedia https://en.wikipedia.org/wiki/Interquartile_range
If the number of entries is an even number 2n, then the first quartile Q1 is defined as
If the number of entries is an odd number 2n+1, then the first quartile Q1 is defined as
The following table has 13 rows, and follows the rules for the odd number of entries.
1 7
2 7
3 31
Q1=31
4 31 (median of upper half, from row 1 to 7)
5 47
6 75
Q2=87
7 87
(median of whole table)
8 115
9 116
10 119 Q3=119
(median of lower half, from row 7 to 13)
11 119
12 155
13 177
For the data in this table the interquartile range is IQR = Q3 Q1 = 119 - 31 = 88.
2 of 5 10/4/2017 7:15 PM
Interquartile range - Wikipedia https://en.wikipedia.org/wiki/Interquartile_range
+-----+-+
o * |-----------| | |-----------|
+-----+-+
The interquartile range of a continuous distribution can be calculated by integrating the probability density
function (which yields the cumulative distribution functionany other means of calculating the CDF will also
work). The lower quartile, Q1, is a number such that integral of the PDF from - to Q1 equals 0.25, while the
upper quartile, Q3, is such a number that the integral from - to Q3 equals 0.75; in terms of the CDF, the
quartiles can be defined as follows:
The interquartile range and median of some common distributions are shown below
Cauchy 2
The IQR, mean, and standard deviation of a population P can be used in a simple test of whether or not P is
normally distributed, or Gaussian. If P is normally distributed, then the standard score of the first quartile, z1, is
-0.67, and the standard score of the third quartile, z3, is +0.67. Given mean = X and standard deviation = for
P, if P is normally distributed, the first quartile
3 of 5 10/4/2017 7:15 PM
Interquartile range - Wikipedia https://en.wikipedia.org/wiki/Interquartile_range
If the actual values of the first or third quartiles differ substantially from the calculated values, P is not normally
distributed. However, a normal distribution can be trivially perturbed to maintain its Q1 and Q2 std. scores at
0.67 and -0.67 and not be normally distributed (so the above test would produce a false positive). A better test
of normality, such as Q-Q plot would be indicated here.
4 of 5 10/4/2017 7:15 PM
Interquartile range - Wikipedia https://en.wikipedia.org/wiki/Interquartile_range
5 of 5 10/4/2017 7:15 PM