Template:Short description Template:Distinguish {{#invoke:other uses|otheruses}}
In descriptive statistics, the range of a set of data is size of the narrowest interval which contains all the data. It is calculated as the difference between the largest and smallest values (also known as the sample maximum and minimum).<ref>Template:Cite book</ref> It is expressed in the same units as the data.
The range provides an indication of statistical dispersion. Closely related alternative measures are the Interdecile range and the Interquartile range.
Range of continuous IID random variablesEdit
For n independent and identically distributed continuous random variables X1, X2, ..., Xn with the cumulative distribution function G(x) and a probability density function g(x), let T denote the range of them, that is, T= max(X1, X2, ..., Xn)- min(X1, X2, ..., Xn).
DistributionEdit
The range, T, has the cumulative distribution function<ref name="gumbel">Template:Cite journal</ref><ref name="tsimashenka">Template:Cite book</ref>
- <math>F(t)= n \int_{-\infty}^\infty g(x)[G(x+t)-G(x)]^{n-1} \, \text{d}x.</math>
Gumbel notes that the "beauty of this formula is completely marred by the facts that, in general, we cannot express G(x + t) by G(x), and that the numerical integration is lengthy and tiresome."Template:R
If the distribution of each Xi is limited to the right (or left) then the asymptotic distribution of the range is equal to the asymptotic distribution of the largest (smallest) value. For more general distributions the asymptotic distribution can be expressed as a Bessel function.<ref name="gumbel" />
MomentsEdit
The mean range is given by<ref>Template:Cite journal</ref>
- <math>n \int_0^1 x(G)[G^{n-1}-(1-G)^{n-1}] \,\text{d}G</math>
where x(G) is the inverse function. In the case where each of the Xi has a standard normal distribution, the mean range is given by<ref>Template:Cite journal</ref>
- <math display="block">\int_{-\infty}^\infty (1-(1-\Phi(x))^n-\Phi(x)^n ) \,\text{d}x.</math>
Derivation of the distributionEdit
Please note that the following is an informal derivation of the result. It is a bit loose with the calculation of the probabilities.
Let <math>m, M</math> denote respectively the min and max of the random variables <math>X_1 \dots X_n</math>.
The event that the range is smaller than <math>T</math> can be decomposed into smaller events according to:
- the index of the minimum value
- and the value <math>x</math> of the minimum.
For a given index <math>i</math> and minimum value <math>x</math>, the probability of the joint event:
- <math>X_i</math> is the minimum,
- and <math>X_i=x</math>,
- and the range is smaller than <math>T</math>,
is:<math display="block"> g(x) \left[ G(x+T) - G(x) \right]^{n-1} </math>Summing over the indices and integrating over <math>x</math> yields the total probability of the event: "the range is smaller than <math>T</math>" which is exactly the cumulative density function of the range:<math display="block"> F(t) = n \int_{-\infty}^{\infty} g(x) \left[G(t+x)-G(x) \right]^{n-1} \, \text{d}x </math>which concludes the proof.
The range in other modelsEdit
Outside of the IID case with continuous random variables, other cases have explicit formulas. These cases are of marginal interest.
- non-IID continuous random variables.<ref name="tsimashenka" />
- Discrete variables supported on <math>\mathbb N</math>.<ref name="evans">Template:Cite journal</ref><ref>Template:Cite journal</ref> A key difficulty for discrete variables is that the range is discrete. This makes the derivation of the formula require combinatorics.
Related quantitiesEdit
The range is a specific example of order statistics. In particular, the range is a linear function of order statistics, which brings it into the scope of L-estimation.