Method of Moments
The Method of Moments is an inferential technique for estimating Population Parameters.
These can be: the mean, variance, skewness, kurtosis and more.
We call Moments to the Expected Values of a Random Variable.
We generate each moment by:
. Arriving to the Moment Generating Function
.Finding the corresponding derivative and plug in 0 where we have t
To use this process we start with the Moment Generating Function.
By definition:
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn23.png)
and at
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn24.png)
p(x) refers to the discrete distribution’s PMF (Probability Mass Function)
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn22.png)
f(x) refers to the continuous distribution’s PDF(Probability Density Function)
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn21.png)
So the first step we check what type of distribution we are handling. If it is a discrete we use the summation function, if it is a continuous distribution, we use the integrating function.
After arriving at the Moment Generating Function we can then work on each individual Moment.
So each moment , is the same order number of the derivative of the Moment Generating Function with 0 plugged in. M1 is the first derivative, M2 the second derivative and so on.
![](http://euseguros.pt/wp-content/uploads/2022/09/M1-1.png)
![](http://euseguros.pt/wp-content/uploads/2022/09/M2-1.png)
![](http://euseguros.pt/wp-content/uploads/2022/09/m3-1.png)
![](http://euseguros.pt/wp-content/uploads/2022/09/m4-1.png)
![](http://euseguros.pt/wp-content/uploads/2022/09/mn-1.png)
From here we can infer the following:
M1 is the Expected Value
![](http://euseguros.pt/wp-content/uploads/2022/09/ex.png)
And we can obtain the Variance of x by using M2 and M1
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn19.png)
![](http://euseguros.pt/wp-content/uploads/2022/09/varx-2.png)
Moment Generating Function for the Bernoulli Distribution
The Bernoulli Distribution is discrete. It’s PMF is:
![](http://euseguros.pt/wp-content/uploads/2022/09/Bernoulli-PMF.jpg)
We start by the definition of the MGF, where:
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn23.png)
And since this is a discrete distribution , we use the discrete branch:
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn22.png)
We have x=0 and x=1, so we do the substitution:
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn28.png)
and get:
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn30.png)
which is our Moment Generating Function (MGF)
So now, we can find M1 to get E[x] and with M2 we can then obtain Var(x). Let’s do that.
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn31.png)
And to find Var(x) we need M2, so:
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn32.png)
Var(x) uses both moments, so we do the substitution and square M1 to arrive to the correct expression:
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn19.png)
![](http://euseguros.pt/wp-content/uploads/2022/09/varx-2.png)
So, the Variance is:
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn33.png)
Moment Generating Function for the Exponential Distribution
We start by firstly retrieving the Exponential distribution
![](http://euseguros.pt/wp-content/uploads/2022/09/poisson.png)
The exponential distribution is continuous so we use the integration branch.
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn21.png)
we now substitute function branch in our MGF
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn35.png)
to get our MGF:
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn36.png)
To find the first moment we do the first derivative of MGF and then plugin in 0 where t is
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn37.png)
To find the second moment we do the second derivative of MGF and then plugin in 0 where t is
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn38.png)
To find the variance we use the first and second moment.
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn19.png)
![](http://euseguros.pt/wp-content/uploads/2022/09/varx-2.png)
So, the Variance is:
![](http://euseguros.pt/wp-content/uploads/2022/09/CodeCogsEqn39.png)