
Variance , Formula, & Calculation
The term variance refers to a statistical measurement of the spread between numbers in a data set. Variance is calculated by using the following formula: variance σ 2 \= ∑ i \= 1 n ( x i − x ˉ ) 2 n − 1 where: x i \= i t h data point x ˉ \= Mean of all data points n \= Number of data points \\begin{aligned} &\\text{variance } \\sigma^2 =\\frac{ \\sum\_{i=1}^n{\\left(x\_i - \\bar{x}\\right)^2} }{n-1} \\\\ &\\textbf{where:}\\\\&x\_i=i^{th} \\text{ data point}\\\\&\\bar{x}=\\text{Mean of all data points}\\\\&n=\\text{Number of data points}\\end{aligned} variance σ2\=n−1∑i\=1n(xi−xˉ)2where:xi\=ith data pointxˉ\=Mean of all data pointsn\=Number of data points A large variance indicates that numbers in the set are far from the mean and far from each other. It is calculated by taking the differences between each number in the data set and the mean, then squaring the differences to make them positive, and finally dividing the sum of the squares by the number of values in the data set. For instance, when calculating a sample variance to estimate a population variance, the denominator of the variance equation becomes N − 1

What Is Variance?
The term variance refers to a statistical measurement of the spread between numbers in a data set. More specifically, variance measures how far each number in the set is from the mean and thus from every other number in the set. Variance is often depicted by this symbol: σ2. It is used by both analysts and traders to determine volatility and market security. The square root of the variance is the standard deviation (σ), which helps determine the consistency of an investment’s returns over a period of time.



Understanding Variance
In statistics, variance measures variability from the average or mean. It is calculated by taking the differences between each number in the data set and the mean, then squaring the differences to make them positive, and finally dividing the sum of the squares by the number of values in the data set.
Variance is calculated by using the following formula:
variance σ 2 = ∑ i = 1 n ( x i − x ˉ ) 2 n − 1 where: x i = i t h data point x ˉ = Mean of all data points n = Number of data points \begin{aligned} &\text{variance } \sigma^2 =\frac{ \sum_{i=1}^n{\left(x_i - \bar{x}\right)^2} }{n-1} \\ &\textbf{where:}\\&x_i=i^{th} \text{ data point}\\&\bar{x}=\text{Mean of all data points}\\&n=\text{Number of data points}\end{aligned} variance σ2=n−1∑i=1n(xi−xˉ)2where:xi=ith data pointxˉ=Mean of all data pointsn=Number of data points
A large variance indicates that numbers in the set are far from the mean and far from each other. A small variance, on the other hand, indicates the opposite. A variance value of zero, though, indicates that all values within a set of numbers are identical. Every variance that isn’t zero is a positive number. A variance cannot be negative. That’s because it’s mathematically impossible since you can’t have a negative value resulting from a square.
Variance is an important metric in the investment world. Variability is volatility, and volatility is a measure of risk. It helps assess the risk that investors assume when they buy a specific asset and helps them determine whether the investment will be profitable. But how is this done? Investors can analyze the variance of the returns among assets in a portfolio to achieve the best asset allocation. In financial terms, the variance equation is a formula for comparing the performance of the elements of a portfolio against each other and against the mean.
Special Considerations
You can also use the formula above to calculate the variance in areas other than investments and trading, with some slight alterations. For instance, when calculating a sample variance to estimate a population variance, the denominator of the variance equation becomes N − 1 so that the estimation is unbiased and does not underestimate the population variance.
Advantages and Disadvantages of Variance
Statisticians use variance to see how individual numbers relate to each other within a data set, rather than using broader mathematical techniques such as arranging numbers into quartiles. The advantage of variance is that it treats all deviations from the mean as the same regardless of their direction. The squared deviations cannot sum to zero and give the appearance of no variability at all in the data.
One drawback to variance, though, is that it gives added weight to outliers. These are the numbers far from the mean. Squaring these numbers can skew the data. Another pitfall of using variance is that it is not easily interpreted. Users often employ it primarily to take the square root of its value, which indicates the standard deviation of the data set. As noted above, investors can use standard deviation to assess how consistent returns are over time.
In some cases, risk or volatility may be expressed as a standard deviation rather than a variance because the former is often more easily interpreted.
Example of Variance
Here’s a hypothetical example to demonstrate how variance works. Let’s say returns for stock in Company ABC are 10% in Year 1, 20% in Year 2, and −15% in Year 3. The average of these three returns is 5%. The differences between each return and the average are 5%, 15%, and −20% for each consecutive year.
Squaring these deviations yields 25%, 225%, and 400%, respectively. If we add these squared deviations, we get a total of 650%. When you divide the sum of 650% by the number of returns in the data set — three in this case — it yields a variance of 216.67%. Taking the square root of the variance yields the standard deviation of 14.72% for the returns.
Related terms:
Asset
An asset is a resource with economic value that an individual or corporation owns or controls with the expectation that it will provide a future benefit. read more
Bollinger Band® (Technical Analysis)
A Bollinger Band® is a momentum indicator used in technical analysis that depicts two standard deviations above and below a simple moving average. read more
Investment
An investment is an asset or item that is purchased with the hope that it will generate income or appreciate in value at some point in the future. read more
Population
Population may refer to the number of people living in a region or a pool from which a statistical sample is taken. See our population definition here. read more
Residual Sum of Squares (RSS)
The residual sum of squares (RSS) is a statistical technique used to measure the variance in a data set that is not explained by the regression model. read more
Risk
Risk takes on many forms but is broadly categorized as the chance an outcome or investment's actual return will differ from the expected outcome or return. read more
Skewness , Formula, & Calculation
Skewness refers to distortion or asymmetry in a symmetrical bell curve, or normal distribution, in a set of data. read more
Standard Deviation
The standard deviation is a statistic that measures the dispersion of a dataset relative to its mean. It is calculated as the square root of variance by determining the variation between each data point relative to the mean. read more