Documentation/Calc Functions/VAR.S

From The Document Foundation Wiki
Jump to navigation Jump to search


Function name:

VAR.S

Category:

Statistical Analysis

Summary:

Calculates the sample variance of a set of numbers.

Syntax:

VAR.S(Number 1 [; Number 2 [; … [; Number 255]]])

Returns:

Returns a non-negative real number which is the estimated sample variance based on the numbers passed in the arguments.

Arguments:

Number 1, Number 2, ..., Number 255 are real numbers, an array of real numbers, reference to a cell or to cell ranges of numbers.

  • The parameters should specify at least two values. If there are less than two values, then the function will return a division (#DIV/0!) error.
  • If any of the arguments contain text values either being passed directly then the function returns a name (#NAME?) error and if passed with double quotes then the function returns an error value (Err:504).
  • If a cell contains text, error value, or empty cells, then the function ignores these values. For logical values, TRUE is considered as 1, and FALSE is considered as 0.
  • If a cell contains 0 then the function includes it.

Additional details:

  • The formula for VAR.S is:
Var.png

where xi is Number i, n is the count of xi's and x̄ is mean value.

  • For more details on variance, visit Wikipedia.

Examples:

Formula Description Returns
=VAR.S(3;4;5;6;2;3;1) The function calculates the variance of the data 2.95238095238095
=VAR.S(3,4,-5,6.05,2,3,-1.5) The function calculates the sample variance of the data 13.7991666666667
=VAR.S(3,"alpha",-5,6.05,2,3,-1.5) The function returns an error value since one of the numbers is a string. Err:504
=VAR.S(A1:A5) where A1:A5 contains 1,2,3,4,5 The function calculates the variance of the data passed as a reference to the cell. 2.5
=VAR.S(3) The function will return a division error since less than 2 arguments are available. #DIV/0!

Related LibreOffice functions:

VAR.P

VAR

VARA

VARP

VARPA

STDEV

STDEV.P

STDEV.S

STDEVA

STDEVP

STDEVPA

ODF standard:

None

Equivalent Excel functions:

VAR.S