Distribution of the Range of Standard Normals

DESCRIPTION:

Density, cumulative probability, quantiles and random generation of the distribution of the range of size independent standard Normal deviates.

USAGE:

dnrange(x, size, nevals=200) 
pnrange(q, size, nevals=200) 
qnrange(p, size, nevals=200) 
rnrange(n, size, bigdata=F) 

REQUIRED ARGUMENTS:

x
numeric vector or bdVector of values for which the density is desired. This will be replicated to be the length of size if size is longer.
q
numeric vector or bdVector of values for which the cumulative probability is desired. This will be replicated to be the length of size if size is longer.
p
vector or bdVector of probabilities for which quantiles are desired. This will be replicated to be the length of size if size is longer. Missing values are not accepted.
n
the number of random numbers desired, or if the length of n is greater than 1, then the length(n) random numbers are returned.
size
vector or bdVector giving the size of the sample of Normal deviates. This is replicated to be the length of p, q or x, or the number of replicates generated, if it is shorter than this. Missing values are not accepted in rnrange and qnrange.

OPTIONAL ARGUMENTS:

nevals
the number of points at which to perform numerical integration. More points will give better accuracy but will be slower.
bigdata
a logical value; if TRUE, an object of type bdVector is returned. Otherwise, a vector object is returned. This argument can be used only if the bigdata library section has been loaded.

VALUE:

a numeric vector or bdVector giving the density, cumulative probability, quantiles, or random deviates for the distribution.

SIDE EFFECTS:

the function rnrange causes creation of the dataset .Random.seed if it does not already exist, otherwise its value is updated.

DETAILS:

This distribution is primarily used for R-charts in quality control work.

For details on the uniform random number generator implemented in S-PLUS, see the set.seed help file.

REFERENCES:

Hartley, H. O. (1942). The range in random samples. Biometrika 32 334-348.

SEE ALSO:

, , .

EXAMPLES:

qnrange(c(.0005,.9995), 16) # 99.9% limits for an R-chart