Probability theory: Moments, Variance, Standard deviation

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

Image for post
Image for post
Probability Theory For Programmers

In the previous article, we had a look at characteristics, that shows the position of a random variable on the numerical axis. But there is also a number of characteristics which describe certain distribution properties — Moments. Most of the time we will deal with two types of moments — initial and central.

The initial moment of the s-th order of a discrete random variable X is a sum of the form:

Image for post
Image for post
the initial moment of the s-th order of a discrete random variable

For continuous random variable we have:

Image for post
Image for post
the initial moment of the s-th order of a continuous random variable X

As you can see that the first initial moment is expected value. Also for the initial moment, we can join two previous formulas in one.

Image for post
Image for post
the initial moment of the s-th order of a random variable X

Let’s see how distribution function will change according to the expected value.

change mu parameter of normal distribution

Before we approach central moment we introduce the central random variable. For random variable X with expected value m. Central random variable is deviation of a random variable from its expected value:

Image for post
Image for post
central random variable

Thus, the central moment of the s-th random variable X is the expected value of the s-th degree of the corresponding central random variable. For a discrete random variable:

Image for post
Image for post
the central moment for a discrete random variable

And for continuous random variable:

Image for post
Image for post
the central moment for a continuous random variable

A very important characteristic is the second central moment — Variance. Variance is characteristic of dispersion, scatter of values of a random variable near its expected value.

Image for post
Image for post
variance

Let’s see how distribution function will change according to the expected value.

For a visual characteristic of dispersion, it is more convenient to use a quantity whose dimension coincides with the dimension of the random variable. To do this, a square root is extracted from the dispersion. The value obtained is called the standard deviation. In practice, you will see a standard deviation more often then variance.

Image for post
Image for post
standard deviation

Expected value, variance and standard deviation — the most commonly used characteristics of a random variable. They characterize the most important features of the distribution: its position and degree of dispersion. For a more detailed description of the distribution, higher-order moments are used. But they are out of the scope of this article.

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