mo_pareto: Moments of Order Statistics from the Pareto Distribution...

View source: R/functions.R

mo_paretoR Documentation

Moments of Order Statistics from the Pareto Distribution (Simulated)

Description

This function computes the kth moment of order statistics from the pareto distribution using simulation.

Usage

mo_pareto(r, n, k = 1, scale, shape, rep = 1e+05, seed = 42)

Arguments

r

rank of the desired order statistic (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).

scale, shape

non-negative parameters of the pareto distribution.

rep

Number of simulations (default is 1e5).

seed

Optional seed for random number generation to ensure reproducibility (default is 42).

Details

This function estimates the kth moment of the rth order statistic in a sample of size n drawn from a pareto distribution with specified scale and shape parameters. The estimation is done via Monte Carlo simulation using the formula:

\text{E}[X^k] \approx \frac{1}{\mathrm{rep}} \sum_{i=1}^{\mathrm{rep}} X_i^k,

where X_i are the simulated order statistics from the pareto distribution.

The function relies on the ros() function to generate order statistics.

Value

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

Note

The accuracy of the estimated moment depends on the number of simulations (rep). The default value rep = 1e5 provides a reasonable trade-off between speed and accuracy for most practical cases. For higher order moments or when greater precision is required, users are encouraged to increase rep (e.g. 1e6).

See Also

ros

Examples

# Compute the first moment (mean) of the 3rd order statistic from a sample of size 10
mo_pareto(r = 3, n = 10, scale = 2, shape = 3, k = 1)

# Compute the second moment with 1 million simulations
mo_pareto(r = 2, n = 10, scale = 1, shape = 2, k = 2, rep = 1e6)


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