Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Moment estimation and its limits

A finite sample produces a finite empirical moment in exact arithmetic. It does not establish that the corresponding population moment exists. Even when that moment exists, the estimator can have infinite variance or be dominated by events that most samples miss. We separate these questions using an exact Pareto model and a finite Gaussian mixture.

The sample notation follows the shared canon. For iid Xi≥0X_i\ge0 and order q>0q>0, write

mq=EXq,m^q,n=1n∑i=1nXiq.m_q=\mathbb E X^q,\qquad \widehat m_{q,n}=\frac1n\sum_{i=1}^nX_i^q.

These are raw moments. For a signed variable, replace XqX^q by ∣X∣q|X|^q; a signed odd moment requires separate integrability conditions.

The estimator needs a higher moment

For Pareto with α,xm>0\alpha,x_m>0,

mq=αxmqα−q(q<α),mq=∞(q≥α).m_q=\frac{\alpha x_m^q}{\alpha-q}\quad(q<\alpha),\qquad m_q=\infty\quad(q\ge\alpha).

Assume q<αq<\alpha. Then the sample moment is unbiased for every n≥1n\ge1, but it has finite variance only if 2q<α2q<\alpha. In that regime,

Var⁡(m^q,n)=1n[αxm2qα−2q−(αxmqα−q)2].\operatorname{Var}(\widehat m_{q,n}) =\frac1n\left[ \frac{\alpha x_m^{2q}}{\alpha-2q} -\left(\frac{\alpha x_m^q}{\alpha-q}\right)^2\right].

We prove both assertions. Linearity gives the expectation whenever mqm_q is finite. For 2q<α2q<\alpha, independence makes the cross-covariances zero. For q<α≤2qq<\alpha\le2q, nonnegativity gives m^q,n2≥X12q/n2\widehat m_{q,n}^2\ge X_1^{2q}/n^2, whose expectation is infinite. Since the estimator has finite mean, its variance is infinite too. Equality at 2q=α2q=\alpha is excluded by the logarithmic divergence of the Pareto moment integral.

For example, α=3,xm=1\alpha=3,x_m=1 gives m2=3m_2=3, but m^2,n\widehat m_{2,n} has infinite variance at every finite nn. At α=6\alpha=6, m2=3/2m_2=3/2, m4=3m_4=3, and the estimator variance is 3/(4n)3/(4n). A simulated finite standard error in the first model cannot certify the population variance of the estimator.

Consistency does not require estimator variance

We prove convergence in probability when mq<∞m_q<\infty, without a finite 2q2qth moment. Set Ti=XiqT_i=X_i^q and Ti(B)=min⁡(Ti,B)T_i^{(B)}=\min(T_i,B). For fixed BB, Chebyshev’s inequality gives convergence of the average of Ti(B)T_i^{(B)} to its expectation, because these variables are bounded and iid. The omitted nonnegative part has expected average E(T1−B)+→0\mathbb E(T_1-B)_+\to0 as B→∞B\to\infty. Markov’s inequality controls that average uniformly in nn. For any error tolerance, first choose BB to make this expectation small, then nn to control the bounded average. The triangle inequality proves m^q,n→mq\widehat m_{q,n}\to m_q in probability. This argument supplies no uniform rate over all integrable laws.

When mq=∞m_q=\infty, the stronger almost-sure divergence follows from the nonnegative infinite-mean theorem, applied to XiqX_i^q. That linked note proves the result by truncation. Finite observed values and floating-point overflow are separate matters; neither determines which population regime applies.

A square root changes the moment question

Let Rn=m^2,nR_n=\sqrt{\widehat m_{2,n}}. If m2<∞m_2<\infty, then

ERn2=m2,ERn≤m2,Var⁡(Rn)<∞.\mathbb E R_n^2=m_2,\qquad \mathbb E R_n\le\sqrt{m_2},\qquad \operatorname{Var}(R_n)<\infty.

The identity is immediate from the definition. Cauchy–Schwarz gives the inequality and integrability of RnR_n; hence its variance is finite. Thus infinite variance of the empirical second moment does not imply infinite variance of the empirical root mean square. For the sample standard deviation sn2=n−1∑(Xi−Xˉn)2s_n^2=n^{-1}\sum(X_i-\bar X_n)^2, the identity sn2=m^2,n−Xˉn2≤m^2,ns_n^2=\widehat m_{2,n}-\bar X_n^2\le\widehat m_{2,n} gives the same finite-second-moment conclusion for sns_n. A fixed n/(n−1)n/(n-1) correction for n>1n>1 does not change this conclusion.

The square root can introduce downward bias through concavity. The sample raw moment remains unbiased. Bias, estimator variance, and the frequency of an underestimate are different properties.

A comparison under an exact Gaussian model

Here we know the center is zero and assume iid Xi∼N(0,σ2)X_i\sim N(0,\sigma^2), with σ>0\sigma>0. Compare the root mean square RnR_n with the Gaussian-calibrated mean absolute deviation An=π/2 n−1∑∣Xi∣A_n=\sqrt{\pi/2}\,n^{-1}\sum|X_i|. Both target σ\sigma under these assumptions. We can compute their mean squared errors without simulation.

