### Working with moments

Posted on

This post gives some background information on calculation involving moments.

Let $X$ be a random variable. Let $\mu=E(X)$ be its mean and $\sigma^2=Var(X)$ be its variance. Thus $\sigma$ is the standard deviation of $X$.

The expectation $\displaystyle E[X^k]$ is the $k$th raw moment. It is also called the $k$th moment about zero. The expectation $\displaystyle E[(X-\mu)^k]$ is the $k$th central moment. It is also called the $k$th moment about the mean. Given $X$, its standardized random variable is $\displaystyle \frac{X-\mu}{\sigma}$. Then the $k$th standardized moment is $\displaystyle E \biggl[\biggl(\frac{X-\mu}{\sigma} \biggr)^k \biggr]$.

The mean of $X$ is the first raw moment $\mu=E(X)$. The variance of $X$ is the second central moment $\displaystyle Var(X)=E[(X-\mu)^2]$. It is equivalent to $Var(X)=E(X^2)-\mu^2$. In words, the variance is the second raw moment subtracting the square of the mean.

The skewness of $X$ is the third standardized moment of $X$. The kurtosis is the fourth standardized moment of $X$. The excess kurtosis is the kurtosis subtracting 3. They are:

$\displaystyle \gamma_1 =E \biggl[\biggl(\frac{X-\mu}{\sigma} \biggr)^3 \biggr]$

$\displaystyle \text{kurt}[X] =E \biggl[\biggl(\frac{X-\mu}{\sigma} \biggr)^4 \biggr]$

$\displaystyle \text{Ex Kurt}[X] = \text{kurt}[X]-3$

The calculation is usually done by expanding the expression inside the expectation. As a result, the calculation would then be a function of the individual raw moments up to the third or fourth order.

\displaystyle \begin{aligned} \gamma_1&=E \biggl[\biggl(\frac{X-\mu}{\sigma} \biggr)^3 \biggr] \\&=\frac{E(X^3)-3 \mu E(X^2)+3 \mu^2 E(X)-\mu^3}{(\sigma^2)^{1.5}} \\&=\frac{E(X^3)-3 \mu \sigma^2 - \mu^3}{(\sigma^2)^{1.5}} \end{aligned}

\displaystyle \begin{aligned} \text{kurt}[X]&=E \biggl[\biggl(\frac{X-\mu}{\sigma} \biggr)^4 \biggr] \\&=\frac{E(X^4)-4 \mu E(X^3)+6 \mu^2 E(X^2)-4 \mu^3 E(X)+\mu^4}{\sigma^4} \\&=\frac{E(X^4)-4 \mu E(X^3)+6 \mu^2 E(X^2)-3 \mu^4}{\sigma^4} \end{aligned}

Note that the last line in skewness is a version that depends on the mean, the variance and the third raw moment. The calculation is illustrated with some examples. Practice problems are given in subsequent posts.

Example 1
Losses are modeled by a distribution that has the following density function. Calculate the mean, variance, skewness and kurtosis of the loss distribution.

$\displaystyle f(x)=\left\{ \begin{array}{ll} \displaystyle 0.15 &\ 0

The following shows the calculation of the first four raw moments.

$\displaystyle E(X)=\int_0^5 0.15 x \ dx+\int_5^{10} 0.05 x \ dx=3.75$

$\displaystyle E(X^2)=\int_0^5 0.15 x^2 \ dx+\int_5^{10} 0.05 x^2 \ dx=\frac{62.5}{3}$

$\displaystyle E(X^3)=\int_0^5 0.15 x^3 \ dx+\int_5^{10} 0.05 x^3 \ dx=140.625$

$\displaystyle E(X^4)=\int_0^5 0.15 x^4 \ dx+\int_5^{10} 0.05 x^4 \ dx=1062.5$

The following shows the results.

$\displaystyle Var(X)=\frac{62.5}{3}-3.75^2=\frac{20.3125}{3}=6.77083$

$\displaystyle \gamma_1=\frac{140.625-3 \times 3.75 \times \displaystyle \frac{20.3125}{3} - 3.75^3}{\biggl(\displaystyle \frac{20.3125}{3} \biggr)^{1.5}}=0.66515$

$\displaystyle \text{kurt}[X]=\frac{1062.5-4 \times 3.75 \times 140.625+ 6 \times 3.75^2 \times \displaystyle \frac{62.5}{3}-3 \times 3.75^4}{\displaystyle \biggl(\frac{20.3125}{3} \biggr)^2}=2.56686$

_______________________________________________________________________
$\copyright$ 2017 – Dan Ma