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.
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\).
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
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
The second raw moment is
The third raw moment is
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
The third central moment is
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:
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:
where \(u=x-1\). The third central moment is also a direct integral:
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.
Proof. For real numbers \(a,b\) and integer \(r\geq1\), convexity of \(t\mapsto t^r\) on the nonnegative reals gives
Set \(a=X-\mu\) and \(b=\mu\). Then
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
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
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,
To obtain the second central moment from the density, use the mean \(1\) and evaluate the centered integral:
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.
Check Your Understanding
For each question, identify the moment being calculated and state any finiteness condition that applies.
- 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.
- 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.
- What absolute-moment condition ensures that the raw moment \(E[X^5]\) is finite?
- Why is a finite mean needed before the central moment \(E[(X-E[X])^r]\) can be defined?
- 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.