What Is Variance? (Plain-English Definition)
Here is the simplest way to picture variance: imagine tracking daily step counts for a week — 8,000 steps every single day. Your average is 8,000 and your variance is 0, because nothing deviates from the mean. Now imagine the steps were 2,000 on Monday, 14,000 on Wednesday, and 9,000 on Friday. The average might still be near 8,000, but the spread is enormous. Variance puts a number on that spread.
According to the NIST/SEMATECH e-Handbook of Statistical Methods, variance is one of the fundamental measures of statistical dispersion and forms the basis for many inferential procedures. It is foundational to descriptive statistics, hypothesis testing, and regression analysis.
- Population variance symbol: σ² (sigma squared). Sample variance symbol: s². General notation: Var(X) or V(X)
- Units: Always the square of the original data units (e.g., dollars² for dollar data)
- Always non-negative: Variance can never be negative, because deviations are squared before summing
- Variance = 0: All data points are identical — no spread whatsoever
- Relationship to SD: Standard deviation = √(variance). SD is in the original units and easier to interpret
- Key distinction: Population variance divides by N; sample variance divides by n−1 (Bessel's correction)
Why the Mean Alone Is Not Enough
The mean tells you where data is centered. Variance tells you how reliable that center is. Two datasets can share the exact same mean while being completely different in character:
Both datasets have μ = 50 — but their variances reveal entirely different realities. This is why descriptive statistics always reports both central tendency and dispersion. Reporting only the mean without variance is like describing a city's weather using only the annual average temperature — it hides everything important.
Variance Symbol and Notation
Variance has several standard symbols depending on whether you are working with a population, a sample, or a random variable in probability theory. Using the correct notation matters for exams, research papers, and statistical software.
A common point of confusion: "variance symbol" queries on Google often come from students looking specifically for σ² vs. s². The short answer is: use σ² when describing a population, and s² when describing a sample. The Var(X) notation appears in probability courses and textbooks. In Microsoft Excel, VAR.S() computes sample variance and VAR.P() computes population variance.
Variance Formula — Population and Sample
There are two versions of the variance formula. The choice between them depends on whether your data represents an entire population or a sample drawn from a larger group. Both follow the same logic — they differ only in the denominator.
Population Variance Formula (σ²)
σ² = population variance
Σ = sum over all data points
xᵢ = each individual data point
μ = population mean
N = total number of data points
Use the population formula when you have measured every member of the group you are describing. Examples: the final exam scores of all students in one specific class, or the heights of every player on a basketball team. You are not estimating — you have the complete picture.
Sample Variance Formula (s²)
s² = sample variance
Σ = sum over all data points
xᵢ = each sample data point
x̄ = sample mean (x-bar)
n = number of sample observations
n−1 = Bessel's correction
Use the sample formula in almost every real-world research scenario. Polling 1,000 voters, sampling 200 patients, or measuring 50 manufactured parts — all involve a subset of a larger population. Dividing by n−1 (rather than n) corrects for the fact that a sample mean slightly underestimates the true spread of the population. For deeper treatment, see MIT OpenCourseWare — Statistics for Applications.
Variance Formula for Grouped and Ungrouped Data
The variance formula adapts slightly depending on whether your data is raw (ungrouped) or organized into frequency intervals (grouped).
| Data Type | Population Variance Formula | Sample Variance Formula |
|---|---|---|
| Ungrouped (raw data) | σ² = Σ(xᵢ − μ)² / N | s² = Σ(xᵢ − x̄)² / (n−1) |
| Grouped (frequency table) | σ² = Σ f(mᵢ − μ)² / N | s² = Σ f(mᵢ − x̄)² / (n−1) |
For grouped data, f is the frequency of each class interval and mᵢ is the midpoint of each interval. The grouped mean is calculated as x̄ = Σ(f·mᵢ) / Σf. This approach is common in educational testing and survey analysis where raw data is not available, only frequency distributions.
Why n−1? Bessel's Correction Explained
When you use a sample to calculate variance, you first compute the sample mean (x̄) from that same sample. This costs one degree of freedom — the deviations from x̄ must sum to zero by definition, so knowing n−1 of them automatically determines the last. Dividing by n−1 accounts for this constraint and produces an unbiased estimate of the true population variance.
If you have 5 data points and used those same 5 points to calculate the mean, only 4 data points are truly "free" to vary independently. That is why the denominator is 4, not 5. As sample size grows, n and n−1 converge — which is why large samples make this distinction less consequential. For a deep derivation, see the degrees of freedom guide.
How to Calculate Variance — Step-by-Step Examples
Step 1: Find the mean. Step 2: Subtract the mean from each data point (deviations). Step 3: Square each deviation. Step 4: Sum the squared deviations. Step 5: Divide by N (population) or n−1 (sample). The result is variance.
Worked Example 1 — Five Student Exam Scores
A sample of 5 students scored {72, 85, 90, 68, 95} on a statistics exam. Calculate the sample variance.
Find the mean (x̄): (72 + 85 + 90 + 68 + 95) / 5 = 410 / 5 = 82
Subtract the mean from each score: 72−82=−10 | 85−82=3 | 90−82=8 | 68−82=−14 | 95−82=13
Square each deviation: (−10)²=100 | 3²=9 | 8²=64 | (−14)²=196 | 13²=169
Sum the squared deviations: 100 + 9 + 64 + 196 + 169 = 538
Divide by n−1: s² = 538 / (5−1) = 538 / 4 = 134.5
✓ Sample variance s² = 134.5. Population variance would be 538/5 = 107.6. Standard deviation = √134.5 ≈ 11.6 points — a typical student deviates from the 82-point mean by about 11–12 points.
| Student | Score (xᵢ) | Deviation (xᵢ − x̄) | Squared Deviation (xᵢ − x̄)² |
|---|---|---|---|
| A | 72 | −10 | 100 |
| B | 85 | +3 | 9 |
| C | 90 | +8 | 64 |
| D | 68 | −14 | 196 |
| E | 95 | +13 | 169 |
| Sum / Mean | Σ = 0 | Σ = 538 | |
| Sample Variance (÷ n−1 = 4) | 134.5 | ||
Note: Deviations always sum to exactly 0 — use this as a self-check to confirm your mean calculation is correct before proceeding.
How to Calculate Variance Between Two Numbers
Variance between two numbers works exactly the same way as any other dataset — you just happen to have n = 2. This comes up frequently in business contexts (comparing this year vs. last year) and in basic statistics courses.
Find the variance between two values: {4, 8}
Mean: (4 + 8) / 2 = 6
Deviations: 4 − 6 = −2 | 8 − 6 = +2
Squared deviations: (−2)² = 4 | (+2)² = 4
Sum of squares: 4 + 4 = 8
Population variance: 8 / 2 = 4 | Sample variance: 8 / (2−1) = 8
✓ Population variance σ² = 4. Sample variance s² = 8. The large difference between the two is expected: with only 2 data points, Bessel's correction has a dramatic effect. As n grows larger, the difference between n and n−1 becomes negligible.
Worked Example 2 — Investment Returns
An investor recorded annual returns (%) over 4 years: {12, −3, 8, 15}. Find the sample variance and standard deviation.
Mean: (12 + (−3) + 8 + 15) / 4 = 32 / 4 = 8%
Deviations: 12−8=4 | −3−8=−11 | 8−8=0 | 15−8=7
Squared deviations: 16 | 121 | 0 | 49
Sum of squares: 16 + 121 + 0 + 49 = 186
Sample variance: s² = 186 / (4−1) = 62 (%²) | Standard deviation = √62 ≈ 7.87%
✓ Variance = 62%². The fund averaged 8% annually, but returns ranged widely. A fund with the same 8% average but variance of 5 would be far less risky. This is the core insight of Modern Portfolio Theory, formalized by Harry Markowitz (Nobel Prize, 1990).
🧮 Interactive Variance Calculator
Enter any dataset below and choose population or sample variance. The calculator shows the mean, variance, standard deviation, and a full step-by-step calculation table.
Variance & Standard Deviation Calculator
Percent Variance (Percentage Variance) — Formula & Examples
Percent variance (also called percentage variance or variance percentage) is a completely different concept from statistical variance. While statistical variance measures spread around a mean, percent variance measures the relative change between two specific values — typically an actual result versus a budgeted or prior-period figure. It is widely used in finance, business analysis, and project management.
Use the absolute value of the reference value in the denominator to handle cases where the reference is negative.
A department budgeted $50,000 for Q3 but spent $62,000. What is the percent variance?
Identify values: Actual (new) = $62,000. Budget (reference) = $50,000.
Calculate difference: $62,000 − $50,000 = $12,000
Divide by reference: $12,000 / $50,000 = 0.24
Multiply by 100: 0.24 × 100 = 24% variance (unfavorable — overspent)
✓ Percent Variance = +24%. The department overspent budget by 24%. In accounting, a positive percent variance on costs is unfavorable; a positive percent variance on revenue is favorable. Context determines the interpretation.
| Feature | Statistical Variance (σ², s²) | Percent Variance |
|---|---|---|
| What it measures | Spread of a dataset around the mean | Relative change between two specific values |
| Formula | Σ(xᵢ − x̄)² / (n−1) | ((Actual − Budget) / |Budget|) × 100% |
| Units | Squared units of the original data | Percentage (%) |
| Used in | Statistics, probability, machine learning | Finance, accounting, project management |
| Can it be negative? | No — always ≥ 0 | Yes — negative means below reference |
Variance Rules — Properties of Variance
Variance has a set of mathematical properties (rules) that are essential for probability theory, statistics courses, and machine learning. These rules describe how variance behaves when you add constants, scale data, or combine independent variables.
Rule 1 — Non-Negativity
Variance is always zero or positive. It equals zero only when all values are identical (no spread whatsoever).
Rule 2 — Constant Has Zero Variance
The variance of a constant is zero. If every value in your dataset is the same number, there is no deviation from the mean.
Rule 3 — Adding a Constant
Adding a constant c to every value shifts the mean but does not change the spread. Variance is unchanged. Example: if every student scores 5 extra points, the class variance stays the same.
Rule 4 — Multiplying by a Constant
Scaling every value by constant c scales the variance by c². Example: converting inches to centimeters (multiply by 2.54) multiplies the variance by 2.54² = 6.45.
Rule 5 — Linear Transformation
A linear transformation aX + b scales variance by a² and does not change it due to the additive constant b. This rule combines Rules 3 and 4.
Rule 6 — Sum of Independent Variables
For independent (uncorrelated) random variables X and Y, the variance of their sum equals the sum of their individual variances. Known as Bienaymé's identity (1853).
If X and Y are correlated, Var(X + Y) = Var(X) + Var(Y) + 2·Cov(X, Y), where Cov(X, Y) is the covariance. For positively correlated variables, the combined variance is larger than the sum of individual variances. This is why mixing uncorrelated assets in a portfolio reduces total risk — a core insight from Modern Portfolio Theory.
Population Variance vs. Sample Variance — Complete Comparison
The distinction between population and sample variance is one of the most tested topics in introductory statistics. The formulas are nearly identical, but the context and denominator matter enormously.
| Feature | Population Variance (σ²) | Sample Variance (s²) |
|---|---|---|
| Formula | Σ(xᵢ − μ)² / N | Σ(xᵢ − x̄)² / (n−1) |
| Denominator | N (full count) | n−1 (Bessel's correction) |
| Mean symbol | μ (mu) — true population mean | x̄ (x-bar) — estimated from sample |
| Variance symbol | σ² (sigma squared) | s² |
| When to use | You have ALL members of the group | You have a SUBSET of the group |
| Example | All students in one specific class | 500 randomly selected voters |
| Bias | Exact — no estimation needed | Unbiased estimate (with n−1) |
| Result vs. population | = true variance | ≥ population variance (slightly larger) |
When in doubt, use sample variance (n−1). In practice, you almost never have data for an entire population. Surveys, experiments, studies, and polls all involve samples. Only use population variance when you have literally measured every member of the group (e.g., all students in one specific class, all employees at one specific company).
Variance vs. Standard Deviation
Variance and standard deviation both measure how spread out data is. One is derived from the other — they are not competing measures. For a full comparison, see the standard deviation vs. variance guide.
Low Variance vs. High Variance — Distribution Shape
Both distributions share the same mean. Low variance (blue) = tall, narrow curve. High variance (amber) = wide, flat curve. Both curves contain the same total probability.
| Property | Variance (σ² or s²) | Standard Deviation (σ or s) |
|---|---|---|
| Formula | Σ(xᵢ − μ)² / N | √[Σ(xᵢ − μ)² / N] |
| Units | Squared (e.g., kg², cm²) | Same as raw data (e.g., kg, cm) |
| Interpretability | Harder — squared units lack intuition | Easier — directly comparable to data |
| Sensitivity to outliers | Very high (outliers squared) | High (but less extreme) |
| Use in formulas | ANOVA, covariance, probability theory | Z-scores, confidence intervals, t-tests |
| Preferred for reporting | Statistical theory and proofs | Research results and real-world communication |
Key relationship: standard deviation = √variance and variance = (standard deviation)². Variance is mathematically convenient — it is additive for independent variables: Var(X + Y) = Var(X) + Var(Y). Standard deviation is interpretively convenient because it lives in the same units as the data. Visit the standard deviation guide for deeper coverage.
How to Interpret Variance
Variance is expressed in squared units, which makes raw interpretation tricky. Here is a practical framework for reading variance values in context:
| Variance Value | What It Means | Practical Implication |
|---|---|---|
| σ² = 0 | All data points are identical | No variability whatsoever — perfect consistency |
| σ² is small (relative to mean²) | Data points cluster tightly around the mean | High predictability — results are consistent |
| σ² is large (relative to mean²) | Data points are widely dispersed from the mean | Low predictability — results vary considerably |
| σ² → ∞ | Extreme outliers or heavy-tailed distribution | Some distributions (Cauchy) have infinite variance |
The most useful tool for comparing variance across datasets with different units or scales is the coefficient of variation (CV), defined as CV = (standard deviation / mean) × 100%. This expresses variability as a percentage of the mean, making it possible to compare the variance of test scores (points) with the variance of salaries (dollars) on equal footing. See the standard deviation guide for worked CV examples.
Real-World Applications of Variance
Variance appears in nearly every field where data is collected and interpreted. Here are six concrete domains, each showing exactly how variance reveals something the mean alone cannot.
1. Finance — Investment Risk
Portfolio variance measures how much returns fluctuate year to year. A high-variance fund is riskier, even if its average return matches a low-variance fund. This underpins Modern Portfolio Theory.
2. Sports Analytics — Consistency
A basketball player who averages 25 PPG with low variance is more reliable than one with the same average but high variance. Coaches use this to evaluate clutch performance and game-to-game consistency.
3. Manufacturing — Quality Control
In Six Sigma processes, variance in product measurements (bolt diameters, fill volumes) directly determines defect rates. Reducing variance is the central goal of process improvement.
4. Education — Score Equity
High score variance across a school indicates unequal outcomes. Low variance suggests more consistent achievement. Policymakers use variance alongside mean scores to assess equity.
5. Weather Science
Climate scientists use variance to compare temperature stability across cities. Miami has low temperature variance year-round; Chicago has high variance. This matters for agriculture and infrastructure planning.
6. Psychology — Test Reliability
When a psychological test is administered repeatedly, low variance across measures signals high reliability. High variance in a supposedly stable trait suggests the measurement instrument itself is flawed.
📊 Case Study — Portfolio Risk Comparison
Variance in Finance: Same Return, Completely Different Risk
| Year | Portfolio A Returns (%) | Portfolio B Returns (%) |
|---|---|---|
| 2020 | 7.5 | −5.0 |
| 2021 | 8.2 | 22.0 |
| 2022 | 7.9 | −3.0 |
| 2023 | 8.4 | 18.0 |
| 2024 | 7.0 | 12.0 |
| Mean | 7.8% | 8.8% |
| Variance | 0.22 (%²) | 109.2 (%²) |
Portfolio B has a slightly higher average return — but its variance is nearly 500 times larger. For a retiree depending on stable income, Portfolio A's predictability may be worth more than Portfolio B's higher average. This tradeoff is formalized in Markowitz's (1952) mean-variance optimization framework, which earned the Nobel Prize in Economics in 1990. For deeper coverage, see the statistics in risk management guide and the portfolio diversification guide.
The SPREAD Framework — A Memorable Way to Master Variance
The five steps of the variance calculation are easy to forget under exam pressure. The SPREAD framework turns each step into a memorable letter — and adds a sixth step connecting variance to the standard deviation you will use in practice.
Every deviation from the mean is squared. This eliminates negatives and amplifies larger gaps.
Every calculation starts by subtracting the mean. The mean is your anchor point.
Every observation contributes its squared deviation. No data point is ignored.
Variance collapses the entire spread of a dataset into one number.
Divide by N for population data, n−1 for sample data. Bessel's correction removes bias.
Take the square root of variance to get standard deviation — back in the original units.
Variance in Probability Distributions
Every major probability distribution has a defined variance formula. Understanding these formulas is essential for statistics and probability courses and for selecting the right statistical model. The normal distribution is most common, but variance plays a distinct role in each.
| Distribution | Variance Formula | Parameters | Plain-English Meaning |
|---|---|---|---|
| Normal | σ² | μ (mean), σ² (variance) | Variance is directly specified — it controls the width of the bell curve |
| Binomial | np(1−p) | n = trials, p = probability | Variance increases with more trials; maximized when p = 0.5 (coin flip) |
| Poisson | λ | λ = rate (mean events) | Uniquely, variance equals the mean — a key diagnostic property |
| Uniform | (b−a)² / 12 | a = min, b = max | Wider range → higher variance. All values equally likely. |
| Exponential | 1 / λ² | λ = rate parameter | Higher arrival rate → smaller variance in inter-arrival times |
| Bernoulli | p(1−p) | p = success probability | Maximum variance at p = 0.5; minimum at p = 0 or p = 1 |
| Student's t | ν / (ν−2) for ν > 2 | ν = degrees of freedom | Larger than the normal distribution's; shrinks toward 1 as ν → ∞ |
The Poisson distribution's property (variance = mean) is a useful diagnostic tool. If you count rare events and find that observed variance substantially exceeds the mean, the data may follow a negative binomial distribution — a situation called overdispersion, common in public health and ecology. See the binomial distribution guide and normal distribution guide for worked examples.
Variance in Machine Learning — The Bias-Variance Tradeoff
In machine learning, "variance" describes how much a model's predictions change when trained on different samples of the same data. According to Hastie, Tibshirani & Friedman's The Elements of Statistical Learning (Stanford, 2009), the expected prediction error of any model decomposes as:
Bias² = systematic error from wrong model assumptions
Variance = error from sensitivity to training data
Noise = irreducible — inherent randomness in data
🤖 Machine Learning Application
High Variance = Overfitting; High Bias = Underfitting
High-variance model (overfitting): A decision tree with no depth limit memorizes training data perfectly, including noise. Train accuracy: 99%. Test accuracy: 62%. Its predictions vary wildly with each new dataset.
High-bias model (underfitting): Linear regression applied to clearly non-linear data. Train accuracy: 71%. Test accuracy: 70%. The model is consistent but systematically wrong.
The goal: Find the model complexity where Bias² + Variance is minimized. Regularization (L1, L2), cross-validation, and ensemble methods (Random Forest, Gradient Boosting) all manage model variance. See the bias-variance tradeoff guide for deeper coverage.
Analysis of Variance (ANOVA)
Analysis of Variance (ANOVA) is a hypothesis test that uses variance to determine whether the means of three or more groups are statistically different. Its name reveals the method: rather than comparing means directly, ANOVA compares sources of variance.
ANOVA partitions total dataset variance into two components: between-group variance (how much group means differ from the overall mean) and within-group variance (how much individual observations differ from their own group mean). The F-statistic is the ratio of between-group to within-group variance. A large F suggests group differences are too large to attribute to chance.
The full test procedure is covered in the ANOVA guide. Run the calculations using the ANOVA calculator. For understanding when to use ANOVA vs. a t-test, see t-test vs. ANOVA.
Formula & Glossary Reference Table
| Term | Symbol | Formula | Relationship to Variance |
|---|---|---|---|
| Variance (Population) | σ² | Σ(xᵢ−μ)²/N | Core metric — this is what this page covers |
| Variance (Sample) | s² | Σ(xᵢ−x̄)²/(n−1) | Estimated version of σ² using sample data |
| Standard Deviation | σ or s | √(variance) | Square root of variance; same-unit interpretation |
| Mean | μ or x̄ | Σxᵢ/N | The anchor point that every deviation is measured from |
| Standard Error | SE | σ/√n | Standard deviation of the sampling distribution |
| Z-score | z | (x−μ)/σ | Uses standard deviation (√variance) to standardize |
| Covariance | Cov(X,Y) | Σ(xᵢ−x̄)(yᵢ−ȳ)/(n−1) | Generalization of variance to two variables |
| Coefficient of Variation | CV | σ/μ × 100% | Variance relative to the mean; useful for cross-scale comparison |
| Percent Variance | — | ((New−Ref)/|Ref|) × 100% | Business metric; unrelated to statistical variance |
| F-statistic (ANOVA) | F | Var(between) / Var(within) | Ratio of variances; core of ANOVA inference |
Python: Calculating Variance with NumPy and Statistics
6 Common Variance Mistakes (And How to Avoid Them)
| # | The Mistake | The Correct Approach |
|---|---|---|
| 1 | Using N instead of n−1 when calculating sample variance | Unless you have measured every member of the population, divide by n−1. Most real-world data is a sample. |
| 2 | Forgetting to square the deviations, leading to a sum that equals zero | Deviations from the mean always sum to exactly zero — that is why we square before summing. A sum of zero deviations is your self-check, not your answer. |
| 3 | Interpreting variance units as if they were in the original measurement scale | If data is in dollars, variance is in dollars². If data is in centimeters, variance is in cm². Use standard deviation (√variance) for interpretable units. |
| 4 | Confusing statistical variance with percent variance | Statistical variance (σ², s²) measures spread around a mean. Percent variance measures relative change between two specific values. They are completely different metrics. |
| 5 | Confusing variance with range (max − min) | Range uses only two data points and ignores all others. Variance uses every data point. A dataset with one extreme outlier can have a large range but modest variance if all other points cluster tightly. |
| 6 | Applying variance to categorical data (colors, names, job titles) | Variance requires numeric, interval-scale data. For categorical data, use frequency distributions or chi-square tests. For ordinal data, consider the interquartile range. |
Frequently Asked Questions About Variance
Variance is a measure of statistical dispersion showing how far data points are from their mean. It is the average of squared differences from the mean. Population variance is written σ²; sample variance is s². A variance of 0 means all values are identical, while higher values indicate greater spread.
The population variance symbol is σ² (sigma squared). The sample variance symbol is s². In probability theory, you'll also see Var(X) or V(X). In Excel, VAR.P() gives population variance and VAR.S() gives sample variance.
Percent variance (also called percentage variance or variance percentage) is a business metric measuring relative change: ((New Value − Reference Value) / |Reference Value|) × 100%. It is completely different from statistical variance — it compares actuals vs. budgets or two time periods rather than measuring data spread around a mean.
Key variance rules: (1) Var(X) ≥ 0 always. (2) Var(constant) = 0. (3) Var(X + c) = Var(X) — adding a constant changes nothing. (4) Var(cX) = c²·Var(X) — multiplying scales variance by c². (5) For independent X and Y: Var(X + Y) = Var(X) + Var(Y). If correlated, you must add 2·Cov(X, Y).
For {x₁, x₂}: find the mean = (x₁ + x₂)/2. Compute deviations and square them. Sum the squares. Population variance divides by 2; sample variance divides by 1 (n−1 = 1). Example: {4, 8} → mean = 6 → squared deviations: 4, 4 → sum = 8 → population variance = 4, sample variance = 8.
Population variance uses N (total count) when you have all the data. Sample variance uses n−1 (Bessel's correction) when working with a subset. Dividing by n−1 corrects the tendency of sample variance to underestimate the true population variance by producing an unbiased estimator.
No. Variance is always zero or positive because it is calculated from squared deviations, and squares are never negative. Variance equals zero only when all data points are identical.
Yes. Variance is always in squared units of the original data. If your data is in meters, variance is in m². If your data is in dollars, variance is in dollars². This is why standard deviation (the square root of variance) is often preferred for reporting — it returns to the original units and is directly interpretable.
ANOVA compares variance between groups (how much group means differ from the overall mean) to variance within groups (how much individual observations differ from their own group mean). A large F-ratio (between/within) suggests that group differences are statistically significant and not due to random variation.
Prediction error = Bias² + Variance + Irreducible Noise. High bias (underfitting) means the model is too simple and misses patterns. High variance (overfitting) means the model memorizes training noise and performs poorly on new data. The goal is finding model complexity where the total of bias² and variance is minimized.