Calculate sample variance (s²), population variance (σ²), sum of squared deviations, mean, and standard deviation step-by-step.
Click "Calculate Variance" to evaluate dataset dispersion.
An agricultural scientist testing two fertilizers measures crop yields per acre: both fertilizers yield an average of 100 bushels, but Fertilizer A has a variance of 25 (yields range tightly from 95 to 105), while Fertilizer B has a variance of 625 (yields fluctuate wildly from 50 to 150). Calculating variance allows researchers to measure dispersion independently of the arithmetic mean.
Statistical variance is the expectation of the squared deviation of a random variable from its mean. It quantifies how far a set of numbers is spread out from their average value.
Variance is expressed in squared units of the original data. Taking the square root of variance yields the standard deviation. There are two primary formulations: Sample Variance (s²) (which divides by n - 1 to correct sample estimation bias) and Population Variance (σ²) (which divides by N). This calculator evaluates both forms and builds detailed squared deviation step tables. The following sections cover mathematical definitions, Bessel's correction, and real-world applications in genetics, finance, and ANOVA hypothesis testing.
When dataset values are submitted, the engine evaluates the arithmetic mean x̄, computes individual deviations (xᵢ - x̄), squares each deviation, and calculates sample and population variances.
1. Arithmetic Mean (x̄):
x̄ = (∑ xᵢ) / n
2. Sum of Squared Deviations (SS):
SS = ∑ (xᵢ - x̄)²
3. Sample Variance (s²) — Bessel's Correction:
s² = SS / (n - 1) = ∑ (xᵢ - x̄)² / (n - 1)
Sample Standard Deviation: s = √s²
4. Population Variance (σ²):
σ² = SS / N = ∑ (xᵢ - μ)² / N
Population Standard Deviation: σ = √σ²
Analysis of Variance (ANOVA) testing. Statisticians divide total variance into between-group variance and within-group variance to test hypothesis differences across experimental groups.
Financial portfolio management and modern portfolio theory. Investors calculate asset price variance and covariance to measure portfolio risk and diversification benefits.
Genetics and plant breeding. Geneticists separate total phenotype variance into genetic variance V_G and environmental variance V_E to calculate trait heritability.
Machine learning and model fitting. Data scientists evaluate prediction variance (bias-variance tradeoff) to prevent model overfitting.
Use Sample Variance (s²) for sample datasets. Use Population Variance (σ²) when analyzing complete population data.
To convert variance back into original units of measurement, inspect the Standard Deviation output card (s = √s²).
For standard deviation step analysis, use our Standard Deviation Calculator. For Z-score standardization, use our Z-Score Calculator.
The calculation engine operates client-side in JavaScript using IEEE 754 double-precision floats. Datasets with up to 50,000 numbers process in under 10 milliseconds.
| Metric | Sample Variance (s²) | Population Variance (σ²) |
|---|---|---|
| Formula | SS / (n - 1) | SS / N |
| Denominator | n - 1 (Unbiased Estimator) | N (Known Population) |
| Units | Squared original units | Squared original units |
| Square Root | Sample SD (s) | Population SD (σ) |
| ANOVA Role | Denominator in F-ratio | Baseline population variance |
Squaring deviations prevents positive and negative differences from canceling each other out (the sum of raw deviations ∑(xᵢ - x̄) is always equal to 0).
Yes. Variance equals zero if and only if all numbers in the dataset are identical (zero dispersion).
Bessel's correction uses n - 1 instead of n in the sample variance formula to compensate for using the sample mean instead of the true population mean, preventing underestimation of variance.
Standard Deviation Calculator — Calculates sample and population standard deviation.
Z-Score Calculator — Computes standard scores and normal distribution percentiles.
Mean, Median & Mode — Calculates all central tendency indicators in one pass.