mo_unif | R Documentation |
This function computes the moments of order statistics for the uniform distribution based on the relationship described by Arnold and Balakrishnan (2012).
mo_unif(r, n, k = 1, a = 0, b = 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 |
a , b |
lower and upper limits of the distribution. Must be finite. |
The function calculates the k
th moment based on the formula:
\text{E}[U_{r,n}^k] = \frac{B(k + r, n - r + 1)}{B(r, n - r + 1)},
where B(a, b)
is the complete beta function. When a \neq 0
or b \neq 1
,
the transformation U^* = a + (b - a)U
is used.
The k
th moment of the r
th order statistic from a uniform distribution.
Arnold, B. C., & Balakrishnan, N. (2012). Relations, bounds and approximations for order statistics (Vol. 53). Springer Science & Business Media.
# Example 1: First moment (mean) of the 2nd order statistic from a sample of size 5
mo_unif(2, 5, k = 1, a = 0, b = 1)
# Example 2: Second moment of the 3rd order statistic from a uniform distribution on [2, 5]
mo_unif(3, 7, k = 2, a = 2, b = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.