Dividing squared deviations by n minus one is an expectation correction for a particular estimation problem. It is not an instruction to change every average of squared values. In a robot data analysis, first decide whether the target is a population variance, whether the population mean is known, and whether the observations satisfy the sampling assumptions.
State the estimator and target
Let X1 through Xn be independent, identically distributed observations with population mean mu and finite variance sigma^2. Assume n is at least two. Let Xbar be their sample mean and define S = sum of (Xi-Xbar)^2. The uncorrected centered estimator is S/n, while the usual sample variance is s^2 = S/(n-1).
Unbiasedness concerns repeated samples: E[s^2] = sigma^2. It does not assert that the estimate equals the population variance in any particular recorded sample. The statistic can be above the target on one sample and below it on another while its expectation is correct.
ProbabilityCourse's authored point-estimation chapter derives the bias, and MIT's data lecture identifies the corrected sample variance as unbiased. The discrete distribution, complete enumeration, and error comparisons below are original examples. They describe mathematical samples rather than sensor logs or experiments performed on the pictured robot.
Find the amount removed by fitting the mean
For every realized sample, S = sum of (Xi-mu)^2 - n(Xbar-mu)^2. This follows by expanding Xi-mu = (Xi-Xbar)+(Xbar-mu). The cross term vanishes because the deviations from Xbar sum to zero.
Take expectations. The first sum contributes n sigma^2. Independence gives Var(Xbar) = sigma^2/n, and E[Xbar] = mu. Therefore the second term contributes n times sigma^2/n = sigma^2. Hence E[S] = (n-1)sigma^2 and E[S/n] = ((n-1)/n)sigma^2.
The bias of S/n is -sigma^2/n. Dividing by n-1 instead removes this expected shortfall. No normal-distribution assumption appeared in that calculation. Finite variance and the stated independence and identical-distribution conditions are enough for this derivation.
Enumerate a three-observation distribution
Choose an ideal population that takes values -1 and +1 with equal probabilities. Its mean is zero and its variance is one. Draw three independent observations. There are eight ordered triples, each with probability 1/8. Two triples contain three identical values; the other six contain two copies of one sign and one copy of the other.
For either identical-value triple, the sample mean equals all observations, so S = 0. Both S/3 and S/2 are zero, even though the population variance remains one. That outcome is possible because a small random sample need not display the population's entire variation.
For a mixed triple such as (+1,+1,-1), the sample mean is 1/3. Its squared deviations sum to (2/3)^2+(2/3)^2+(-4/3)^2 = 8/3. Every mixed triple has that same sum by symmetry. Thus S/3 = 8/9 and s^2 = S/2 = 4/3 on six of the eight outcomes.
The expected uncorrected estimate is (2/8) times zero plus (6/8) times 8/9 = 2/3. The expected corrected estimate is (6/8) times 4/3 = 1. The latter matches the true variance exactly, even though neither possible corrected estimate, zero or 4/3, equals one on a single sample.
Treat a known mean differently
If the population mean mu = 0 were genuinely known independently, an estimator could use sum of (Xi-mu)^2 divided by n. In this example every Xi^2 equals one, so that known-mean estimator is one for every triple. There is no fitted-mean subtraction to compensate for.
Replacing a known population mean with the sample mean changes the problem. Conversely, declaring the observed sample mean to be a known population mean does not restore the known-mean assumptions. The reason for the denominator must follow the information actually available, rather than the name of a software function.
Taking a square root changes unbiasedness
In the same eight-outcome example, sample standard deviation s is zero with probability 1/4 and sqrt(4/3) = 2/sqrt(3) with probability 3/4. Its expectation is (3/4)(2/sqrt(3)) = sqrt(3)/2, approximately 0.866025. The population standard deviation is one.
An unbiased variance estimate therefore does not automatically produce an unbiased standard-deviation estimate after taking a square root. Expectation and a nonlinear transformation cannot generally be exchanged. The numerical result here establishes that distinction without requiring a normal population or an asymptotic approximation.
Unbiased does not mean smallest squared error
For this particular population and n = 3, the corrected estimator's mean squared error about the true variance one is (1/4)(0-1)^2+(3/4)(4/3-1)^2 = 1/3. For the uncorrected estimator it is (1/4)(0-1)^2+(3/4)(8/9-1)^2 = 7/27, approximately 0.259259.
The biased estimator has smaller mean squared error in this example. That observation does not make it unbiased or prove that it is universally preferable. It shows why the choice of a statistical objective matters: eliminating bias and minimizing average squared error are different criteria.
Check dependence before correcting a denominator
Suppose all recorded observations are copies of one random value Z, with Var(Z) = 1. Every sample has zero centered spread, so s^2 = 0. The marginal variance is still one. The usual correction fails because the records are perfectly dependent; treating duplicate records as independent samples does not create information.
With only one observation and an unknown mean, n-1 is zero and the centered residual contains no variance information. With repeated robot measurements, record the sample count and sampling structure alongside the estimator. A denominator adjustment cannot by itself correct dependence, drift, a changed population, or an error in the target being estimated.
Image caption: Concept illustration from the site's research-platform library, showing a small robot beside a laptop. It illustrates data-analysis context and is not a record of the hypothetical eight outcomes or a measured variance study.
Sources checked October 24, 2026:
https://www.probabilitycourse.com/chapter8/8_2_2_point_estimators_for_mean_and_var.php
https://ocw.mit.edu/courses/15-063-communicating-with-data-summer-2003/a546a4dc680a06bfd15b244715ab08ac_lecture11.pdf