# Method of moments (statistics)

In statistics, the method of moments is a method of estimation of population parameters such as mean, variance, median, etc. (which need not be moments), by equating sample moments with unobservable population moments and then solving those equations for the quantities to be estimated.

## Methodology

Suppose that the problem is to estimate $p$ unknown parameters $\theta_{1}, \theta_{2}, \dots, \theta_{p}$ characterizing a distribution $f_{W}(w; \theta)$. Suppose $p$ of the moments of the true distribution can be expressed as functions of the $\theta$s:

$\mu_{1} \equiv E[W^1]=g_{1}(\theta_{1}, \theta_{2}, \dots, \theta_{p}) ,$
$\mu_{2} \equiv E[W^2]=g_{2}(\theta_{1}, \theta_{2}, \dots, \theta_{p}) ,$
$\vdots$
$\mu_{p} \equiv E[W^p]=g_{p}(\theta_{1}, \theta_{2}, \dots, \theta_{p}) .$

Let $\hat{\mu_{j}}=(\Sigma_{i=1}^{n} w_{i}^{j})/n$ be the j-th sample moment corresponding to the population moment $\mu_{j}$. The method of moments estimator for $\theta_{1}, \theta_{2}, \dots, \theta_{p}$ denoted by $\hat{\theta}_{1}, \hat{\theta_{2}}, \dots, \hat{\theta}_{p}$ is defined by the solution (if there is one) to the equations:[citation needed]

$\hat \mu_{1} = g_{1}(\hat{\theta}_{1}, \hat{\theta_{2}}, \dots, \hat{\theta}_{p}) ,$
$\hat \mu_{2} = g_{2}(\hat{\theta}_{1}, \hat{\theta_{2}}, \dots, \hat{\theta}_{p}) ,$
$\vdots$
$\hat \mu_{p} = g_{p}(\hat{\theta}_{1}, \hat{\theta_{2}}, \dots, \hat{\theta}_{p}) .$

## Example

Suppose X1, ..., Xn are independent identically distributed random variables with a gamma distribution with probability density function

${x^{\alpha-1} e^{-x/\beta} \over \beta^\alpha\, \Gamma(\alpha)} \,\!$

for x > 0, and 0 for x < 0.

The first moment, i.e., the expected value, of a random variable with this probability distribution is

$\operatorname{E}(X_1)=\alpha\beta\,$

and the second moment, i.e., the expected value of its square, is

$\operatorname{E}(X_1^2)=\beta^2\alpha(\alpha+1).\,$

These are the "population moments".

The first and second "sample moments" m1 and m2 are respectively

$m_{1} = {X_1+\cdots+X_n \over n} \,\!$

and

$m_{2} = {X_1^2+\cdots+X_n^2 \over n}.\,\!$

Equating the population moments with the sample moments, we get

$\alpha\beta = m_{1} \,\!$

and

$\beta^2\alpha(\alpha+1) = m_{2}.\,\!$

Solving these two equations for α and β, we get

$\alpha={ m_{1}^2 \over m_{2} - m_{1}^2}\,\!$

and

$\beta={ m_{2} - m_{1}^2 \over m_{1}}.\,\!$

We then use these 2 quantities as estimates, based on the sample, of the two unobservable population parameters α and β.