Concept in statistics
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). 
It is expressed in the same units as the data. 
The range provides an indication of statistical dispersion. Since it only depends on two of the observations, it is most useful in representing the dispersion of small data sets.
For continuous IID random variables.
For "n" independent and identically distributed continuous random variables "X"1, "X"2, ..., "X""n" 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("X"1, "X"2, ..., "X""n")-
min("X"1, "X"2, ..., "X""n").
Distribution.
The range, T, has the cumulative distribution function
formula_1
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."385 
If the distribution of each "X""i" 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.
Moments.
The mean range is given by
formula_2
where "x"("G") is the inverse function. In the case where each of the "X""i" has a standard normal distribution, the mean range is given by
formula_3
For continuous non-IID random variables.
For "n" nonidentically distributed independent continuous random variables "X"1, "X"2, ..., "X""n" with cumulative distribution functions "G"1("x"), "G"2("x"), ..., "G""n"("x") and probability density functions "g"1("x"), "g"2("x"), ..., "g""n"("x"), the range has cumulative distribution function 
formula_4
For discrete IID random variables.
For "n" independent and identically distributed discrete random variables "X"1, "X"2, ..., "X""n" with cumulative distribution function "G"("x") and probability mass function "g"("x") the range of the "X""i" is the range of a sample of size "n" from a population with distribution function "G"("x"). We can assume without loss of generality that the support of each "X""i" is {1,2,3...,"N"} where "N" is a positive integer or infinity.
Distribution.
The range has probability mass function
formula_5 
Example.
If we suppose that "g"("x") = 1/"N", the discrete uniform distribution for all "x", then we find
formula_6
Derivation.
The probability of having a specific range value, "t", can be determined by adding the probabilities of having two samples differing by "t", and every other sample having a value between the two extremes.
The probability of one sample having a value of "x" is formula_7. The probability of another having a value "t" greater than "x" is:
formula_8
The probability of all other values lying between these two extremes is:
formula_9
Combining the three together yields:
formula_10
Related quantities.
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.
References.
 ;templatestyles src="Reflist/styles.css" / ;