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.
σ2 (X ± k) = σ2 (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.
σ2 (kX) = k2 * σ2 (X)
σ2 (X / k) = σ2 (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
-
What happens to mean when a constant value increases each number?
Mean is increased by the same constant value.
-
What happens to variance and standard deviation when a constant value increases each number?
Variance and standard deviation remain constant.
-
How does multiplying a constant value to the dataset affect the mean?
Mean is also multiplied by the same constant value.
-
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.
-
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.
- Cauchy’s Mean Value Theorem
- Rolle’s Mean Value Theorem
- Poisson Distribution
- Prosecutor’s fallacy
Do upvote our blog to help other ninjas grow.
Happy Coding!