AI Glossary / Statistics and probability / Foundation
Variance
Definition
Variance measures spread by averaging squared deviations from a mean. For a random variable X with a finite second moment, population variance is E[(X minus E[X]) squared]. For a complete finite dataset treated as the population, divide the sum of squared deviations by the number of values. A common unbiased estimator from an independent random sample divides by n minus one instead. Variance has squared units, and its square root is the standard deviation.
What it means
Values close to the mean produce small squared deviations, while distant values contribute much more. Squaring prevents positive and negative deviations from canceling. Variance therefore captures dispersion but is sensitive to extreme observations. It is not a measure of whether the mean is desirable or whether predictions are systematically too high. Two datasets can have the same variance and very different shapes, tails or operational implications. A variance estimate also has sampling uncertainty of its own.
How it works
Calculate the mean, subtract it from each value, square the differences and add them. Choose the divisor according to the target: n describes the empirical population variance, while n minus one gives the usual unbiased sample estimator under independent, identically distributed observations with finite variance. For weighted data or complex samples, use a formula appropriate to the weight meaning and design. Adding a constant leaves variance unchanged. Multiplying values by a constant c multiplies variance by c squared. Variances of sums require covariance terms unless the relevant covariances are zero.
Three practical examples
Example 1: A service team measures variability in response times around their mean. Example 2: An AI analyst compares dispersion of prediction errors across evaluation settings. Example 3: A manufacturer studies variation in component measurements, alongside whether their mean meets a target. The same numerical variance can mean different things in different units, and low variance alone does not establish accuracy, fairness or acceptable performance.
Think of it this way
Think of measuring how far scattered points lie from their center, giving larger distances extra emphasis by squaring them. A tight cluster has small variance; widely scattered points have larger variance. Moving the whole cluster without changing its shape leaves the variance unchanged, even though its location relative to a desired target may become much worse.
Worked example
Take four values: one, three, five and seven. Their mean is four. The deviations are -3, -1, 1 and 3, whose squares sum to 9 + 1 + 1 + 9 = 20. If these four values are the complete population of interest, variance is 20/4 = 5. If they are an independent random sample used to estimate a larger population variance, the usual sample estimate is 20/3, approximately 6.667. Now transform every value by multiplying by two and adding ten. The new values are twelve, sixteen, twenty and twenty-four, with mean eighteen and population variance twenty. The additive shift changes location only, while the multiplication increases variance by a factor of four. The choice of divisor reflects the inferential target, not an arithmetic disagreement.
Illustrative case study
In this fictional case study, Acacia Support compares two AI response systems. One has tightly clustered response times but an undesirably high average. Another is faster on average but more variable. Analysts report means, standard deviations and upper percentiles rather than announcing that the lower-variance system is automatically better. They also investigate whether rare long delays dominate the variance and whether observations from the same session should be treated as dependent.
Common misconceptions and mistakes
Common mistakes include confusing variance with standard deviation, forgetting squared units, and assuming n minus one is always the correct divisor for every descriptive task. Another mistake is adding variances of correlated quantities without covariance terms. A zero variance means the variable is constant almost surely under the model; it does not mean the constant is correct or useful. Some heavy-tailed distributions have no finite variance, so variance-based summaries and standard approximations may be inappropriate.
Business use
Businesses use variance in quality analysis, forecasting, experimentation and model evaluation. Explain the units and target, and often provide standard deviation because it returns to the original measurement scale. Pair spread measures with location and relevant tail summaries. When comparing variability across differently scaled quantities, choose an appropriate standardization rather than comparing raw variances blindly. Distinguish variation in individual outcomes from the sampling variance of an estimated average, which is a different quantity used to describe estimation uncertainty.
People also ask
Can variance be negative?
A true variance cannot; numerical or estimation issues may require investigation if a calculation produces a negative value.
Does low variance imply low error?
No.
Why square deviations?
To avoid cancellation and quantify dispersion with greater emphasis on larger departures.
Is sample variance the same as variance of the sample mean?
No.
Does adding ten to every value change variance?
No.
Check your understanding
What is the population variance of one, three, five and seven?
Answer: Five.
What is the usual unbiased sample variance estimate?
Answer: 20/3.
What happens when every value is doubled?
Answer: Variance is multiplied by four.
Why should standard deviation accompany variance in a report?
Answer: It expresses spread in the original units and is often easier to interpret.
Related terms
- Covariance
- Mean Squared Error
- Sample variance
- Related terms include standard deviation
- population variance and sampling variance
Learn next
Learn next how covariance determines the variance of sums and differences. Then compare standard deviation with robust spread measures such as the interquartile range. Practice distinguishing outcome variability from uncertainty in an estimate, especially when observations are clustered or collected over time.
More in Statistics and probability
- Van der Waerden test - The Van der Waerden test is a rank-based test that compares independent groups by converting pooled ranks into standard normal quantiles, called normal scores.
- Variable sampling fraction - A variable sampling fraction means that different proportions of units are selected from different parts of a population, commonly from different strata.
- Variables sampling plan - A variables sampling plan is an acceptance-sampling procedure that uses quantitative measurements from sampled items to decide whether to accept a lot.
- Variance components - Variance components are parameters that represent distinct sources of random variation in a statistical model.
- Variance estimation - Variance estimation is the task of estimating the variability of a statistical estimator across repeated samples or repeated realizations of its...
- Variance inflation factor ( VIF ) - The variance inflation factor, or VIF, measures how linear relationships among predictors inflate the variance of an estimated ordinary least squares...
Sources
Sources: NIST/SEMATECH Engineering Statistics Handbook, Measures of Scale, https://www.itl.nist.gov/div898/handbook/eda/section3/eda356.htm; Australian Bureau of Statistics, Statistics: A Powerful Edge, https://www.abs.gov.au/ausstats/abs%40.nsf/latestproducts/BD5120561857D60BCA2571FE007D69E1. These primary instructional sources explain squared-deviation measures. The four-value and rescaling calculations are original and independently checked; the response-system case is fictional.
Previous: Variables sampling plan Next: Variance components