# Method of Moments with Python

May 7, 2018

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.