# Statistics – Finding Mean, Variance and Standard Deviation

I’ve been following a course called “Intro to descriptive statistics” on Udacity. And I’ve found some interesting stuff which I’d like to share in this post. This is basically going to help you find the mean, variance and standard deviation for a given problem.

Let’s say we have a set of these 5 numbers:

`6, 7, 10, 15, 17`

The mean (or the average) of these numbers is obviously given by this formula –

`(Sum of all the integers in the set ) / (number of integers in the set)`

So the mean turns out to be –

```Mean = (6+7+10+15+17)/5
= 11```

Now we’d like to calculate the variance. And variance is defined as “squared deviation of a random variable from its mean” (according to Wikipedia).

To calculate variance, we have to create a new set of numbers by subtracting every number from it’s mean. It’s done as follows –

```6-11 = -5
7-11 = -4
10-11 = -1
15-11 = 4
17-11 = 6```

We then have to square the numbers in this new set –

```(-5)^2 = 25
(-4)^2 = 16
(-1)^2 = 1
(4)^2 = 16
(6)^2 = 36```

Now we have to find the mean of these numbers –

```Mean of new set (or the variance) = (25+16+1+16+36)/5
= 18.8```

This new mean is called the variance.
The square root of variance is called standard deviation.

```Standard Deviation = sqrt(18.8)
= 4.335```

These are some really basic things which one should know if they’re into statistics 🙂

This site uses Akismet to reduce spam. Learn how your comment data is processed.