Definition
Sample variance is the average squared deviation from the sample mean with a degrees-of-freedom correction of n minus 1. It is used to estimate a population variance when the observations form a sample and the mean was estimated from those observations. If the listed values are the complete population, the population divisor N answers a different question.
How it is calculated
Sample variance s squared = sum of squared deviations X_i minus X-bar divided by n minus 1.
| Symbol | Meaning | Unit |
|---|---|---|
| s | sample standard deviation | X units |
| X | observation | measurement units |
| n | sample size | count |
| N | population count | count |
-
Compute the sample mean.
-
Square each observation's deviation from the mean.
-
Add the squared deviations.
-
Divide by the sample size minus one.
Worked example
Synthetic example.
-
inputs:
- sample values: 1, 2, 3
-
result:
-
sample mean: 2
-
sample variance: 1
-
Interpretation
Variance records how far observations spread after centering on their own mean. Estimating that mean uses one degree of freedom, which is why the sample formula divides by n minus 1. Always ask whether the data are a sample or the full finite population being described.
Assumptions and conventions
-
The target is a population variance estimated from a sample.
-
The sample size satisfies n >= 2.
-
The n-1 correction is unbiased under iid sampling with finite variance; dependence requires separate analysis.
-
The observations are comparable and the sample mean is the fitted location.
Squared units of X; s has X units.
Variants
- The target is a population variance estimated from a sample.
Limitations and common misreadings
-
The sample variance is not the same as the square of the sample mean.
-
The n-minus-1 divisor is not used for every variance question.
References
- Larry Wasserman. (2004). All of Statistics: A Concise Course in Statistical Inference. Springer Texts in Statistics. Chapter 3, Expectation. doi:10.1007/978-0-387-21736-9. Source

