WOLFRAM NOTEBOOK

Distribution of the Sample Range of Continuous Random Variables

distribution
uniform
beta
exponential
gamma
Pareto
normal
logistic
extreme value
number of variables
2
Let
X
1
, ,
X
n
be a random sample from a continuous distribution. Let
Y
1
and
Y
n
be the smallest and the largest value in the sample. The sample range
W
is
W=
Y
n
-
Y
1
, that is, the difference between the largest and the smallest value. The sample range is a crude measure of the variation in the sample. This Demonstration shows the distribution of the sample range when the sample is drawn from some well-known continuous distributions.

Details

Snapshot 1: The sample is drawn from the standard uniform distribution; the blue line is the probability distribution function (PDF) of the uniform distribution. Each of the red curves is the PDF of a sample range: the dark red curve is the PDF of the sample range when there are only two observations. The light red curves are the PDFs of the sample range when there are 3–10 observations. The green vertical line is drawn at the expectation of the dark red PDF. When there are two observations from the uniform distribution, the sample range takes on small values close to zero with higher probability than large values close to one; the expectation is
1/3
. For a sample of three observations, the range takes on, with high probability, intermediate values; the expectation is
1/2
. For a sample of four observations, the expectation of the range is
3/5
. On average, the more observations, the larger values the sample range takes on. For example, for a sample of 10 observations, the sample range takes on, with high probability, values from an interval of, say,
(0.5,1)
; the expectation is
9/11
.
Snapshot 2: The sample is drawn from the exponential distribution with mean 1. The distribution of the sample range for two observations is the same as the original exponential distribution (the blue line is behind the dark red curve). For a sample of 10 observations, the sample range takes on, with high probability, values from an interval of, say,
(1,5)
; the expectation is 2.83.
Snapshot 3: The sample is drawn from the standard normal distribution. The distribution of the sample range for two observations takes on, with high probability, values from an interval of, say,
(0,3)
; the expectation is 1.13. For a sample of 10 observations, the sample range takes on, with high probability, values from an interval of, say,
(1.5,5)
; the expectation is 3.08.
The distributions considered in the Demonstration are as follows (as Mathematica input):
UniformDistribution[{0,1}]
BetaDistribution[2,1]
ExponentialDistribution[1]
GammaDistribution[2,1]
NormalDistribution[0,1]
LogisticDistribution[0,1]
ExtremeValueDistribution[0,1]
Let the cumulative distribution function (CDF) and the probability density function (PDF) of the sample variable
X
be
F(x)
and
f(x)
, respectively. The CDF of the sample range
W
for a sample of size
n
is[1, p. 31]
F
W
(w)=n
-
n-1
[F(x+w)-F(x)]
f(x)dx
.
This formula was used to derive the CDFs in the Demonstration (the variable
F
in the code). The PDFs (the variable
f
in the code) are derived by differentiating the CDFs. However, for the normal distribution, the integral in
F
W
(w)
cannot be calculated, and so we approximated the CDFs of the sample range with interpolating functions (FunctionInterpolation). The PDFs were then calculated by differentiating the interpolating functions; the code of the Demonstration contains the resulting interpolating functions in InputForm.
The expectations were calculated exactly in the usual way (the exact values can be found from the code; in the Demonstration, we only show the decimal values). However, for the expectations of the normal distribution, we only calculated approximate decimal values by using the interpolating functions and NIntegrate.

References

[1] B. C. Arnold, N. Balakrishnan, and H. N. Nagaraja, A First Course in Order Statistics, Philadelphia: SIAM, 2008.

External Links

Permanent Citation

Wolfram Cloud

You are using a browser not supported by the Wolfram Cloud

Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.


I understand and wish to continue anyway »

You are using a browser not supported by the Wolfram Cloud. Supported browsers include recent versions of Chrome, Edge, Firefox and Safari.