Learn R Programming

mos (version 0.1.3)

mo_exp: Moments Of Order Statistics from the Exponential Distribution

Description

This function computes the moments of order statistics from the exponential distribution.

Usage

mo_exp(r, n, k = 1, mu = 0, sigma = 1)

Value

The \(k\)th moment of the \(r\)th order statistic from an exponential distribution.

Arguments

r

rank(s) of the desired order statistic(s) (e.g., 1 for the smallest order statistic).

n

sample size from which the order statistic is derived.

k

order of the moment to compute (default is 1).

mu

location parameter of the exponential distribution (default is 0).

sigma

scale parameter of the exponential distribution (default is 1).

Details

The function calculates the \(k\)th moment using the following relationship:

$$ \text{E}[X_{r:n}^k] = \frac{n!}{(r-1)!(n-r)!} \cdot \sum_{j=0}^{r-1} (-1)^j \binom{r-1}{j} \frac{\Gamma(k+1)}{(n-r+j+1)^{k+1}}. $$

For non-standard exponential distributions with \(\mu\) and \(\sigma\) parameters, the transformation \(X^*=\mu + \sigma X\) is used.

References

Ahsanullah, M., Nevzorov, V. B., & Shakil, M. (2013). An introduction to order statistics (Vol. 8). Paris: Atlantis Press.

Examples

Run this code
# First moment (mean) of the 2nd order statistic from a sample of size 5
mo_exp(2, 5, k = 1, mu = 0, sigma = 1)

# Second moment of the 3rd order statistic from an exponential distribution
# with mu = 2 and sigma = 3
mo_exp(3, 7, k = 2, mu = 2, sigma = 3)

Run the code above in your browser using DataLab