orderStatMoments: Exact Means, Variances, and Covariances of Order Statistics in R
Zheyang Wu (Worcester Polytechnic Institute), Tiejun Tong (Hong Kong Baptist University)
Key points
From the paper's conclusion- Recent software either provides exact calculation only for the means and variances of single order statistics, or obtains the covariances by approximations.
Abstract
Calculating the moments, i.e., means, variances, and covariances, of the order statistics of a sample is critical, as they are foundations for order-statistics-based estimation and inference problems. In the early literature, the exact covariance matrices were tabulated only up to the sample size of 50 under normality. Recent software either provides exact calculation only for the means and variances of single order statistics, or obtains the covariances by approximations. We create the R package orderStatMoments to calculate the exact values of these moments for any ranks and any sample size. It covers thirteen built-in distribution families, specified by name and parameters as in R, and allows for continuous distributions defined by the user under relatively weak conditions. It also calculates the moments of any linear combination of order statistics, including sample quantiles, and Lloyd's best linear unbiased estimators with their variances. The work makes two contributions. First, the package provides the exact covariances between order statistics, which no software we found does. Second, we design methods based on the statistical properties of order statistics critical for ultra accurate computing at large sample sizes and various distributions. The accuracy is verified against closed forms at sample sizes up to $n = 10^6$, against the permutation identities on full matrices, and against 556 cells tabulated in seven publications, where it identified some errors far beyond the stated accuracy. A comparison with five R packages and Python's SciPy shows advantages of this package. Computing is efficient, with a time nearly independent of the sample size.
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- Exact Covariance Structure and Efficient Computation for L-ComomentsarXiv · 2026
- Stable and efficient covariance estimation for sample L-moments using H\'ajek projectionsarXiv · 2026
- BOSE: A Bayesian Order Statistics-Based Estimator for Recovering the Sample Mean and Standard Deviation from the Median, Range, and/or Interquartile Range.bioRxiv : the preprint server for biology · 2026
- Empirical likelihood confidence regions for ordered bivariate meansStatistical Papers · 2026
- Score-based confidence intervals for variance-covariance parameters in linear mixed modelsarXiv · 2026
- Efficient Estimation of Relative Risk, Odds Ratio and their Logarithms for Rare EventsJournal of Statistical Theory and Applications · 2026