How to Calculate Variance with Solved Examples?

Variance measures how far observations spread from their mean. This page covers population and sample variance, direct and shortcut formulas, frequency distributions, transformation rules, and solved variance examples. Use the formulas to calculate variance for individual observations and data given with frequencies.

On this page

What Is Variance?

Variance is the average of the squared deviations of observations from their arithmetic mean. It measures the spread of data around the mean.

For observations x₁, x₂, ..., xₙ with mean x̄, variance is calculated by squaring each deviation (xᵢ − x̄), adding the squared deviations, and dividing by the number of observations for population variance. Squaring makes every contribution non-negative. For data 2, 4, 6, 8, the mean is 5 and the population variance is (9 + 1 + 1 + 9) ÷ 4 = 5.

Variance Video Lessons

Watch short topic-wise lessons for quick revision.

3 Lessons
Lesson 1 of 3 Quick Revision

Range, Variance and Standard Deviation

Learn how to calculate and interpret range, variance, and standard deviation as measures of dispersion in statistics, including the role of each measure in describing data spread.

Continue with more lessons and practice in PrepShots.Watch More in App - Start ₹1 Trial →
More Variance Lessons Scroll to explore →

Variance Formula & Tricks

Important Formulas

Population variance
σ² = Σ(xᵢ − μ)² / N

Use this when the data represents the complete population. Here, μ is the population mean and N is the number of observations.

Sample variance
s² = Σ(xᵢ − x̄)² / (n − 1)

Use this when the observations form a sample. Here, x̄ is the sample mean and n is the sample size.

Shortcut formula for individual data
σ² = (Σx² / N) − (Σx / N)²

For population variance, calculate the mean of the squares and subtract the square of the mean.

Frequency distribution variance
σ² = (Σfx² / Σf) − (Σfx / Σf)²

Use this shortcut when x has frequency f. The total frequency is Σf.

Assumed mean formula
σ² = (Σfd² / N) − (Σfd / N)², where d = x − A

A is an assumed mean and d is the deviation from it. This reduces calculation size when the observations are large.

Quick Tricks

Use the mean-square shortcut

Instead of finding every deviation, calculate Σx² and Σx, then apply variance = mean of squares − square of mean.

Example: For 2, 4, 6, 8, Σx = 20, Σx² = 120, and N = 4. Variance = 120/4 − (20/4)² = 30 − 25 = 5.
Apply shift and scale rules

Adding or subtracting the same constant from every observation does not change variance. Multiplying every observation by k multiplies variance by k².

Example: If the variance of x is 5, the variance of x + 10 is 5, while the variance of 3x is 9 × 5 = 45.

Variance Concepts

Population and Sample Variance

Population variance divides the sum of squared deviations by N, whereas sample variance divides it by n − 1.

For a complete data set, use σ² = Σ(x − μ)²/N. For a sample drawn from a larger population, use s² = Σ(x − x̄)²/(n − 1). The denominators differ, so the two answers are generally not equal. For data 2, 4, 6, 8, the squared deviation sum about the mean 5 is 20; population variance is 20/4 = 5, while sample variance is 20/3.

Example: For the observations 5, 7, 9, the mean is 7 and the squared deviation sum is 4 + 0 + 4 = 8. Population variance = 8/3; sample variance = 8/2 = 4.

Direct Method for Individual Observations

The direct method finds the mean, calculates each squared deviation from the mean, and divides their sum by the number of observations.

For data x₁, x₂, ..., xₙ, first find x̄ = Σx/n. Then calculate (xᵢ − x̄)² for every observation. The population variance is the total squared deviation divided by n. This method is suitable when the values and mean are small.

Example: For 3, 5, 7, the mean is 5. Variance = [(−2)² + 0² + 2²]/3 = 8/3.

Variance from a Frequency Distribution

For values with frequencies, multiply each value by its frequency and use the total frequency as the number of observations.

The mean is x̄ = Σfx/Σf. The population variance can be calculated as σ² = Σf(x − x̄)²/Σf or by the shortcut σ² = Σfx²/Σf − (Σfx/Σf)². Frequency counts each repeated occurrence of a value.

Example: For x = 1, 2, 3 with frequencies f = 2, 3, 1, Σf = 6, Σfx = 11, and Σfx² = 23. Variance = 23/6 − (11/6)² = 17/36.

Properties of Variance

Variance is unchanged by a common shift and is multiplied by the square of a common scale factor.

If y = x + c or y = x − c, then Var(y) = Var(x). If y = kx, then Var(y) = k²Var(x). More generally, Var(a + bx) = b²Var(x). Variance is always non-negative and equals zero only when all observations are identical.

Example: If Var(x) = 12 and y = 4x − 7, then Var(y) = 4² × 12 = 192.

Relation Between Variance and Standard Deviation

Standard deviation is the positive square root of variance.

The relation is σ = √σ² for population data and s = √s² for sample data. Therefore, variance is expressed in squared units, while standard deviation is expressed in the original units.

Example: If variance is 49 cm², standard deviation is √49 = 7 cm.

Variance Data Table

Use the structured data below while following the explanation and examples.

Population and Sample Variance

The denominator distinguishes population variance from sample variance.

Measure Formula Denominator
Population variance σ² = Σ(x − μ)² / N N
Sample variance s² = Σ(x − x̄)² / (n − 1) n − 1

Note: Use population variance for a complete data set and sample variance when the data is a sample.

Learn more concepts on PrepShots

Start ₹1 Trial →

Practice Variance Questions

Practise published questions related to this topic.

Want more practice questions?

Practice in App →

Variance Quick Quiz

Attempt 5 questions and check your score instantly.

Quick Revision Notes

Variance Revision Points

Key formulas, properties and methods for quick revision.

  • Variance is the average squared deviation from the mean.
  • Population variance: σ² = Σ(x − μ)²/N.
  • Sample variance: s² = Σ(x − x̄)²/(n − 1).
  • Shortcut: variance = mean of squares − square of mean.
  • For frequency data: σ² = Σfx²/Σf − (Σfx/Σf)².
  • Var(x + c) = Var(x), and Var(kx) = k²Var(x).
  • Variance is never negative and is zero only when all values are equal.
  • Standard deviation is the square root of variance.

Variance FAQs

What is the variance formula for individual observations?

For population data, σ² = Σ(x − μ)²/N. The shortcut form is σ² = Σx²/N − (Σx/N)².

What is the variance of 2, 4, 6, and 8?

The mean is 5, and the squared deviation sum is 20. Population variance = 20/4 = 5.

How is sample variance different from population variance?

Population variance divides by N, while sample variance divides by n − 1. For squared deviation sum 20 from four observations, the answers are 5 and 20/3 respectively.

What happens to variance when 5 is added to every observation?

It remains unchanged because Var(x + c) = Var(x). Adding a constant shifts the data but does not change its spread.

What happens to variance when every observation is multiplied by 3?

Variance becomes nine times the original variance because Var(3x) = 3²Var(x) = 9Var(x).

How do you calculate variance from a frequency table?

Use σ² = Σfx²/Σf − (Σfx/Σf)² for population data, where x is the value and f is its frequency.

Continue learning Variance on PrepShots

Continue on PrepShots