Article ID: 829250 - View products that this article applies to.
The Microsoft Office Excel statistical functions, VAR and VARP, are computed with better precision in Microsoft Office Excel 2003 and later versions of Excel. The same algorithmic improvements were made for VAR and VARP when used to summarize data for pivot tables. Unfortunately, some computational issues remain unresolved. Use extreme caution when you summarize data with VAR and VARP in Excel 2003 and later versions of Excel. This article describes the remaining problem.
You may notice different values when worksheets that were created in earlier versions of Excel are recalculated in Excel 2003 and later versions of Excel. This article describes the values that are more accurate in Excel 2003 and later versions of Excel and the values that are less accurate.
Microsoft Excel 2004 for Macintosh InformationThe statistical functions in Microsoft Office Excel 2004 for Macintosh were updated using the same algorithms as Excel 2003 and later versions of Excel. Any information in this article that describes how a function works or how a function was modified for Excel 2003 and later versions of Excel also applies to Excel 2004 for Macintosh.
The articles on VAR and VARP describe how a two-pass procedure has replaced the "calculator formula" for computing these measures. With infinite precision arithmetic, both procedures return the same results and the calculator formula takes half the computation time. However, with finite precision arithmetic, the potential for round off errors becomes a factor. The result of using the two-pass procedure is less susceptibility to round off errors in extreme situations in Excel 2003 and later versions of Excel. However, you may not notice the effect of these improvements because for most data sets, there are not enough significant digits in the data to cause different results from the calculator formula and the two-pass procedure. VAR and VARP are always more accurate in Excel 2003 and later versions of Excel, but VAR and VARP differences between earlier versions of Excel and Excel 2003 are likely to be noticeable only when data values contain many significant digits and yet have small variation.
Microsoft recommends that you read the article about VAR because it explains modifications in the computational procedure and it also provides a worksheet for more extensive experimentation with adding a power of ten to data values. For additional information about VAR, click the following article number to view the article in the Microsoft Knowledge Base:
826112The intent of the improvements was to also improve separate code for computing VAR for summarizing data in pivot tables. This code has been improved for part of the pivot table, but problems remain unresolved for other parts. The numeric example later in this article helps clarify the situation.
(https://support.microsoft.com/kb/826112/ )Excel Statistical Functions: VAR
Create a blank Microsoft Office Excel worksheet, copy the table that follows later in this section, and then select cell A1 in your blank Excel worksheet. Then paste the entries so that the table fills cells A1:I28 in your worksheet.
Collapse this tableExpand this table
Note After you paste this table into your new Excel worksheet, click Paste Options, and then click Match Destination Formatting. With the pasted range still selected, use one of the following methods:
The third pivot table shows results from Excel 2003 and later versions of Excel. The good news is that VAR has been correctly upgraded for the interior of the table, cells G22:H24. Values in these six cells agree with corresponding values in the first pivot table as they should. However, something yet unresolved is significantly wrong in the Grand Total row and Grand Total column. Cells E23:E28 show results from computing various VARs by using the Excel 2003 and later versions of Excel VAR function for Modified Values with cell E2 set to 8. These results agree with entries in the Grand Total row and Grand Total column of the first pivot table as they should.
Unfortunately, this author recommends that you ignore values in the Grand Total row and Grand Total column when you use VAR to summarize data in an Excel pivot table. For earlier versions of Excel, all entries in such pivot tables are likely to be correct provided that data values are not so extreme as to cause significant round off problems. To examine the accuracy of any VAR in the table, identify the range of data, Range, of whose VAR you want. For earlier versions of Excel, the correct value is obtained by computing DEVSQ(Range) / (COUNT(Range) – 1). For Excel 2003 and later versions of Excel, the correct value comes from VAR(Range).
The same comments and same performance issues apply to VARP. To verify the accuracy of any VARP in the table in any version, identify the range of data, Range, of whose VARP that you want. For earlier versions of Excel, the correct value is obtained by computing DEVSQ(Range) / COUNT(Range). For Excel 2003 and later versions of Excel, the correct value comes from VARP(Range).
Results in Earlier Versions of ExcelUse of the calculator formula in earlier versions of Excel makes VAR and VARP, STDEV, STDEVP more susceptible to round off errors. However, round off errors are very rarely significant enough that a typical user will notice them. These errors are likely to occur only in extreme situations, particularly when data contains many significant digits but small variations.
Results in Excel 2003 and later versions of ExcelAn improved procedure that involves two passes through the data is correctly implemented for the interior of a pivot table. On the first pass, the sample mean is calculated; on the second pass, the sum of squared deviations about this sample mean is calculated. This sum is then divided by the number of observations minus 1 for VAR or by the number of observations for VARP. This procedure is generally recommended over the calculator formula to minimize the risk of round off errors.
Unfortunately, this has not been correctly implemented for the Grand Total row and Grand Total column. The author suggests an alternative mechanism for obtaining correct values of these VAR or VARPs.
ConclusionsYou will occasionally see differences when you compare the values of VAR or VARP that are calculated with earlier versions of Excel to values that are calculated with Excel 2003 and later versions of Excel. In these cases, Excel 2003 and later versions of Excel will always be more accurate.
If Excel 2003 and later versions of Excel are used to summarize data with VAR or VARP in a pivot table, you can rest assured that results in the interior of the table are equally accurate or more accurate than in earlier versions of Excel. Users of Excel 2003 and later versions of Excel can ignore results in the Grand Total row and Grand Total column until computational issues with these entries are resolved.
Article ID: 829250 - Last Review: June 20, 2014 - Revision: 4.0