The Variance is a statistical measure, that is commonly used across a set of values, to identify the amount that the values vary from the average value.
The Excel VAR.S function calculates the sample variance of a supplied set of values.
The VAR.S function is new to Excel 2010. However, this is simply an improved (slightly more accurate) version of the VAR function, which is available in earlier versions of Excel.
The syntax of the function is:
Note that the Var.S function is used when calculating the variance for a sample of a population (e.g. if your data set records the individual heights of a sample of UK males). If you are calculating the variance for an entire population, you should use the Excel Var.P function.
Imagine you wanted to find out the variance of the heights of adult males in London. It is not realistic to measure the height of all males, but you could take a sample of the population and measure their heights.
The above example spreadsheet on the right stores the measurements (in cm) of 3,000 adult males. The measured heights are stored in cells B3-B1002, D3-D1002 and F3-F1002.
The variance of the heights of the sample group is calculated in cell H3 of the spreadsheet. The formula for this, as shown in the formula bar, is:
As shown in cell H3, the variance of the individual heights of the sample group is 9.261904762 cm.
The example above shows the arguments to the Var.S function being input in the form of 3 cell ranges. However, you can also input figures directly, as individual numbers or number arrays.
For example, if you wanted to include two further heights, of 176cm and 177cm into the sample we could add these directly into the above function as follows:
Further information and examples of the Excel Var.S function are provided on the Microsoft Office website.
If you get an error from the Excel Var.S Function, this is likely to be one of the following:
|#DIV/0!||-||Occurs if fewer than 2 numeric values have been supplied to the function.|
|#VALUE!||-||Occurs if any values that are supplied directly to the Var.S function are text values that cannot be interpreted as numeric values.|