# What Is Variance in Statistics? Definition, Formula, and Example

> **Definition**
>
> Variance is a measurement of dispersion across a data set, comparing the difference between every other number in the set.

## What Is Variance?

Variance is a statistical measurement of how large of a spread there is within a data set. It measures how far each number in the set is from the [mean](https://www.investopedia.com/terms/m/mean.asp) (average), and thus from every other number in the set. Variance is often depicted by this symbol: σ. The [square root of the variance](https://www.investopedia.com/ask/answers/021215/what-difference-between-standard-deviation-and-variance.asp) is the [standard deviation](https://www.investopedia.com/terms/s/standarddeviation.asp) (SD or σ), which helps determine the consistency of an investment’s [returns](https://www.investopedia.com/terms/r/return.asp) over time.

### Key Takeaways

*   Variance is a measurement between the numbers in a data set that calculates how far apart the numbers are spread out.
*   In particular, it measures the degree of dispersion of data around the sample's mean.
*   Investors use variance to see how much risk an investment carries and whether it will be profitable.
*   Variance is also used in finance to compare the relative performance of each asset in a portfolio to achieve the best asset allocation.
*   The square root of the variance is the standard deviation.

![Variance Definition](https://www.investopedia.com/thmb/VDtpekOn1mpNqEm49CZjYmv8zCk=/1500x0/filters:no_upscale():max_bytes(150000):strip_icc()/Variance-TAERM-ADD-Source-464952914f77460a8139dbf20e14f0c0.jpg)

*— Investopedia / Alex Dos Diaz*

## Understanding Variance

In statistics, variance measures [variability](https://www.investopedia.com/terms/v/variability.asp) from the average or mean. It is calculated by taking the differences between each number in the data set and the mean, squaring the differences to make them positive, and then dividing the sum of the squares by the number of values in the data set. Software like [Excel can make this calculation easier](https://www.investopedia.com/ask/answers/041615/how-do-you-calculate-variance-excel.asp).

Variance is calculated by using the following formula:

$\begin{aligned}&\sigma^2 = \frac { \sum_{i = 1} ^ { n } \big (x_i - \overline { x } \big ) ^ 2 }{ N } \\&\textbf{where:} \\&x_i = \text{Each value in the data set} \\&\overline { x } = \text{Mean of all values in the data set} \\&N = \text{Number of values in the data set} \\\end{aligned}$

> **Tip**
>
> 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 Using Variance

Like any way of analyzing data, variance and benefits and limitations.  

### Pros

*   **Simplicity**: Variance is a straightforward measurement that statisticians can use 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.
*   **Treats all deviations the same**: The advantage of variance is that it treats all deviations from the mean as the same regardless of their direction. This allows analysts and investors to see the full range of risk and variability in a data set, rather than only those that are positive or negative.
*   **Avoids appearance of no variability**: The squared deviations cannot sum to zero and give the appearance of no variability at all in the data. This can avoid some misinterpretations of the data.

### Cons

*   **Added weight to outliers**: Outliers are the numbers far from the mean. Squaring these numbers gives them more weight, which can [skew](https://www.investopedia.com/terms/s/skewness.asp) the data.
*   **Not often used alone**: Variance is often used as a stepping stone to finding the [standard deviation](https://www.investopedia.com/ask/answers/021915/how-standard-deviation-used-determine-risk.asp) of a dataset, rather than a measurement on its own. Investors can use standard deviation, which is the square root of variance, to assess how consistent returns are over time.

Pros

*   Simplicity
    
*   Treats all deviations the same
    
*   Avoids appearance of no variability
    

Cons

*   Added weight to outliers
    
*   Not often used alone
    

> **Important**
>
> 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 in Finance

If 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:

> (10% + 20% + -15%) / 3 = 5%

The differences between each return and the average are:

> 10% - 5% = 5%

> 20% - 5% = 15%

> \-15% - 5% = -20%

Squaring these deviations [yields](https://www.investopedia.com/terms/y/yield.asp) 0.25% for Year 1, 2.25% for Year 2, and 4.00% for Year 3.

To find the variance, add these squared deviations, then divide by one less the number of points in the dataset:

> Variance = 0.25% + 2.25% + 4.00% = 6.5% / (3-1) = 3.25% = 0.0325

If you wanted to find the standard deviation of the same dataset, you would take the square root of the variance:

> Standard deviation = √0.0325 = 0.180 = 18%

## What Are the Steps to Calculate Variance?

Follow these steps to compute variance:

1.  Calculate the mean of the data.
2.  Find each data point's difference from the mean value.
3.  Square each of these values.
4.  Add up all of the squared values.
5.  Divide this sum of squares by n – 1 (for a sample) or N (for the total population).

## What Is Variance Used for?

Variance measures the degree of spread in a data set from its mean value. It shows the amount of variation that exists among the data points. Visually, the larger the variance, the "fatter" a [probability distribution](https://www.investopedia.com/terms/p/probabilitydistribution.asp) will be. In finance, if something like an investment has a greater variance, it may be interpreted as more risky or volatile.

## Why Is Standard Deviation Often Used More Than Variance?

Standard deviation is the square root of variance. It is sometimes more useful since taking the square root removes the units from the analysis. This allows for direct comparisons between different things that may have different units or different magnitudes. For instance, to say that increasing X by one unit increases Y by two standard deviations allows you to understand the relationship between X and Y regardless of what units they are expressed in.

## The Bottom Line

Variance measures variability or how far numbers in a data set diverge from the mean. It is used by various professionals including data analysts, mathematicians, scientists, statisticians. and investors. The latter two use variance to determine whether to buy, sell, or hold securities. For example, if an investment has a greater variance, it could be considered more volatile and risky.