EnvStats (version 2.1.0)

evNormOrdStats: Expected Value of Order Statistics from Random Sample from Standard Normal Distribution

Description

Compute the expected value of order statistics from a random sample from a standard normal distribution.

Usage

evNormOrdStats(n = 1, approximate = FALSE)

  evNormOrdStatsScalar(r = 1, n = 1, approximate = FALSE)

Arguments

n
positive integer indicating the sample size.
r
positive integer between 1 and n specifying the order statistic for which to compute the expected value.
approximate
logical scalar indicating whether to use the Blom score approximation (Blom, 1958). The default value is FALSE.

Value

  • For evNormOrdStats: a numeric vector of length n containing the expected values of all the order statistics for a random sample of n standard normal deviates. For evNormOrdStatsScalar: a numeric scalar containing the expected value of the r'th order statistic from a random sample of n standard normal deviates.

Details

Let $\underline{z} = z_1, z_2, \ldots, z_n$ denote a vector of $n$ observations from a normal distribution with parameters mean=0 and sd=1. That is, $\underline{z}$ denotes a vector of $n$ observations from a standard normal distribution. Let $z_{(r)}$ denote the $r$'th order statistic of $\underline{z}$, for $r = 1, 2, \ldots, n$. The probability density function of $z_{(r)}$ is given by: $$f_{r,n}(t) = \frac{n!}{(r-1)!(n-r)!} [\Phi(t)]^{r-1} [1 - \Phi(t)]^{n-r} \phi(t) \;\;\;\;\;\; (1)$$ where $\Phi$ and $\phi$ denote the cumulative distribution function and probability density function of the standard normal distribution, respectively (Johnson et al., 1994, p.93). Thus, the expected value of $z_{(r)}$ is given by: $$E(r, n) = E[z_{(r)}] = \int_{-\infty}^{\infty} t f_{r,n}(t) dt \;\;\;\;\;\; (2)$$ It can be shown that if $n$ is odd, then $$E[(n+1)/2, n] = 0 \;\;\;\;\;\; (3)$$ Also, for all values of $n$, $$E(r, n) = -E(n-r, n) \;\;\;\;\;\; (4)$$ The function evNormOrdStatsScalar computes the value of $E(r,n)$ for user-specified values of $r$ and $n$. The function evNormOrdStats computes the values of $E(r,n)$ for all values of $r$ for a user-specified value of $n$. For large values of $n$, the function evNormOrdStats with approximate=FALSE may take a long time to execute. When approximate=TRUE, evNormOrdStats and evNormOrdStatsScalar use the following approximation to $E(r,n)$, which was proposed by Blom (1958, pp. 68-75): $$E(r, n) \approx \Phi^{-1}(\frac{r - 3/8}{n + 1/4}) \;\;\;\;\;\; (5)$$ This approximation is quite accurate. For example, for $n \ge 2$, the approximation is accurate to the first decimal place, and for $n \ge 9$ it is accurate to the second decimal place.

References

Johnson, N. L., S. Kotz, and N. Balakrishnan. (1994). Continuous Univariate Distributions, Volume 1. Second Edition. John Wiley and Sons, New York, pp. 93--99. Royston, J.P. (1982). Algorithm AS 177. Expected Normal Order Statistics (Exact and Approximate). Applied Statistics 31, 161--165.

See Also

Normal, elnorm3, predIntNparSimultaneousTestPower, gofTest, qqPlot.

Examples

Run this code
# Compute the expected value of the minimum for a random sample of size 10 
  # from a standard normal distribution:

  evNormOrdStatsScalar(r = 1, n = 10) 
  #[1] -1.538753

  #----------

  # Compute the expected values of all of the order statistics for a random sample 
  # of size 10 from a standard normal distribution:

  evNormOrdStats(10) 
  #[1] -1.5387527 -1.0013570 -0.6560591 -0.3757647 -0.1226888
  #[6]  0.1226888  0.3757647  0.6560591  1.0013570  1.5387527

  # Compare the above with Blom (1958) scores:

  evNormOrdStats(10, approx = TRUE) 
  #[1] -1.5466353 -1.0004905 -0.6554235 -0.3754618 -0.1225808
  #[6]  0.1225808  0.3754618  0.6554235  1.0004905  1.5466353

Run the code above in your browser using DataLab