Tutorials › Statistical Theory I - Probability and Distribution Theory › Raw and Central Moments from Distribution Laws

Moments and Generating Functions · Tutorial 495 of 994

Raw and Central Moments from Distribution Laws

Learn to define raw and central moments precisely, check whether they exist, and compute them directly from a distribution’s masses or density.

Intermediate 9 min read

What You'll Learn

  • Define raw moments and central moments for positive integer orders.
  • State the absolute-integrability conditions that make these moments finite.
  • Express moments as sums over probability masses or integrals against densities.
  • Compute raw and central moments directly for discrete and continuous distributions.
  • Distinguish a finite moment from a formal calculation involving divergent sums or integrals.

Moments as Averages Under a Distribution

A moment is an average of a power of a random variable. The raw moment averages powers measured from zero; the central moment averages powers measured from the mean. To calculate either one from a distribution, weight each possible value by its probability in the discrete case, or integrate against the density in the continuous case.

A formula involving a sum or integral is a moment only when the relevant expectation exists. For signed powers, this requires absolute integrability: cancellation between large positive and negative terms is not enough. That condition matters especially for odd powers and distributions with unbounded support.

Definition: Let \(X\) be a random variable and let \(r\) be a positive integer. If \(E[|X|^r]<\infty\), the \(r\)-th raw moment is $$ \mu'_r=E[X^r]. $$ If the mean \(\mu=E[X]\) is finite and \(E[|X-\mu|^r]<\infty\), the \(r\)-th central moment is $$ \mu_r=E[(X-\mu)^r]. $$ Here “finite” means that the expectation exists as a finite real number. The absolute-moment conditions ensure that the displayed signed expectations are well-defined.

The first raw moment is the mean, \(E[X]\). The second central moment is the variance, \(\operatorname{Var}(X)\). Higher moments describe further aspects of a distribution, but their interpretation and use depend on their order and on whether they are finite.

Calculating Moments From a Distribution Law

Write \(P_X\) for the distribution of \(X\), so \(P_X(A)=P(X\in A)\) for any measurable set \(A\). For a measurable function \(g\), the expectation of \(g(X)\) can be calculated by integrating \(g\) against this distribution, provided the expectation is well-defined. In a discrete distribution, that integral is a weighted sum. If \(X\) has a density \(f\), it is an integral against \(f\).

Theorem: Let \(g\) be measurable. If \(E[|g(X)|]<\infty\), then $$ E[g(X)]=\int g(x)\,dP_X(x). $$ If \(X\) takes values in a finite or countable set \(\mathcal{S}\), with \(P(X=x)=p(x)\), this becomes $$ E[g(X)]=\sum_{x\in\mathcal{S}}g(x)p(x), \qquad E[|g(X)|]=\sum_{x\in\mathcal{S}}|g(x)|p(x). $$ If \(X\) has density \(f\) with respect to Lebesgue measure, this becomes $$ E[g(X)]=\int_{-\infty}^{\infty}g(x)f(x)\,dx, \qquad E[|g(X)|]=\int_{-\infty}^{\infty}|g(x)|f(x)\,dx. $$

Justification. For an indicator function \(g(x)=\mathbf{1}_A(x)\), both sides equal \(P(X\in A)\). By linearity, the identity follows for nonnegative simple functions. Every nonnegative measurable function is the increasing limit of nonnegative simple functions, so the monotone convergence theorem gives the identity for nonnegative \(g\). For an integrable signed \(g\), apply that result to its positive and negative parts; both expectations are finite because \(E[|g(X)|]<\infty\), and subtract the two identities. The sum and density formulas are the corresponding expressions for the distribution \(P_X\). \(\square\)

Apply the theorem with \(g(x)=x^r\) for a raw moment and with \(g(x)=(x-\mu)^r\) for a central moment. Thus the precise tests for finiteness at order \(r\) are

