Jump to content

Documentation/Calc Functions/STDEVA

From The Document Foundation Wiki

Function name:

STDEVA

Category:

Statistical Analysis

Summary:

Calculates the sample standard deviation of a set of numbers.

STDEVA is a variant of the STDEV function. The main difference between the two is that STDEV ignores cells containing text, whereas STDEVA treats text values as the number 0.

Syntax:

STDEVA(Number 1[; Number 2[; ...[; Number 255]]])

Returns:

Returns a non-negative real number, which is the sample standard deviation of the supplied numbers.

Arguments:

Number 1, Number 2, ..., Number 255 give the set of real numbers for which the sample standard deviation 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 STDEVA 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:

  • Text strings are treated as the number 0.
  • Empty cells are ignored.
  • If less than two numbers are supplied, then STDEVA reports a #DIV/0! error.

Additional details:

  • The formula for the sample standard deviation ([math]\displaystyle{ s }[/math]) is:
[math]\displaystyle{ s\:=\:\sqrt{\frac{1}{n-1}\sum_{i=1}^{n}(x_{i}-\bar{x})^2} }[/math]
where
  • [math]\displaystyle{ n }[/math] is the size of the sample
  • [math]\displaystyle{ x_{i} }[/math] is the i-th value in the sample
  • [math]\displaystyle{ \bar{x} }[/math] is the sample mean

Examples:

Formula Description Returns
=STDEVA(A1:A6) where cells A1:A5 contain the values 1, 2, 3, 4, and 5 respectively, with cell A6 empty. Here the function calculates the sample standard deviation of the five values in cells A1:A5, ignoring the empty cell A6. 1.58113883008419
=STDEVA(A1:A6) where cells A1:A5 contain the same values as in the previous example, with cell A6 containing the string "Calc functions". Here the function calculates the sample standard deviation of the five values in cells A1:A5 and the value 0 allocated for the text string in cell A6. Note that the formula =STDEVA(1; 2; 3; 4; 5; 0) returns the same value. 1.87082869338697
=STDEVA(3; 4; 5; 6; 2; 3; 1; "LibreOffice") Here the function calculates the sample standard deviation of the first seven values passed as individual arguments, along with the value 0 allocated for the text string in the final argument. Note that the formula =STDEVA(3; 4; 5; 6; 2; 3; 1; 0) returns the same value. 2
=STDEVA({3, 4, -5, 6.05, 2, 3, -1.5}) Here the function calculates the sample standard deviation of the seven values passed in an inline array. 3.71472295961175

Related LibreOffice functions:

AVERAGE

AVERAGEA

STDEV

STDEV.P

STDEV.S

STDEVP

STDEVPA

VAR

VAR.P

VAR.S

VARA

VARP

VARPA

ODF standard:

Section 6.18.73, part 2

Related (or similar) Excel functions:

STDEVA