mo_exp | R Documentation |
This function computes the moments of order statistics from the exponential distribution.
mo_exp(r, n, k = 1, mu = 0, sigma = 1)
r |
rank(s) of the desired order statistic(s) (e.g., |
n |
sample size from which the order statistic is derived. |
k |
order of the moment to compute (default is |
mu |
location parameter of the exponential distribution (default is 0). |
sigma |
scale parameter of the exponential distribution (default is 1). |
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.
The k
th moment of the r
th order statistic from an exponential distribution.
Ahsanullah, M., Nevzorov, V. B., & Shakil, M. (2013). An introduction to order statistics (Vol. 8). Paris: Atlantis Press.
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.