Pareto moment threshold (source code)

= Pareto moment threshold
{c}
{title2=$\mathbb E[X^q]=\alpha\beta^q/(\alpha-q),\quad 0\leq q<\alpha$}

A <Pareto distribution> is a proper <probability distribution> for every $\alpha,\beta>0$, even when its <mean> is infinite. To see both facts, integrate the <probability density function> against $x^q$. For real $q\geq0$,
$$
\mathbb E[X^q]=\alpha\beta^\alpha\int_\beta^\infty x^{q-\alpha-1}\,dx
=\begin{cases}\dfrac{\alpha\beta^q}{\alpha-q},&0\leq q<\alpha,\\+\infty,&q\geq\alpha.\end{cases}
$$
The <improper integral> converges exactly when $q-\alpha-1<-1$. At $q=\alpha$ it diverges logarithmically; above that it diverges as a positive power of the upper endpoint. Setting $q=0$ gives one, proving normalization regardless of whether higher <moments> exist.

Taking $q=1,2$ and using $\operatorname{Var}(X)=\mathbb E[X^2]-(\mathbb E[X])^2$ when both terms are finite gives
$$
\mathbb E[X]=\frac{\alpha\beta}{\alpha-1}\quad(\alpha>1),\qquad
\operatorname{Var}(X)=\frac{\alpha\beta^2}{(\alpha-1)^2(\alpha-2)}\quad(\alpha>2).
$$
For $0<\alpha\leq1$, the nonnegative <random variable> has <expected value> $+\infty$; a centered <variance> about a finite <mean> is unavailable. For $1<\alpha\leq2$, the <mean> is finite and the <variance> is infinite.<Random: Probability, Mathematical Statistics, Stochastic Processes by Kyle Siegrist/The Pareto Distribution>[Random: Probability, Mathematical Statistics, Stochastic Processes by Kyle Siegrist; The General Pareto Distribution, Moments: existence threshold, mean and variance]{ref} A finite total <probability> and a finite <expected value> answer different questions.

At the chosen minimum $\beta=10$, $\alpha=3$ gives $\mathbb E[X]=15$, $\mathbb E[X^2]=300$ and <variance> $300-15^2=75$, but an infinite third <moment>. At $\alpha=3/2$, the <mean> is 30 and the <variance> is infinite; at $\alpha=3/4$, even the <mean> is infinite, while the <median> remains the finite number $10\,2^{4/3}\simeq25.198$. At the boundary $\alpha=2$, the earlier example has <mean> 20 but infinite <variance>. A finite sample contains finite values almost surely; that fact cannot establish that the underlying <mean> or <variance> is finite.