The normal absolute-moment integrals give EAn=σ\mathbb EA_n=\sigma and Var⁡(An)=σ2(π/2−1)/n\operatorname{Var}(A_n)=\sigma^2(\pi/2-1)/n. For T=∑(Xi/σ)2T=\sum(X_i/\sigma)^2, changing variables from a normal density gives a gamma shape 1/21/2, scale 2 for each square. Independence and the gamma convolution identity give shape n/2n/2, scale 2 for TT. Integrating T\sqrt T against that density yields

bn=ERnσ=2nΓ((n+1)/2)Γ(n/2),E(Rn−σ)2σ2=2(1−bn).b_n=\frac{\mathbb ER_n}{\sigma} =\sqrt{\frac2n}\frac{\Gamma((n+1)/2)}{\Gamma(n/2)}, \qquad \frac{\mathbb E(R_n-\sigma)^2}{\sigma^2}=2(1-b_n).

The last identity uses ERn2=σ2\mathbb ER_n^2=\sigma^2. The corresponding MSE for AnA_n, divided by σ2\sigma^2, is (π/2−1)/n(\pi/2-1)/n. These are exact finite-nn risks under squared-error loss, including RnR_n’s bias. The demo prints them for n=10,100,1000n=10,100,1000.

This comparison does not carry over unchanged to the rare-state mixture: E∣X∣=2/π EY\mathbb E|X|=\sqrt{2/\pi}\,\mathbb E\sqrt Y, so the same AnA_n now targets EY\mathbb E\sqrt Y, whereas the population standard deviation is EY\sqrt{\mathbb EY}. Jensen’s inequality makes these unequal for nonconstant YY with finite mean. Changing the model can change both the sampling error and the target of a calibrated statistic.

Finite moments that most samples miss

Use the two-state variance mixture with P(Y=0.5)=0.99P(Y=0.5)=0.99, P(Y=50.5)=0.01P(Y=50.5)=0.01, and X=YZX=\sqrt YZ, with independent standard-normal ZZ. Draw the pairs (Yi,Zi)(Y_i,Z_i) independently. The population second moment is 1 and fourth moment is 77.25, so

Var⁡(1n∑Xi2)=76.25n.\operatorname{Var}\left(\frac1n\sum X_i^2\right)=\frac{76.25}{n}.

The probability that no wide component is selected is 0.99n0.99^n. Conditional on that event, all observations are independent N(0,0.5)N(0,0.5) and the empirical second moment has expectation 0.5. At n=50n=50, this event has probability about 0.605. Rare samples compensate in the unconditional mean; the raw second moment estimator is still unbiased.

Two vertically stacked plots show 10th, median and 90th percentiles of the empirical second moment for Gaussian, rare-state mixture, Pareto three and Pareto six samples, relative to their true moments.

Independent repeated samples, 600 per law and sample size. Lines show medians; bands show the 10th–90th percentiles of the estimator divided by its population target. These are sampling-distribution summaries, not confidence bands for a fitted model or Monte Carlo confidence intervals. Every population second moment here is finite; Pareto with exponent 3 has an infinite fourth moment. The finite mixture also converges slowly on this grid, despite having every moment.

Fitting a model introduces another boundary

The known-cutoff Pareto plug-in uses ξ^n=n−1∑log⁡(Xi/xm)\widehat\xi_n=n^{-1}\sum\log(X_i/x_m).

Use pareto_mean_plugin.

from xmath.incerto.estimators import pareto_mean_plugin

for sample in ([1, 1], [1, 2], [4, 4]):
    print(f"{sample} {pareto_mean_plugin(sample, x_m=1):.4g}")

Output

[1, 1] 1
[1, 2] 1.53
[4, 4] inf

Under an exact iid Pareto model with α>1\alpha>1, the log-excess average has a gamma density that is positive and continuous at 1. Consequently even conditional on a finite fit,

E[xm1−ξ^n  |  ξ^n<1]=∞.\mathbb E\left[\frac{x_m}{1-\widehat\xi_n} \;\middle|\;\widehat\xi_n<1\right]=\infty.

The linked note derives that density. Its positive lower bound on a small left neighborhood of 1 makes the expectation at least a positive multiple of ∫1−δ1(1−t)−1 dt=∞\int_{1-\delta}^1(1-t)^{-1}\,dt=\infty. The squared estimator diverges there as well. A concentrated central part of a sampling distribution can coexist with divergent moments. Simulations must count non-finite fits; removing them does not remove the singularity of the remaining distribution. No universal ranking of the sample mean and this plug-in follows.

Rising power means and different targets

For fixed observations and positive weights wiw_i summing to 1, define Ap=(∑iwi∣xi∣p)1/pA_p=(\sum_iw_i|x_i|^p)^{1/p}. For 0<p<q0<p<q,

