Variance and Standard Deviation
Two populations of Darwin's finches can have identical mean beak depths. Yet they can look utterly different in the field. One population is a tight cluster of nearly identical birds. The other spans tiny sharp-billed individuals and massive crushing-billed ones. The mean alone cannot tell these populations apart. A second number is needed, one that measures how spread out the data are. That number is the variance, and its square root is the standard deviation (SD). SD is the workhorse measure of biological variability. Almost every quantitative claim in biology is really a claim about means. A drug lowers blood pressure, a mutation increases fitness, a diet changes body mass. These are all claims about a difference in means relative to the noise around them. Without a rigorous measure of spread, "different" is meaningless. Any two means differ by some amount just from sampling. The big picture: the mean locates the center of a distribution. The variance and SD quantify the dispersion around that center. Variance is in squared units; SD is in original units. Biologists rely on SD to describe trait variability (is body size more variable in males or females?). They also use it to build confidence intervals and hypothesis tests. It helps compare the reliability of measurements. Getting this concept exactly right is essential. This includes a subtle but consequential correction called "n − 1". It is a prerequisite for essentially every inferential technique that follows, from t-tests to regression. This article builds variance and SD from first principles. It explains why squaring is used. It explains why dividing by n − 1 rather than n gives an unbiased estimate of population variability. It shows how to compute both by hand on an asymmetric data set. It also connects these quantities to The Interquartile Range and Boxplots and The Coefficient of Variation, as alternative or complementary spread measures.
- Variance measures average squared deviation from the mean; SD is its square root, back in original units.
- Population variance divides by N; sample variance divides by n − 1 (Bessel's correction) to remove bias.
- Squaring deviations (rather than using absolute values) makes the measure mathematically tractable and penalizes large deviations more.
- SD is reported in the same units as the data (mm, mg, mmHg), unlike variance (mm², mg², mmHg²).
- For a roughly bell-shaped distribution, about 68% of values lie within 1 SD and about 95% within 2 SD of the mean.
- SD depends on measurement scale, which is why the unit-free Coefficient of Variation is used to compare variability across different scales.
Variance is the average squared distance of data points from the mean, and standard deviation — its square root — expresses that same spread back in the original measurement units.
The core idea
The variance of a set of measurements is the average of the squared deviations of each observation from the mean. Formally, for a population of size N with mean μ (mu), the population variance is:
Squaring serves two purposes. First, it makes all deviations positive, so they cannot cancel out (a raw sum of deviations from the mean is always zero — that is a defining algebraic property of the mean). Second, squaring weights large deviations disproportionately, which is often biologically sensible: an individual far from the mean phenotype represents more "unusual" variation than the sum of several individuals close to the mean would suggest. The standard deviation, σ (sigma), is the square root of the variance:
Taking the square root undoes the squaring of units, returning the measure to the original scale — millimeters instead of millimeters², beats per minute instead of (beats per minute)². This is the crucial practical reason SD, not variance, is the number biologists actually report and interpret: it is directly comparable to the mean and to the raw data. In practice, biologists almost never have access to an entire population — a full census of every finch on every Galápagos island, every neuron in a species' brain, every red blood cell in a patient's body. Instead they work with a sample of size n drawn from that population, and they use the sample to estimate the population parameters (see Parameters versus Statistics). This distinction — μ and σ² for populations, versus (x-bar) and s² for samples — is not mere notation. It changes the formula itself, because estimating variance from a sample average with the sample's own mean systematically underestimates the true population variance. Correcting for that bias is the single most important technical wrinkle in this entire topic.
Mechanism — from deviations to a usable number
Step 1: Center the data. Compute the mean of the data set, , using the arithmetic mean as covered in The Mean, Median, and Mode. This is the reference point from which spread is measured.
Step 2: Compute deviations. For every observation, calculate , the signed distance from the mean. Some will be positive (above the mean), some negative (below).
Step 3: Square each deviation. Compute for every observation. Squaring removes the sign so that above-mean and below-mean deviations both contribute positively to the total spread, and it inflates the influence of outliers relative to typical points.
Step 4: Sum the squared deviations. This total, , is called the sum of squares (SS). It is the raw currency of variability that reappears throughout statistics — in ANOVA, regression, and beyond.
Step 5: Divide by the appropriate denominator. This is where population and sample formulas diverge:
| Quantity | Formula | Divide by | Used when |
|---|---|---|---|
| Population variance | N | The entire population was measured | |
| Sample variance | n − 1 | Estimating σ² from a sample |
Step 6: Take the square root. (sample SD) or (population SD), converting back to the original units.
Why n − 1? The sample mean is calculated from the same data whose spread is being measured, and is mathematically guaranteed to be the point that minimizes the sum of squared deviations for that particular sample. Using the true population mean μ (which is unknown) would generally give a larger sum of squares. Because is "tuned" to the sample, using it slightly understates the true spread around μ. Dividing by a smaller number, n − 1 instead of n, inflates the estimate just enough to compensate on average. This is Bessel's correction, and it makes an unbiased estimator of σ²: averaged over many repeated samples, neither systematically over- nor under-estimates the population variance, whereas dividing by n would systematically underestimate it. This loss of one degree of freedom (n − 1 "degrees of freedom") occurs because one piece of information — the mean itself — has already been extracted from the data and used up in the calculation. The effect of the correction is largest for small samples (dividing by 4 instead of 5 matters a lot) and vanishes as n grows large (dividing by 999 versus 1000 barely matters).
Step 7: Interpret via the empirical rule. For data that are approximately normally distributed (a bell-shaped curve — see the Gaussian discussion under measurement error), the SD has a direct probabilistic interpretation:
| Range | Approx. % of data contained |
|---|---|
| ~68% | |
| ~95% | |
| ~99.7% |
This "68–95–99.7 rule" is only exact for a true normal distribution, but it gives useful intuition for any roughly symmetric, unimodal data set — a quick way to sanity-check whether an observation is unusually extreme.
The evidence
Unlike a discovery such as the mean itself — which is ancient — the formal concept of variance was defined and named by one specific act of statistical invention, and the n − 1 correction was independently justified and empirically vindicated in classic ways.
Karl Pearson (1893–1894) coined "standard deviation." In lectures and papers on the mathematical theory of evolution, Pearson introduced the term "standard deviation" for the root-mean-square deviation from the mean, building on earlier work by Gauss and by Pearson's own predecessors on the "probable error." Pearson was explicitly motivated by Francis Galton's biometric program — quantifying variation in human and animal traits to study heredity and natural selection. Before Pearson's clean formalization, biologists and astronomers used related but less standardized measures ("mean error," "probable error"), making comparisons across studies difficult. Pearson's SD gave the field a single, mathematically well-behaved yardstick.
Ronald Fisher (1920s) rigorously established degrees of freedom and the n − 1 correction. Fisher, working on the statistical analysis of agricultural field trials at Rothamsted Experimental Station, proved formally that dividing the sum of squared deviations from the sample mean by n gives a biased (systematically too-small) estimate of the population variance, and that dividing by n − 1 removes this bias exactly. His reasoning: the sample mean is itself estimated from the data, using up one "degree of freedom," so only n − 1 independent pieces of information remain to estimate spread. This is not merely a rule of thumb — it can be proven algebraically by expanding and showing it equals in expectation, a result confirmed repeatedly by simulation: if you draw thousands of random samples of size n from a known population, average their "divide by n" variances, the average falls short of the true σ²; average their "divide by n − 1" variances, and the average converges exactly on σ².
Empirical demonstration by resampling. The cleanest modern "experiment" proving the bias is a simulation, and it is worth describing because it is exactly reproducible and routinely used in statistics instruction: take a population with a known variance (for instance, generate 10 million values from a normal distribution with σ² = 4). Repeatedly draw samples of size n = 5, and for each sample compute both and . Averaged over, say, 100,000 such samples, converges to approximately 3.2 (biased low, roughly ), while converges to almost exactly 4.0. This computational demonstration — impossible before electronic computing but trivial today — is the direct, repeatable confirmation of Fisher's 1920s algebraic proof, and it is why every statistical software package (R's `var()`, Excel's `VAR.S`) defaults to n − 1 for sample data.
Biological application that made variance indispensable: R. A. Fisher's analysis of variance (ANOVA). Fisher's work at Rothamsted on comparing crop yields across fertilizer treatments required partitioning total variability into components — variation between treatment groups versus variation within groups. This partitioning is only possible because sums of squares (built from the same squared-deviation logic as variance) can be added and subtracted meaningfully, unlike measures based on absolute deviations. ANOVA's success in agricultural and later biomedical experimentation is, historically, the strongest practical vindication of building spread measures on squared deviations rather than alternatives like mean absolute deviation.
Worked examples
Example 1 — a genetics-adjacent physiological measurement: litter sizes in a mouse colony. A researcher records the number of pups in seven litters from a mutant mouse line suspected of having reduced, but more erratic, litter sizes:
Step 1 — mean:
Step 2/3 — deviations and squares:
| 4 | −2.857 | 8.163 |
| 5 | −1.857 | 3.449 |
| 5 | −1.857 | 3.449 |
| 6 | −0.857 | 0.735 |
| 7 | 0.143 | 0.020 |
| 9 | 2.143 | 4.592 |
| 12 | 5.143 | 26.449 |
Step 4 — sum of squares:
Step 5 — this is a sample of litters (not every litter this mouse line will ever produce), so divide by n − 1 = 6:
Step 6 — standard deviation:
Interpretation: mean litter size is about 6.9 pups, but the typical litter deviates from that mean by roughly 2.8 pups — a large relative spread, consistent with the "erratic" litter sizes the researcher suspected, driven heavily by that one litter of 12 (which alone contributes more than half the total sum of squares — a useful illustration of how squaring amplifies the influence of extreme values).
Example 2 — clinical scenario: comparing variability of blood pressure control between two drugs. A trial measures systolic blood pressure reduction (mmHg) in patients on two antihypertensive drugs, n = 6 patients each: Drug A: 8, 10, 9, 11, 10, 12 Drug B: 2, 18, 4, 16, 3, 17 Both drugs might have similar means. Check:
Identical means — a clinician looking only at average effect would call these drugs equivalent. Now compute spread. Drug A deviations squared: ; SS = 10
Drug B deviations squared: ; SS = 298
Interpretation: Drug A reduces blood pressure by 10 mmHg with tight consistency (SD ≈ 1.4 mmHg) — nearly every patient responds predictably. Drug B has the same average effect but wildly inconsistent responses (SD ≈ 7.7 mmHg) — some patients barely respond (2–4 mmHg reduction) while others respond dramatically (16–18 mmHg reduction). A clinician choosing based on the mean alone would miss this crucial difference: Drug A is the more predictable choice for an individual patient, even though "on average" the drugs look identical. This is precisely why variance and SD, not just the mean, are reported in clinical trial results.
Common misconceptions & traps
| Misconception | Why it's wrong |
|---|---|
| "Variance and SD measure the same thing, just written differently." | They are related but not interchangeable in interpretation: variance is in squared units and is not directly comparable to the mean or raw data; SD is in original units and is the one to report/plot. |
| "You should always divide by n − 1." | Only when estimating a population's variance from a sample. If you truly have the entire population (rare in biology), divide by N. |
| "A small SD means the mean is 'more correct.'" | SD measures spread of individual data points, not the precision of the mean estimate — that is the job of the standard error, , a related but distinct quantity. |
| "SD and range measure the same thing." | Range uses only the two most extreme values and is highly sensitive to outliers and sample size; SD uses every observation. |
| "Two data sets with the same SD are equally variable in a meaningful sense." | SD is scale-dependent — 5 mmHg of variability means something different for a 10 mmHg mean than a 100 mmHg mean; use the Coefficient of Variation to compare relative variability across different scales or units. |
| "Squaring deviations is an arbitrary mathematical trick." | Squaring is deliberate: it removes sign cancellation, penalizes large deviations, and (crucially) makes variance additive across independent sources of variation, enabling techniques like ANOVA. |
The scientist behind it
Origins · 1 minKarl Pearson and how this was discovered
Trained originally in mathematics and law, Karl Pearson became the founding force of modern mathematical statistics through his collaboration with Francis Galton and W. F. R. Weldon on the "biometric" study of heredity and evolution. Pearson believed that Darwinian evolution could only be studied rigorously by measuring variation precisely across large populations of organisms — barnacles, crabs, humans — and he needed a standardized vocabulary and formalism to do it. In an 1893 lecture (published 1894–1895) he coined "standard deviation" for the root-mean-square deviation, and he developed the correlation coefficient, chi-squared test, and the method of moments. He founded the journal Biometrika in 1901 specifically to house this new quantitative biology, and the department he built at UCL trained the next generation of statisticians, including — after early friction and a famous rivalry over methodology — Ronald Fisher, who would later formalize the n − 1 correction and degrees of freedom that completed the theory Pearson began.
Where this matters today
Clinical trials and drug regulation. Regulatory agencies require not just the mean effect of a treatment but its variability, since a drug with a large SD in response may need dose adjustment per patient or reveal a subgroup of non-responders — exactly the logic of the blood pressure example above, played out routinely in Phase II/III trial reporting.
Genomics and quality control. Gene expression measurements (RNA-seq, microarrays) are normalized and filtered using variance: genes with near-zero variance across samples are uninformative and are routinely dropped before differential expression analysis or clustering, while variance-stabilizing transformations correct for the fact that raw expression variance often scales with mean expression.
Conservation biology. Population viability analyses use the variance in population growth rate (not just its mean) to predict extinction risk — high-variance populations are far more vulnerable to stochastic extinction even with an identical average growth rate, directly paralleling the Drug A/Drug B logic above.
Agriculture and animal breeding. Selective breeding programs track both the mean and the variance (heritable component) of traits like milk yield or growth rate; a trait with low variance offers little for selection to act on, connecting directly back to Fisher's original agricultural motivation for developing these tools.
Laboratory quality control. Repeated measurements of a control sample (e.g., a calibration standard on a spectrophotometer or blood analyzer) are tracked via their SD to monitor instrument precision; a sudden rise in SD signals a malfunctioning instrument even if the mean reading looks unchanged.
Public health surveillance. Age-adjusted rates and their variability across regions or time periods rely on variance calculations to distinguish a true trend (e.g., rising disease incidence) from noise expected under random sampling — the basis for confidence intervals reported in epidemiological bulletins.
Ask the tutor: If two samples have very different sizes, how should I decide whether their difference in standard deviations is a real biological difference or just sampling noise?
Why do we square the deviations instead of just taking the absolute value?
Both approaches remove the sign problem (deviations from the mean always sum to zero), so at first glance absolute deviation seems simpler and more intuitive. But squared deviations have far better mathematical properties: they are differentiable everywhere (useful for optimization and derivations), they combine additively across independent sources of variability (the basis of ANOVA and variance partitioning), and the resulting estimator has a well-understood sampling distribution (chi-squared) that underlies confidence intervals and hypothesis tests. Mean absolute deviation is used occasionally as a more outlier-robust alternative, but it lacks this rich analytical structure, which is why variance and SD, not mean absolute deviation, became the standard tools in inferential statistics.
Is standard deviation the same as standard error?
No, and confusing them is one of the most common errors in biology papers. The standard deviation, s, describes the spread of individual data points around the sample mean — it answers "how variable are the organisms/measurements themselves?" The standard error, , describes the precision of the sample mean as an estimate of the population mean — it answers "how much would this mean likely change if I repeated the study?" SE always shrinks as sample size grows, while SD does not necessarily shrink with more data (spreading in the underlying population is a fixed biological property). Report SD when describing variability in the data; report SE (or confidence intervals) when describing uncertainty in an estimated mean.
When should I use the population formula (divide by N) versus the sample formula (divide by n − 1)?
Use the population formula only when your data genuinely constitute the entire group of interest with no further inference intended — for example, the actual exam scores of every student in one specific class, if you only care about that class and not some larger hypothetical population of students. In essentially all biological research, data are a sample meant to generalize to a larger population (the species, future patients, the ecosystem), so the sample formula with n − 1 is correct. When in doubt, use n − 1; it is the overwhelmingly more common and defensible choice in practice, and virtually all statistical software defaults to it.
Does a larger standard deviation always mean "worse" data or a "worse" treatment?
Not necessarily — it depends on context. A large SD in a control group's baseline trait (e.g., natural variation in fish length in a wild population) is simply a true biological property being accurately captured, not a flaw. A large SD in repeated measurements of the same physical quantity (e.g., pipetting the same solution five times) usually does indicate poor measurement precision or technique. In treatment comparisons, as in the blood pressure example, a larger SD can reveal that a drug's effect is inconsistent across patients — clinically important information, but not automatically "bad" if the mean effect is still beneficial for most patients; it changes how the result should be interpreted and acted on, not whether it is a good or bad number in isolation.
How does variance connect to the normal distribution and the "68-95-99.7 rule"?
The normal (Gaussian) distribution is fully described by just two parameters: its mean μ and its standard deviation σ. The distribution's characteristic bell shape means that a fixed proportion of the total probability always falls within a given number of SDs of the mean — about 68% within ±1σ, 95% within ±2σ, and 99.7% within ±3σ — regardless of the specific values of μ and σ. This rule is exact only for a truly normal distribution, but many biological traits (height, blood pressure, enzyme activity) are approximately normal, so the rule gives a fast, useful way to judge whether an individual measurement is unremarkable or a genuine outlier without running a full statistical test.
Can variance be negative, or can SD be larger than the mean?
Variance can never be negative — it is a sum of squared terms divided by a positive number, so the smallest possible value is zero (when every observation is identical). SD, being a square root of a non-negative number, is likewise never negative. However, SD absolutely can be larger than the mean, and this happens often with biological count or concentration data that are strictly non-negative but highly skewed (for example, parasite loads, where most hosts have very few parasites but a few have enormous burdens). A large SD relative to the mean is itself informative — it signals skewness or heavy-tailed variability and is precisely what the Coefficient of Variation (SD divided by the mean) is designed to quantify and compare across data sets.
Why does the SD "shrink" the correction less as sample size grows?
The n − 1 correction adjusts for the one degree of freedom used up in estimating the mean from the same sample. When n is small — say 3 or 5 — losing one data point's worth of independent information out of so few is a large proportional loss, so the correction factor is substantial (for n = 3, that's a 50% inflation of the "divide by n" variance). When n is large — say 1,000 — losing one degree of freedom out of a thousand is nearly negligible (), so the corrected and uncorrected variances converge. This is exactly why the choice of denominator matters enormously for small pilot studies but barely matters for large surveys.