$$ \sum_{x\in\mathcal{S}} |x|^r p(x)<\infty \quad\text{or}\quad \int_{-\infty}^{\infty}|x|^r f(x)\,dx<\infty $$

for the raw moment, and the same expressions with \(|x-\mu|^r\) in place of \(|x|^r\) for the central moment. When the test is satisfied, remove the absolute-value bars inside the sum or integral to calculate the signed moment.

Worked Example: Raw and Central Moments of a Discrete Distribution

Let \(X\) take the values \(-1\), \(2\), and \(4\), with probabilities \(1/4\), \(1/2\), and \(1/4\), respectively. The probabilities are nonnegative and sum to \(1/4+1/2+1/4=1\). Since the support is finite, every absolute moment is finite.

The mean, which is the first raw moment, is

$$ E[X]=(-1)\frac14+2\frac12+4\frac14 =-\frac14+1+1=\frac74. $$

The second raw moment is

$$ E[X^2]=(-1)^2\frac14+2^2\frac12+4^2\frac14 =\frac14+2+4=\frac{25}{4}. $$

The third raw moment is

$$ E[X^3]=(-1)^3\frac14+2^3\frac12+4^3\frac14 =-\frac14+4+16=\frac{79}{4}. $$

For central moments, first subtract the mean \(7/4\) from each support value. The deviations are \(-11/4\), \(1/4\), and \(9/4\). The second central moment is therefore

$$ E\left[\left(X-\frac74\right)^2\right] =\frac14\left(\frac{121}{16}\right) +\frac12\left(\frac{1}{16}\right) +\frac14\left(\frac{81}{16}\right) =\frac{121+2+81}{64} =\frac{51}{16}. $$

The third central moment is

$$ E\left[\left(X-\frac74\right)^3\right] =\frac14\left(-\frac{1331}{64}\right) +\frac12\left(\frac{1}{64}\right) +\frac14\left(\frac{729}{64}\right) =\frac{-1331+2+729}{256} =-\frac{75}{32}. $$

Each calculation uses the mass at a value as its weight. In particular, an odd power can contribute a negative term; the expectation is the signed weighted sum, while finiteness is checked using absolute powers.

Worked Example: Moments of a Uniform Density

Suppose \(X\) has the uniform density \(f(x)=1/2\) for \(0\leq x\leq 2\), and \(f(x)=0\) otherwise. The density integrates to \(\int_0^2(1/2)\,dx=1\), and the bounded support ensures that all positive integer moments are finite.

For any positive integer \(r\), calculate the raw moment directly:

$$ E[X^r]=\int_0^2 x^r\frac12\,dx =\frac12\left[\frac{x^{r+1}}{r+1}\right]_0^2 =\frac{2^r}{r+1}. $$

In particular, the mean is \(E[X]=2/2=1\). The second raw moment is \(E[X^2]=4/3\). To calculate the second central moment directly from the density, use that mean:

$$ E[(X-1)^2]=\frac12\int_0^2(x-1)^2\,dx =\frac12\int_{-1}^{1}u^2\,du =\frac12\left[\frac{u^3}{3}\right]_{-1}^{1} =\frac13, $$

where \(u=x-1\). The third central moment is also a direct integral:

$$ E[(X-1)^3]=\frac12\int_{-1}^{1}u^3\,du =\frac12\left[\frac{u^4}{4}\right]_{-1}^{1}=0. $$

The zero follows because the positive and negative contributions over the symmetric interval cancel. The integral is finite, so this cancellation is legitimate.

When Raw and Central Moments Are Finite

For a fixed positive integer order, raw and central absolute-moment finiteness are equivalent once the mean exists. This does not say their values are equal; it says that either one is finite exactly when the other is.

Theorem: Suppose \(r\geq 1\) is an integer and \(E[X]=\mu\) is finite. Then $$ E[|X|^r]<\infty \quad\Longleftrightarrow\quad E[|X-\mu|^r]<\infty. $$ Consequently, the raw and central moments of order \(r\) are both well-defined and finite, or neither is.

