Information theory: Difference between revisions
en>HumphreyW Undid revision 508799332 by 164.36.38.240 (talk) |
en>Logan.dunbar |
||
Line 1: | Line 1: | ||
{{ref improve|date=May 2012}} | |||
[[Image:Boxplot vs PDF.svg|250px|thumb|[[Boxplot]] (with an interquartile range) and a [[probability density function]] (pdf) of a Normal {{maths|N(0,σ<sup>2</sup>)}} Population]] | |||
In [[descriptive statistics]], the '''interquartile range''' ('''IQR'''), also called the '''midspread''' or '''middle fifty''', is a measure of [[statistical dispersion]], being equal to the difference between the upper and lower [[quartile]]s,<ref name=Upton/><ref name= ZK/> IQR = ''Q''<sub>3</sub> − ''Q''<sub>1</sub>. In other words, the IQR is the 1st Quartile subtracted from the 3rd Quartile; these quartiles can be clearly seen on a [[box plot]] on the data. It is a [[trimmed estimator]], defined as the 25% trimmed [[mid-range]], and is the most significant basic [[robust measures of scale|robust measure of scale]]. | |||
==Use== | |||
Unlike (total) [[range (statistics)|range]], the interquartile range has a [[breakdown point]] of 25%, 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). | |||
The [[median]] is the corresponding measure of [[central tendency]]. | |||
Filtering of [[outlier]]s (see [[Interquartile_range#Interquartile_range_and_outliers|below]]). | |||
==Examples== | |||
===Data set in a table=== | |||
:{| class="wikitable" style="text-align:center;" | |||
|- | |||
! width="40px"| i | |||
! width="40px" |x[i] | |||
! Quartile | |||
|- | |||
| 1|| 102 || | |||
|- | |||
| 2|| 104 || | |||
|- | |||
| 3|| 105|| Q<sub>1</sub> | |||
|- | |||
| 4|| 107 || | |||
|- | |||
| 5|| 108|| | |||
|- | |||
| 6|| 109|| Q<sub>2</sub><br /> (median) | |||
|- | |||
| 7|| 110 || | |||
|- | |||
| 8|| 112 || | |||
|- | |||
| 9|| 115|| Q<sub>3</sub> | |||
|- | |||
| 10|| 116 || | |||
|- | |||
| 11|| 118 || | |||
|- | |||
|} | |||
For the data in this table the interquartile range is IQR = 115 − 105 = 10. | |||
===Data set in a plain-text box plot=== | |||
<pre style="font-family:monospace"> | |||
+-----+-+ | |||
o * |-------| | |---| | |||
+-----+-+ | |||
+---+---+---+---+---+---+---+---+---+---+---+---+ number line | |||
0 1 2 3 4 5 6 7 8 9 10 11 12 | |||
</pre> | |||
For the data set in this [[box plot]]: | |||
* lower (first) quartile ''Q''<sub>1</sub> = 7 | |||
* median (second quartile) ''Q''<sub>2</sub> = 8.5 | |||
* upper (third) quartile ''Q''<sub>3</sub> = 9 | |||
* interquartile range, IQR = ''Q''<sub>3</sub> − ''Q''<sub>1</sub> = 2 | |||
==Interquartile range of distributions== | |||
The interquartile range of a continuous distribution can be calculated by integrating the [[probability density function]] (which yields the [[cumulative distribution function]] — any other means of calculating the CDF will also work). The lower quartile, ''Q''<sub>1</sub>, is a number such that integral of the PDF from -∞ to ''Q''<sub>1</sub> equals 0.25, while the upper quartile, ''Q''<sub>3</sub>, is such a number that the integral from -∞ to ''Q''<sub>3</sub> equals 0.75; in terms of the CDF, the quartiles can be defined as follows: | |||
:<math>Q_1 = \text{CDF}^{-1}(0.25) ,</math> | |||
:<math>Q_3 = \text{CDF}^{-1}(0.75) ,</math> | |||
where CDF<sup>−1</sup> is the [[quantile function]]. | |||
The interquartile range and median of some common distributions are shown below | |||
{| class="wikitable" | |||
|- | |||
! Distribution | |||
! Median | |||
! IQR | |||
|- | |||
| [[Normal distribution|Normal]] | |||
| μ | |||
| 2 Φ<sup>−1</sup>(0.75)σ ≈ 1.349σ | |||
|- | |||
| [[Laplace distribution|Laplace]] | |||
| μ | |||
| 2''b'' ln(2) ≈ 1.386''b'' | |||
|- | |||
| [[Cauchy distribution|Cauchy]] | |||
| μ | |||
|2γ | |||
|} | |||
===Interquartile range test for normality of distribution=== | |||
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 distribution|Gaussian]]. If ''P'' is normally distributed, then the [[standard score]] of the first quartile, ''z''<sub>1</sub>, is -0.67, and the standard score of the third quartile, ''z''<sub>3</sub>, is +0.67. Given ''mean'' = ''X'' and ''standard deviation'' = σ for ''P'', if ''P'' is normally distributed, the first quartile | |||
:<math>Q_1 = (\sigma \, z_1) + X</math> | |||
and the third quartile | |||
:<math>Q_3 = (\sigma \, z_3) + X</math> | |||
If the actual values of the first or third quartiles differ substantially{{Clarify|date=December 2012}} from the calculated values, ''P'' is not normally distributed. | |||
==Interquartile range and outliers== | |||
[[File:Box-Plot mit Interquartilsabstand.png|thumb|Figure 3. Box-and-whisker plot with four close and one far away extreme values, defined as outliers above Q3 + 1.5(IQR) and Q3 + 3(IQR), respectively.]] | |||
The interquartile range is often used to find [[outliers]] in data. Outliers are observations that fall below Q1 - 1.5(IQR) or above Q3 + 1.5(IQR). In a boxplot, the highest and lowest occurring value within this limit are drawn as bar of the ''whiskers'', and the outliers as individual points. | |||
==See also== | |||
* [[Midhinge]] | |||
* [[Interdecile range]] | |||
* [[Robust measures of scale]] | |||
==References== | |||
{{reflist|refs= | |||
<ref name=Upton>{{cite book |title=Understanding Statistics |first1=Graham|last1=Upton|first2=Ian|last2= Cook|year=1996 |publisher=Oxford University Press |isbn=0-19-914391-9 |page=55 |url=http://books.google.com/books?id=vXzWG09_SzAC&pg=PA55&dq=interquartile+range#v=onepage&q=interquartile%20range&f=false}}</ref> | |||
<ref name= ZK>Zwillinger, D., Kokoska, S. (2000) ''CRC Standard Probability and Statistics Tables and Formulae'', CRC Press. ISBN 1-58488-059-7 page 18.</ref> | |||
}} | |||
{{Statistics|descriptive}} | |||
{{DEFAULTSORT:Interquartile Range}} | |||
[[Category:Scale statistics]] | |||
[[Category:Wikipedia articles with ASCII art]] |
Revision as of 17:06, 25 January 2014
In descriptive statistics, the interquartile range (IQR), also called the midspread or middle fifty, is a measure of statistical dispersion, being equal to the difference between the upper and lower quartiles,[1][2] IQR = Q3 − Q1. In other words, the IQR is the 1st Quartile subtracted from the 3rd Quartile; these quartiles can be clearly seen on a box plot on the data. It is a trimmed estimator, defined as the 25% trimmed mid-range, and is the most significant basic robust measure of scale.
Use
Unlike (total) range, the interquartile range has a breakdown point of 25%, 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).
The median is the corresponding measure of central tendency.
Filtering of outliers (see below).
Examples
Data set in a table
i x[i] Quartile 1 102 2 104 3 105 Q1 4 107 5 108 6 109 Q2
(median)7 110 8 112 9 115 Q3 10 116 11 118
For the data in this table the interquartile range is IQR = 115 − 105 = 10.
Data set in a plain-text box plot
+-----+-+ o * |-------| | |---| +-----+-+ +---+---+---+---+---+---+---+---+---+---+---+---+ number line 0 1 2 3 4 5 6 7 8 9 10 11 12
For the data set in this box plot:
- lower (first) quartile Q1 = 7
- median (second quartile) Q2 = 8.5
- upper (third) quartile Q3 = 9
- interquartile range, IQR = Q3 − Q1 = 2
Interquartile range of distributions
The interquartile range of a continuous distribution can be calculated by integrating the probability density function (which yields the cumulative distribution function — any 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:
where CDF−1 is the quantile function.
The interquartile range and median of some common distributions are shown below
Distribution | Median | IQR |
---|---|---|
Normal | μ | 2 Φ−1(0.75)σ ≈ 1.349σ |
Laplace | μ | 2b ln(2) ≈ 1.386b |
Cauchy | μ | 2γ |
Interquartile range test for normality of distribution
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
and the third quartile
If the actual values of the first or third quartiles differ substantiallyTemplate:Clarify from the calculated values, P is not normally distributed.
Interquartile range and outliers
The interquartile range is often used to find outliers in data. Outliers are observations that fall below Q1 - 1.5(IQR) or above Q3 + 1.5(IQR). In a boxplot, the highest and lowest occurring value within this limit are drawn as bar of the whiskers, and the outliers as individual points.
See also
References
43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.