# How to Calculate Weighted Variance

by Gerald Hanks; Updated September 26, 2017In most statistical analysis exercises, each data point carries equal weight. However, some include data sets in which some data points carry more weight than others. These weights can vary due to various factors, such as the number, the dollar amounts or the frequency of the transactions. The *weighted mean* allows managers to calculate an accurate average for the data set, while the *weighted variance* gives an approximation of the spread among the data points.

## Weighted Mean

The weighted mean measures the average of the weighted data points. Managers can find the weighted mean by taking the total of the weighted data set and dividing that amount by the total weights. For a weighted data set with three data points, the weighted mean formula would look like this:

[(W_{1})(D_{1}) + (W_{2})(D_{2}) + (W_{3})(D_{3})]/ (W_{1}+ W_{2}+ W_{3})

Where W_{i} = weight for data point i and D_{i} = amount of data point i

For instance, Generic Games sells 400 football games at $30 each, 450 baseball games at $20 each, and 600 basketball games at $15 each. The weighted mean for dollars per game would be:

[(400 x 30) + (450 x 20) + (600 x 15)]/[400+500+600] =

[12000 + 9000 + 9000]/1500

= 30000/1500 = $20 per game.

## Weighted Sum of the Squares

The *sum of the squares* uses the difference between each data point and the mean to show the spread between those data points and the mean. Each difference between the data point and the mean is squared to give a positive value. The *weighted sum of the squares* shows the spread between the weighted data points and the weighted mean. The formula for the weighted sum of squares for three data points looks like this:

[(W_{1})(D_{1}-D_{m})^{2} + (W_{2})(D_{2} -D_{m})^{2} + (W_{3})(D_{3} -D_{m})^{2}]

Where D_{m} is the weighted mean.

In the example above, the weighted sum of the squares would be:

400(30-20)^{2} + 450(20-20)^{2} + 600 (15-20)^{2}

= 400(10)^{2} + 450(0)^{2} + 600(-5)^{2}

= 400(100) + 450(0) + 600(25)

= 400,000 + 0 + 15,000 = 415,000

## Calculate Weighted Variance

The *weighted variance* is found by taking the weighted sum of the squares and dividing it by the sum of the weights. The formula for weighted variance for three data points looks like this:

[(W_{1})(D_{1}-D_{m})^{2} + (W_{2})(D_{2} -D_{m})^{2} + (W_{3})(D_{3} -D_{m})^{2}] / (W_{1}+ W_{2}+ W_{3})

In the Generic Games example, the weighted variance would be:

400(30-20)^{2} + 450(20-20)^{2} + 600 (15-20)^{2} / [400+500+600]

= 415,000/1,500 = 276.667