Proof. For real numbers \(a,b\) and integer \(r\geq1\), convexity of \(t\mapsto t^r\) on the nonnegative reals gives

$$ |a+b|^r \leq (|a|+|b|)^r \leq 2^{r-1}\bigl(|a|^r+|b|^r\bigr). $$

Set \(a=X-\mu\) and \(b=\mu\). Then

$$ |X|^r \leq 2^{r-1}\bigl(|X-\mu|^r+|\mu|^r\bigr). $$

If \(E[|X-\mu|^r]<\infty\), taking expectations on both sides shows that \(E[|X|^r]<\infty\), since \(|\mu|^r\) is a finite constant. Conversely, set \(a=X\) and \(b=-\mu\). The same inequality gives

$$ |X-\mu|^r \leq 2^{r-1}\bigl(|X|^r+|\mu|^r\bigr). $$

If \(E[|X|^r]<\infty\), taking expectations now gives \(E[|X-\mu|^r]<\infty\). The two implications prove the equivalence. Absolute integrability of each powered quantity ensures its signed expectation is finite, completing the proof. \(\square\)

Worked Example: Raw Moments of an Exponential Density

Let \(X\) have density \(f(x)=e^{-x}\) for \(x\geq0\), and \(f(x)=0\) otherwise. For integer \(r\geq0\), define \(I_r=\int_0^\infty x^r e^{-x}\,dx\). The density integrates to \(I_0=1\). For \(r\geq1\), integration by parts gives

$$ I_r=\left[-x^r e^{-x}\right]_0^\infty +r\int_0^\infty x^{r-1}e^{-x}\,dx =rI_{r-1}. $$

The boundary term is zero: \(x^r e^{-x}\to0\) as \(x\to\infty\), and \(x^r=0\) at \(x=0\) for \(r\geq1\). Iterating the recurrence gives \(I_r=r!\), so \(E[X^r]=r!\) for positive integer \(r\). In particular,

$$ E[X]=1,\qquad E[X^2]=2,\qquad E[X^3]=6. $$

To obtain the second central moment from the density, use the mean \(1\) and evaluate the centered integral:

$$ E[(X-1)^2] =\int_0^\infty (x-1)^2e^{-x}\,dx =I_2-2I_1+I_0 =2-2+1=1. $$

The absolute integrals are finite; for example, \(E[|X|^2]=I_2=2\), and the finiteness theorem also ensures the centered second absolute moment is finite. Thus the displayed central expectation is justified.

Common Pitfall: Cancellation Does Not Establish Finiteness

A tempting but incorrect argument is to compute a signed sum or integral and declare the moment finite whenever positive and negative pieces appear to cancel. An expectation of \(X^r\) requires \(E[|X|^r]<\infty\). If the positive and negative parts both have infinite expectation, subtracting them is not a valid definition of a finite expectation. Check the absolute-power sum or integral before using the signed formula.

For a distribution with finite support, this check is automatic for every positive integer order. For unbounded support, it is a genuine condition. A density formula is not by itself a guarantee that the integral converges.

Key takeaway: Calculate a moment by averaging the appropriate power under the distribution law: sum powers times masses, or integrate powers against the density. Before interpreting the result, verify absolute integrability at that order.

Check Your Understanding

For each question, identify the moment being calculated and state any finiteness condition that applies.

  1. A random variable takes values \(0\) and \(3\) with probabilities \(2/3\) and \(1/3\). Write the sum for its third raw moment and evaluate it.
  2. A density is \(f(x)=1\) on \(0\leq x\leq1\) and zero elsewhere. Write an integral for its second central moment, first identifying its mean.
  3. What absolute-moment condition ensures that the raw moment \(E[X^5]\) is finite?
  4. Why is a finite mean needed before the central moment \(E[(X-E[X])^r]\) can be defined?
  5. For a random variable with finite mean, explain why finiteness of its absolute raw moment of order \(r\geq1\) implies finiteness of its absolute centered moment of that order.