Statistics: Method of moments

This is part of the course “Probability Theory and Statistics for Programmers”.

Image for post
Image for post
Probability Theory and Statistics For Programmers

Imagine that we have a population with a specific distribution. As we already know distribution density function have the number of parameters. There is a large number of distribution functions and each of them has a different number of parameters, however most of the time one or two. For example, normal distribution has two parameters — μ and σ, which is mean and variance, however, Poisson distribution has only one parameter — λ, which is the rate. As always in statistics task, we have data sample from this population and need to make some estimation. Since we have data sample we can calculate sample moments(numerical characteristics of statistical distribution). The most used moments are first — expected value and second — variance. Also sometimes can be used third and fourth central moments. They are — skewness and kurtosis.

The method of moments solves such task: calculate the parameters of the population distribution function having a distribution function and a sample data. Let’s take the distribution from one of the previous articles, calculate parameters and compare an actual distribution with one calculated with the method of moments.

As you can see from the example we obtain result close to actual distribution with a small sample. In this example, we calculate only two moments since the population has a normal distribution, which has two parameters.

The generic approach for calculating parameters of population distribution function with k parameters by using the method of moments:

  1. find k sample moments.

Next part ->

Reach the next level of focus and productivity with increaser.org.

Image for post
Image for post
Increaser

Written by

Software engineer, creator of increaser.org. More at geekrodion.com

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store