jump to navigation

The moment calculation shortcut June 20, 2007

Posted by Peter in Exam 1/P, Exam 3/MLC, Exam 4/C.
trackback

Suppose X is a continuous random variable that takes on nonnegative values. Then we have the following definition:

\displaystyle {\rm E}[X] = \int_0^\infty x f_X(x) \, dx,

where f_X(x) is the probability density function of X. Indeed, in the general case, let g be a function on the support of X. Then

\displaystyle {\rm E}[g(X)] = \int_0^\infty g(x) f_X(x) \, dx.

So when g(x) = x^k for some positive integer k, we obtain the formula for the k(th) raw moment of X. Let’s work through an example.

Show that the expected value (first raw moment) of a Pareto distribution with parameters α and θ is equal to θ/(α-1). Recall that the density of the Pareto distribution is \displaystyle f(x) = \frac{\alpha \theta^\alpha}{(x+\theta)^{\alpha+1}}.

Solution: We compute

\displaystyle {\rm E}[X] = \int_0^\infty \frac{x \alpha\theta^\alpha}{(x+\theta)^{\alpha+1}} \, dx = \alpha\theta^\alpha \!\! \int_0^\infty \frac{x}{(x+\theta)^{\alpha+1}} \, dx.

Then make the substitution u = x+\theta , du = dx , to obtain

\displaystyle {\rm E}[X] = \alpha\theta^\alpha \!\!\int_{u=\theta}^\infty \!\frac{u-\theta}{u^{\alpha+1}} \, du = \alpha\theta^\alpha \left( \int_\theta^\infty \!u^{-\alpha} \, du - \theta \!\int_\theta^\infty  \!u^{-\alpha-1} \, du \right) .

For \alpha > 1 , the integrals converge, giving

\displaystyle {\rm E}[X] = \alpha\theta^\alpha\! \left(\!-\frac{\theta^{-\alpha+1}}{-\alpha+1} + \theta \cdot \frac{\theta^{-\alpha}}{-\alpha}\right) = \alpha\theta \left(\frac{1}{\alpha-1} - \frac{1}{\alpha}\right) = \frac{\theta}{\alpha-1},

which proves the desired result. However, the computation is quite tedious, and there is often an easier approach. We will now show that instead of using the density of X, we can use the survival of X when computing moments. Recall that

\displaystyle S_X(x) = \Pr[X > x] = \int_x^\infty f_X(x) \, dx = 1 - F_X(x);

that is, the survival function is the probability that X exceeds x, which is the integral of the density on the interval [x, \infty) , or the complement of the cumulative distribution function F(x). With this in mind, let’s try integration by parts on the definition of the expected value, with the choices u = g(x) , du =  g'(x) \, dx ; dv = f_X(x) \, dx , v = \int f(x) \, dx = F_X(x) :

{\setlength\arraycolsep{2pt} \begin{array}{rcl} {\rm E}[g(X)] &=& \displaystyle \int_0^\infty \!\! g(x) f_X(x) \, dx = \bigg[g(x) F_X(x)\bigg]_{x=0}^\infty \! - \!\!\int_0^\infty \!\! g'(x) F_X(x) \, dx \\ &=& \displaystyle \bigg[g(x)\left(1-S(x)\right)\bigg]_{x=0}^\infty - \int_0^\infty \! g'(x)\left(1 - S(x)\right) \, dx \\ &=& \displaystyle\int_0^\infty g'(x) S(x) \, dx, \end{array}}

where the last equality holds because of two assumptions: First, that \displaystyle \lim_{x \rightarrow \infty} g(x) S(x) = 0 , and g(0) is finite; and second, that the resulting integral of g'(x) S(x) is convergent. Note that the individual terms of the integration by parts are not themselves convergent, but taken together, they are—thus, a fully rigorous proof requires a more formal treatment than what is furnished here.

A consequence of this result is that for positive integers k,

\displaystyle {\rm E}[X^k] = \int_0^\infty kx^{k-1} S(x) \, dx.

This formula is easier to work with in some instances, compared to the original definition. For instance, we know that the Pareto survival function is

\displaystyle S(x) = \left(\frac{\theta}{x+\theta}\right)^\alpha,

so we find

\displaystyle {\rm E}[X] = \int_0^\infty S(x) \, dx =  \int_0^\infty \left(\frac{\theta}{x+\theta}\right)^\alpha \, dx

which we can immediately see results in a simpler integrand. This result also proves the life contingencies relationship

\displaystyle \overset{\circ}{e}_x = \int_{t=0}^{\omega-x} \,_t p_x \, dt,

since the complete expectation of life is simply the expected value E[T(x)] of the future lifetime variable T(x), and \,_t p_x is the survival function of T(x). In life contingencies notation, the definition of expected value would then look like this:

\displaystyle \overset{\circ}{e}_x = \int_{t=0}^{\omega-x} x_{\,t} p_x \mu_x(t) \, dt,

which is usually more cumbersome than the formula using only the survival function.

Advertisements

Comments»

No comments yet — be the first.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: