Top Leaderboard
Markets

Variance

Ad — article-top

Variance is a statistical measure of dispersion that quantifies how far the values in a data set spread out from their mean (average). In finance it is commonly used to describe the volatility of returns: a higher variance means returns are more spread out and the investment is considered more volatile or risky. The symbol for variance is σ² (sigma squared). The square root of variance is the standard deviation (σ), which restores the original units and is often easier to interpret. (Source: Investopedia)

Key Takeaways
– Variance measures the average squared deviation of data points from the mean.
Population variance divides the sum of squared deviations by N; sample variance uses N − 1 to be an unbiased estimator.
– Units of variance are squared units of the original data (e.g., percent² for returns), so standard deviation (σ) is often used for interpretation.
– In finance, variance underpins measures of risk, portfolio construction (via covariance/variance matrices), and many models (e.g., CAPM, VaR). (Source: Investopedia)

Understanding Variance
Definition and formula (population variance)
σ² = (1/N) ∑(xi − x̄)²
where
– xi = each value in the data set
– x̄ = mean of all values
– N = total number of values

Sample variance (unbiased estimator of population variance)
s² = (1/(N − 1)) ∑(xi − x̄)²

Why the difference? Using N − 1 corrects for the fact that the sample mean x̄ is itself an estimate; dividing by N − 1 produces an unbiased estimator of the true population variance.

Tip
Always check whether your context requires population or sample variance. Many software packages distinguish functions for each (e.g., Excel: VAR.P vs VAR.S; numpy.var has a ddof parameter).

Advantages and Disadvantages of Using Variance

Pros
– Captures both direction and magnitude of deviations by squaring, ensuring positive contributions.
– Mathematically convenient: variance is additive for independent variables (Var(X+Y) = Var(X) + Var(Y)).
– Central to many financial models (portfolio variance, risk decomposition).

Cons
– Units are squared (e.g., percent²), which makes direct interpretation awkward.
– Squaring amplifies the impact of outliers, giving them extra weight.
– Not as intuitive to non-technical users; standard deviation is usually preferred for communication.

Important Practical Notes
– Use variance when you need mathematical properties (e.g., optimization, matrix algebra).
– Use standard deviation (√variance) when you need interpretability or to compare spreads across different units.
– For financial returns, be explicit whether you are working with arithmetic returns or log returns—variance behaves differently across transformations.

Example of Variance in Finance (step-by-step)
Given three annual returns for a stock: 10%, 20%, −15%.

1) Convert to decimals for calculation:
0.10, 0.20, −0.15

2) Compute the mean:
x̄ = (0.10 + 0.20 + (−0.15)) / 3 = 0.05 (5%)

3) Compute deviations from the mean:
0.10 − 0.05 = 0.05
0.20 − 0.05 = 0.15
−0.15 − 0.05 = −0.20

4) Square each deviation:
0.05² = 0.0025
0.15² = 0.0225
(−0.20)² = 0.0400

5) Sum squared deviations:
0.0025 + 0.0225 + 0.0400 = 0.0650

Population variance:
σ² = 0.0650 / 3 = 0.0216667 (≈ 2.17% when expressed as percent²)
Population standard deviation:
σ = √0.0216667 ≈ 0.1472 (≈ 14.72%)

Sample variance (using N − 1 = 2):
s² = 0.0650 / 2 = 0.0325
Sample standard deviation:
s = √0.0325 ≈ 0.1803 (≈ 18.03%)

Interpretation: depending on whether you treat the three observations as the full population or a sample, the estimated volatility differs—hence the importance of choosing N vs N − 1 correctly. (Source: Investopedia)

What Are the Steps to Calculate Variance?
1. Collect your data set and confirm whether you have the full population or a sample.
2. Calculate the mean (x̄).
3. Subtract the mean from each data point to get deviations.
4. Square each deviation (this makes them positive and penalizes large deviations).
5. Sum the squared deviations.
6. Divide by N (population) or N − 1 (sample).
7. (Optional) Take the square root of the variance to get the standard deviation.

What Is Variance Used For?
– Measuring volatility of asset returns and risk assessment.
– Calculating portfolio variance: Var(Rp) = w’ Σ w where w is the vector of weights and Σ is the covariance matrix of asset returns.
– Risk models (e.g., Value at Risk, factor models).
– Statistical inference (ANOVA, hypothesis testing).
– Any setting where quantifying dispersion around a central value is needed.

Why Is Standard Deviation Often Used More Than Variance?
– Standard deviation has the same units as the original data (e.g., percent), so it’s easier to interpret and communicate.
– Square-rooting variance removes the squared-unit problem, allowing direct comparisons across series with different units or magnitudes.
– Financial practitioners and investors find volatility expressed as a percent more intuitive than percent².
– However, many mathematical derivations and optimization procedures operate directly with variance (matrix algebra, quadratic forms), so variance remains essential behind the scenes. (Source: Investopedia)

Practical Tools and Functions
– Excel: VAR.P (population), VAR.S (sample), STDEV.P, STDEV.S
– Python: numpy.var(arr, ddof=0 or ddof=1 for sample), pandas.Series.var(ddof=1 by default)
– R: var(x) (uses N − 1 by default)

The Bottom Line
Variance is a foundational measure of dispersion used across statistics and finance to quantify how spread out data are relative to their mean. In finance it is a core building block for measuring volatility and constructing portfolios. Because variance is in squared units and can overemphasize outliers, practitioners often report standard deviation for interpretability while using variance in modeling and calculations. Always be explicit about whether you are computing population or sample variance and use software functions that match your choice. (Source: Investopedia)

Source
– Investopedia: “Variance” by Alex Dos Diaz —

Continuing from the previous material, below is a comprehensive, structured article that expands on variance with additional sections, worked examples (including portfolio variance), practical how-to steps, common pitfalls, computational tips, and a concluding summary.

Source: Investopedia — concepts adapted and expanded.

What Is Variance — quick recap
– Variance quantifies how much values in a data set disperse around their mean. It equals the average squared deviation from the mean.
– Symbol: σ² (population variance) or s² (sample variance).
– Standard deviation (σ or s) is the square root of variance and restores the original units, making interpretation easier.

Key formulas
– Population variance:
σ² = (1/N) * Σ (xi − x̄)²
– Sample variance (unbiased estimator of population variance):
s² = (1/(N − 1)) * Σ (xi − x̄)²
– Standard deviation is the square root of variance.

Why N − 1 for sample variance?
– Using N − 1 corrects bias when estimating a population parameter from a sample (degrees of freedom). With N − 1, the sample variance is an unbiased estimator of the true population variance under common assumptions.

Step-by-step: How to calculate variance (practical)
1. Choose your data and whether you treat it as a population or a sample.
2. Convert values to consistent units (e.g., decimal returns: 10% → 0.10).
3. Compute the mean (x̄).
4. For each observation xi compute the deviation (xi − x̄).
5. Square each deviation to remove signs: (xi − x̄)².
6. Sum the squared deviations: Σ (xi − x̄)².
7. Divide by N (population) or N − 1 (sample) to get variance.
8. (Optional) Take the square root to obtain the standard deviation.

Worked example — single-asset returns (sample variance)
Data: Year 1 = 10%, Year 2 = 20%, Year 3 = −15%.
1. Convert to decimals: 0.10, 0.20, −0.15.
2. Mean: (0.10 + 0.20 − 0.15) / 3 = 0.05 (5%).
3. Deviations: 0.05, 0.15, −0.20.
4. Squared deviations: 0.0025, 0.0225, 0.0400.
5. Sum = 0.0650.
6. Sample variance (divide by N − 1 = 2): s² = 0.065 / 2 = 0.0325.
7. Sample standard deviation: s = sqrt(0.0325) ≈ 0.1803 → 18.03%.
(If treated as population: σ² = 0.065/3 = 0.02167, σ ≈ 14.72%.)

Variance in portfolio context — covariance matters
– For portfolios, total variance depends not only on individual variances but also on covariances (or correlations) among assets.
– Two-asset portfolio variance formula:
Var(Rp) = w1² Var1 + w2² Var2 + 2 w1 w2 Cov12
where Cov12 = ρ12 σ1 σ2 (ρ12 is correlation, σ are standard deviations)

Worked example — two-asset portfolio
This analysis assumes that…
– Asset A: σA = 10% → VarA = 0.01
– Asset B: σB = 15% → VarB = 0.0225
– Correlation ρAB = 0.20
– Weights: wA = 0.60, wB = 0.40

Compute covariance:
– CovAB = ρAB * σA * σB = 0.20 * 0.10 * 0.15 = 0.003

Portfolio variance:
– Var(Rp) = 0.60²*0.01 + 0.40²*0.0225 + 2*0.60*0.40*0.003
– = 0.0036 + 0.0036 + 0.00144 = 0.00864

Portfolio standard deviation:
– σp = sqrt(0.00864) ≈ 0.0929 → 9.29%

Takeaway: Diversification reduces portfolio variance when correlations are less than 1. Lower correlation or negative correlation between assets lowers the portfolio variance relative to weighted average of individual variances.

Additional examples and use-cases
– Rolling variance (volatility): compute variance over moving windows (e.g., 30-day rolling variance) to see volatility changes over time.
– Variance-covariance Value at Risk (VaR): uses variances and covariances to estimate potential loss under normality assumptions.
– Statistical testing: variance comparisons (e.g., F-test) check whether variances of two groups are equal.
– Factor models and covariance matrices: in multi-asset settings, a covariance matrix (matrix of pairwise covariances) is central for portfolio optimization.

Practical tips for finance practitioners
– Choose return type: arithmetic returns vs. logarithmic (continuously compounded) returns — log returns are time-additive and sometimes preferred for certain analytics.
– Use sample variance (N − 1) for historical returns when estimating future population volatility.
– Beware of time aggregation: monthly variances scale approximately with time under independence assumptions (variance scales with time, standard deviation scales with sqrt(time)).
– Address non-stationarity (volatility clustering) with models such as GARCH if volatility is time-varying.
– Check for outliers: variance squares deviations so outliers have outsized effects.

Computing variance in common tools
– Excel:
• Population variance: VAR.P(range)
• Sample variance: VAR.S(range)
• Population standard deviation: STDEV.P(range)
• Sample standard deviation: STDEV.S(range)
– Python (NumPy/Pandas):
• NumPy: numpy.var(arr, ddof=0) for population, ddof=1 for sample
• Pandas: Series.var(ddof=1) default is sample variance (ddof=1)
– R:
• var(x) computes sample variance (divides by n − 1)
• To compute population variance: mean((x – mean(x))^2) or adjust denom

Advantages of using variance
– Quantifies dispersion in squared units — mathematically convenient (variance is additive under independence).
– Used in many theoretical constructs (e.g., mean–variance optimization, CAPM, statistical tests).
– Exposes sensitivity to outliers (can be a pro if you want to highlight extreme movements).

Limitations and cautions
– Units are squared: hard to interpret directly (hence preference for standard deviation).
– Very sensitive to outliers (one extreme value can dominate the measure).
– Assumes mean is a useful central tendency; for skewed distributions median and different spread measures may be more informative.
– Sample variance can be biased if the wrong denominator is used; be explicit about population vs sample.

When standard deviation is preferred
– Standard deviation returns to original units (e.g., percentage points) and is more intuitive for reporting volatility.
– Example: saying “the standard deviation is 10%” is easier to interpret than “the variance is 0.01.&#8221

Advanced topics (brief)
– Covariance matrix estimation: as the number of assets grows, estimating a stable covariance matrix becomes challenging; shrinkage techniques and factor models are commonly used.
– Conditional variance models: ARCH/GARCH models capture time-varying variance (volatility clustering common in financial returns).
– Robust measures of dispersion: median absolute deviation (MAD) or trimming can guard against outliers.

Interpretation guidelines
– Higher variance/standard deviation → greater dispersion → perceived higher risk for investments.
– Compare variances only after confirming similar measurement scales; use standard deviations for clearer comparisons.
– Use correlation and covariance to assess diversification benefits.

Common workflow: calculating portfolio risk for decision-making
1. Obtain historical returns (select frequency and return type).
2. Decide on sample vs population assumptions.
3. Compute individual asset variances (sample).
4. Compute pairwise covariances or correlation matrix.
5. Build covariance matrix and compute portfolio variance via weights.
6. Translate variance to standard deviation and annualize if needed.
7. Use results in optimization (mean–variance), stress testing, or risk reporting.

Concluding summary
Variance is a foundational statistical measure that quantifies dispersion by averaging squared deviations around the mean. In finance, variance (and its square root, standard deviation) are primary tools for measuring volatility and risk. For single assets, variance provides a sense of return variability; for portfolios, variance must account for covariances among holdings, which enables diversification benefits. Practitioners should choose between population and sample variance appropriately (use N − 1 for unbiased sample estimates), be aware of sensitivity to outliers, and often prefer reporting standard deviation for interpretability. Advanced models (covariance shrinkage, GARCH) help address estimation and time-varying volatility issues in real-world data.

References
– Investopedia, “Variance” —

Ad — article-mid