Ap≤Aq.A_p\le A_q.

We prove this with Jensen’s inequality for the strictly convex function t↦tq/pt\mapsto t^{q/p} on [0,∞)[0,\infty), then take a qqth root. Equality holds exactly when all ∣xi∣|x_i| are equal. The inequality also holds below 1; those expressions are not norms. At fixed positive weights, Ap→max⁡i∣xi∣A_p\to\max_i|x_i| as p→∞p\to\infty: bound the weighted sum above by MpM^p and below by wjMpw_jM^p at a maximizing coordinate jj.

For equal weights and observations (0,0,0,4)(0,0,0,4), A1=1A_1=1, A2=2A_2=2, A4=22A_4=2\sqrt2, and A∞=4A_\infty=4. The order changes which quantity is summarized; a larger value alone neither proves a power law nor diagnoses estimation failure.

For geometric unit balls, use the unnormalized norm ∥x∥p=(∑∣xi∣p)1/p\|x\|_p=(\sum|x_i|^p)^{1/p}. Its value decreases with pp at fixed xx. To prove this for x≠0x\ne0, divide each coordinate by ∥x∥p\|x\|_p; the resulting magnitudes are at most 1, so their qqth powers sum to at most their ppth powers, namely 1. The pp-unit balls therefore expand. In two dimensions, p=1,2,∞p=1,2,\infty give a diamond, circle, and square, with areas 2, π\pi, and 4. The factor n−1/pn^{-1/p} in ApA_p explains why its monotonicity goes in the other direction.

Unit contours for unnormalized norms of orders one, two, four and infinity in two dimensions, expanding from a diamond to a square.

Exact geometric contours. These use the sum of powers, whereas the empirical power mean uses the average of powers. No probability model is needed for this comparison.

Mean absolute deviation is a different estimand

If μ=EX\mu=\mathbb EX and E∣X∣<∞\mathbb E|X|<\infty, then E∣X−μ∣≤E∣X∣+∣μ∣<∞\mathbb E|X-\mu|\le\mathbb E|X|+|\mu|<\infty. If the variance is finite, Cauchy–Schwarz gives E∣X−μ∣≤Var⁡(X)\mathbb E|X-\mu|\le\sqrt{\operatorname{Var}(X)}. Equality requires ∣X−μ∣|X-\mu| to be constant almost surely. These are unscaled deviations; Gaussian calibration multiplies the mean absolute deviation by π/2\sqrt{\pi/2}, so that universal inequality does not apply to the calibrated value.

For example, the symmetric law on {−1,1}\{-1,1\} has standard deviation and unscaled mean absolute deviation both equal to 1. Its Gaussian-calibrated Std/MeanAD ratio is 2/π<1\sqrt{2/\pi}<1. The Gaussian benchmark 1 in the dispersion diagnostic is a model reference, not a universal lower bound. Mean and median absolute deviations also answer different questions. Neither universally replaces a second-moment estimand or dominates every estimator under every loss.

Reproduce and interpret

Use pareto_type1, pareto_moment_estimator_summary.

Code
import numpy as np
from xmath.incerto.distributions import pareto_type1
from xmath.incerto.finite_moments import pareto_moment_estimator_summary

rng = np.random.default_rng(20261020)
for alpha in (3, 6):
    sample = pareto_type1.rvs(alpha, size=(100, 200), random_state=rng)
    estimates = np.mean(sample**2, axis=1)
    print(f"alpha={alpha:.4g}")
    for name, value in pareto_moment_estimator_summary(alpha, q=2, n=200).items():
        print(f"  {name}: {value:.4g}")
    quantiles = np.quantile(estimates, [0.1, 0.5, 0.9])
    print("Sample quantiles: [" + ", ".join(f"{v:.4g}" for v in quantiles) + "]")

Output

alpha=3
  moment: 3
  estimator_variance: inf
Sample quantiles: [2.335, 2.726, 3.491]
alpha=6
  moment: 1.5
  estimator_variance: 0.00375
Sample quantiles: [1.433, 1.497, 1.592]

The quantiles describe 100 seeded second-moment estimates from samples of size 200.

Figure regeneration: uv run python demos/incerto/finite_moments.py. NumPy’s PCG64 generator uses seed 20261018; sample sizes are 50, 200, 1000, and 5000, with 600 independent replications per law and size. The four laws are unit normal, the stated rare-state mixture, and Pareto with xm=1x_m=1, α=3,6\alpha=3,6. The script allocates one sample size at a time, about 3 million observations at the largest size, and normally takes seconds. It performs no clipping, censoring, external-data access, or silent non-finite removal.

The experiment illustrates finite-sample spread. The proofs above establish moment boundaries; a finite Monte Carlo variance cannot test an infinite population variance. Later chapters develop convergence rates and broader comparisons. The Cauchy running-statistics experiment belongs to chapter 7.

References

References
  1. Taleb, N. N. (2025). Statistical Consequences of Fat Tails (3rd ed.). https://arxiv.org/abs/2001.10488v4