Statisticsdrill

Descriptive statistics Updated November 2026

Variance

Variance is the average squared distance of the values from their mean. For a sample divide the sum of squared deviations by n - 1; for a population divide by n. Its square root is the standard deviation.

Syntax

s^2 = sum((x - mean)^2) / (n - 1)
PartWhat it is
x - meanthe deviation of each value from the mean
n - 1the degrees of freedom for a sample; a population uses n

Examples

Data: 1, 2, 3, 4, 5  (mean = 3)
squared deviations: 4, 1, 0, 1, 4  (sum = 10)
sample variance = 10 / 4

Result: 2.5

Excel: =VAR.S(A1:A5)

Same data as a population
population variance = 10 / 5

Result: 2

Excel: =VAR.P(A1:A5)

Data: 2, 4, 4, 4, 5, 5, 7, 9  (mean = 5, sum of squared deviations = 32)
population variance = 32 / 8

Result: 4; standard deviation = sqrt(4) = 2

Common mistakes

  • Treating variance as if it were in the same units as the data; it is in squared units, so a variance of 2.5 kg^2 is not 2.5 kg.
  • Using the sum of deviations instead of squared deviations; the plain deviations always sum to zero.
  • Mixing VAR.S and VAR.P between groups you are comparing; pick one and apply it to every group.

Practice Variance

These drills check your answer on live data, free, no account needed.

  • Sample standard deviationA random sample of 6 minutes to resolve a support ticket (minutes): 46, 35, 28, 23, 26, 17. What is the sample standard deviation? Round to 2 decimal places.
  • Population standard deviationThese are the figures for every store in a small retail chain, so they are the whole population, not a sample. Weekly revenue in thousands of dollars: 63, 50, 42, 37, 39. What is the population standard deviation? Round to 2 decimal places.

Questions

Is variance the same as standard deviation?

No. Variance is the squared standard deviation. Standard deviation is usually reported because it is in the original units; variance is used in the formulas behind tests, ANOVA and regression.

Can variance be negative?

No. It is an average of squared numbers, so it is zero when all values are identical and positive otherwise.

What does VAR do in Excel without .S or .P?

The legacy VAR function is the same as VAR.S (sample variance). VARP is the same as VAR.P.

Related

  • Standard deviationThe standard deviation formula, sample versus population versions, a worked example with exact numbers and the Excel functions STDEV.S and STDEV.P.
  • CovarianceHow to calculate sample and population covariance, a worked example with exact numbers, how covariance becomes correlation, and Excel COVARIANCE.S and .P.
  • Coefficient of variationThe coefficient of variation (CV) is the standard deviation divided by the mean, as a percent. Formula, worked examples, Excel and when it misleads.
  • Standard errorThe standard error of the mean is s / sqrt(n); for a proportion it is sqrt(p(1 - p) / n). Worked examples, SE versus standard deviation and the Excel formula.

Previous: Standard deviationNext: z-score