stdev() (aggregation function)

Calculates the standard deviation of Expr across the group, using Bessel's correction for a small data set that is considered a sample.

For a large data set that is representative of the population, use stdevp() (aggregation function).

  • Used formula:

Image showing a Stdev sample formula.

Note

This function is used in conjunction with the summarize operator.

Syntax

stdev (Expr)

Arguments

Name Type Required Description
Expr string Expression that will be used for aggregation calculation.

Returns

Returns the standard deviation value of Expr across the group.

Example

The following example shows the standard deviation for the group.

[Click to run query]

range x from 1 to 5 step 1
| summarize make_list(x), stdev(x)

Results

list_x stdev_x
[ 1, 2, 3, 4, 5] 1.58113883008419