mo_unif: Moments of Order Statistics from the Uniform Distribution

mo_unifR Documentation

Moments of Order Statistics from the Uniform Distribution

Description

This function computes the moments of order statistics for the uniform distribution based on the relationship described by Arnold and Balakrishnan (2012).

Usage

mo_unif(r, n, k = 1, a = 0, b = 1)

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).

a, b

lower and upper limits of the distribution. Must be finite.

Details

The function calculates the kth 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.

Value

The kth moment of the rth order statistic from a uniform distribution.

References

Arnold, B. C., & Balakrishnan, N. (2012). Relations, bounds and approximations for order statistics (Vol. 53). Springer Science & Business Media.

Examples

# 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)


mos documentation built on June 16, 2025, 5:09 p.m.