Code360 powered by Coding Ninjas X Naukri.com. Code360 powered by Coding Ninjas X Naukri.com
Table of contents
1.
Introduction
2.
Mean
2.1.
Use
2.2.
Properties
3.
Variance
3.1.
Uses of Variance
3.2.
Properties of Variance
4.
Standard Deviation
4.1.
Uses of Standard Deviation
4.2.
Properties of Standard Deviation
5.
FAQs
6.
Key Takeaways
Last Updated: Mar 27, 2024

Mean, variance, standard deviation

Leveraging ChatGPT - GenAI as a Microsoft Data Expert
Speaker
Prerita Agarwal
Data Specialist @
23 Jul, 2024 @ 01:30 PM

Introduction

This article will discuss the mean, its use, and some essential properties of the mean. Similarly, we will discuss the uses and properties of variance and standard deviation.

Mean

Mean is the mathematical average of a set of numbers. Mean can be obtained by dividing the sum of all the numbers by the total number of elements. It is denoted by μ.

In mathematical form, mean can be expressed as:

For example:

We have to find the mean of { 4 , 5 , 6 , 7 , 9 , 12 , 6 }

Sum of given numbers = (4 + 5 + 6 + 7 + 9 + 12 + 6) = 49

Total number of given numbers = 7

Mean= Sum of given numbers/ total number of given numbers

μ = 49 / 7 = 7

Use

Mean can be used to get an overall idea of the given dataset. It works well when the given dataset is close to each other. If the numbers are { 1, 100 }, the mean will be 50.5, which doesn't provide a clear idea of the dataset. But if the dataset is { 1, 2, 3 }, the mean will be 2, which gives a good idea about the dataset.

Properties

  • When a constant number is added or subtracted to all the numbers, the mean increases or decreases respectively by the same constant number.

μ(X + k) = μ(X) + k

μ(X - k) = μ(X) - k

  • When a constant number is multiplied or divided by all the numbers, the mean is also multiplied or divided by that constant number.

μ(kX) = k μ(X)

μ(X/k) = μ(X) / k

Get the tech career you deserve, faster!
Connect with our expert counsellors to understand how to hack your way to success
User rating 4.7/5
1:1 doubt support
95% placement record
Akash Pal
Senior Software Engineer
326% Hike After Job Bootcamp
Himanshu Gusain
Programmer Analyst
32 LPA After Job Bootcamp
After Job
Bootcamp

Variance

Variance is the mean of the square of the difference of all the numbers from the mean. The unit of variance is the square of the unit of the original dataset. If the original dataset has a unit of Kg (kilogram), the variance will have a unit of Kg2. In mathematical form, variance can be written as:

Variance is expressed as σ2.

Let's find the mean and variance of an example to understand it better.

{ 4 , 5 , 6 , 7 , 9 , 12 , 6 }

Mean = ( 4 + 5 + 6 + 7 + 9 + 12 + 6 ) / 7 = 7

Variance = ( ( 4 - 7 )2 + ( 5 - 7 )2 + ( 6 - 7 )2 + ( 7 - 7 )2 + ( 9 - 7 )2 + ( 12 - 7 )2 + ( 6 - 7 )2 ) / 7

=( 9 + 4 + 1 + 0 + 4 + 25 + 1 ) / 7 = 6.28

Uses of Variance

Variance is a measure of variability, and it tells the degree of spread or dispersion of the dataset.

Properties of Variance

  • The variance of a dataset is always a positive number because of a straightforward reason that we are taking the square of the differences, and the squared value is always positive.
  • When a constant number is added or subtracted to all the numbers, the variance remains constant because its mean increases or decreases with the same value. When we take the difference, it gets cancelled out.

σ(X ± k) = σ(X)

  • When a constant number is multiplied or divided into all the numbers, the variance is multiplied or divided by the square of that constant number.

σ(kX) = k2 * σ(X)

σ(X / k) = σ(X) / k2

Standard Deviation

Standard deviation is the square root of variance. It differs from variance as the standard deviation unit is the same as the dataset. It is denoted by σ. It is also called root-mean-square deviation since it is the square root of the mean of the square of values.

Standard deviation can be expressed as:

Consider the example { 4, 5, 6, 7, 9, 12, 6 } that we discussed above in the variation section.

We calculated variance as 6.28.

So the standard deviation will be √6.28 = 2.21

Uses of Standard Deviation

Standard deviation measures the extent to which the data varies from the mean.

Properties of Standard Deviation

  • Standard deviation cannot be negative as the square root values are always greater than or equal to zero.
  • When the data in the dataset are close to each other, the standard deviation will be low or close to zero. But when the values are far from each other, the standard deviation value is high.
  • When a constant value is added or subtracted to the dataset, then the standard deviation remains constant for the same reason that the variance remains constant.

σ (X ± k) = σ (X)

  • When a constant value is multiplied or divided by the dataset, the standard deviation is multiplied or divided by the same constant value.

σ (k X) = k * σ (X)

σ (X / k) = σ (X) / k
Check out this problem - Subarray Sum Divisible By K

FAQs

  1. What happens to mean when a constant value increases each number?
    Mean is increased by the same constant value.
  2. What happens to variance and standard deviation when a constant value increases each number?
    Variance and standard deviation remain constant.
  3. How does multiplying a constant value to the dataset affect the mean?
    Mean is also multiplied by the same constant value.
  4. How does multiplying a constant value to the dataset affect the variance and standard deviation?
    Variance is multiplied by the square of that constant value, and the standard deviation is multiplied by the same constant value.
  5. How does the division of the dataset by a constant value affect the mean, variance, and standard deviation?
    Mean and standard deviation is divided by the same constant value, and variance is divided by the square of that constant value.

Key Takeaways

In this article, we have extensively discussed the mean, variance, and standard deviation. We hope that this blog has helped you enhance your engineering mathematics and statistics knowledge. If you would like to learn more, check out our other engineering mathematics and statistics articles.

  1. Cauchy’s Mean Value Theorem
  2. Rolle’s Mean Value Theorem
  3. Poisson Distribution
  4. Prosecutor’s fallacy

Do upvote our blog to help other ninjas grow.

Happy Coding!

Live masterclass