Documentation/Calc Functions/VARP
TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate
Function name:
VARP
Category:
Statistical Analysis
Summary:
Calculates the population variance of a set of numbers.
Syntax:
VARP(Number 1[; Number 2[; ...[; Number 255]]])
Returns:
Returns a non-negative real number, which is the population variance of the supplied numbers.
Arguments:
Number 1, Number 2, ..., Number 255 give the set of real numbers for which the population variance is to be calculated. Each argument may be a value or an expression, a reference to a single cell, a reference to a cell range, the name of a named or database range, or an inline array.
Note that although VARP can accept up to 255 arguments, each argument could specify a range of cells. This means that the number of real numbers processed could be many more than 255.
The following conditions (including errors) may be encountered:
- If any argument is a string in quotation marks, then VARP reports a parameter list error (Err:504).
- Text in cells and empty cells are ignored.
- If no numbers are supplied, then VARP reports a #DIV/0! error.
- If only one number is supplied, then VARP returns 0.
Additional details:
- Calc's VARP and VAR.P functions perform identical calculations. The requirements for VARP are specified in ODF 1.2; VAR.P is provided for interoperability with Microsoft Excel.
- The formula for the population variance ([math]\displaystyle{ \sigma^2 }[/math]) is:
- [math]\displaystyle{ \sigma^2\:=\:\frac{1}{n}\sum_{i=1}^{n}(x_{i}-\mu)^2 }[/math]
- where
- [math]\displaystyle{ n }[/math] is the size of the population
- [math]\displaystyle{ x_{i} }[/math] is the i-th value in the population
- [math]\displaystyle{ \mu }[/math] is the population mean
- For more information on variances, visit Wikipedia's Variance page.
Examples:
Formula | Description | Returns |
---|---|---|
=VARP(A1:A5) where cells A1:A5 contain the values 1, 2, 3, 4, and 5 respectively. | Here the function calculates the population variance of the five values in the specified cells. | 2 |
=VARP(3; 4; 5; 6; 2; 3; 1) | Here the function calculates the population variance of the seven values passed as individual arguments. | 2.53061224489796 |
=VARP({3, 4, -5, 6.05, 2, 3, -1.5}) | Here the function calculates the population variance of the seven values passed in an inline array. | 11.8278571428571 |
Related LibreOffice functions:
ODF standard:
Related (or similar) Excel functions:
VARP