Skip to main content

Celonis Product Documentation

STDEV
Description

This function calculates the standard deviation of a set of samples. The standard deviation uses the "n-1" method. Standard deviation can be applied to INT or FLOAT data types.

Syntax
 STDEV ( table.column )
NULL handling

NULL values are ignored, so they do not influence the result. If all the values of a group are NULL, the result for this group is also NULL.

Examples

[1]

Standard deviation of column.

Query

Column1

         STDEV ( "Table"."Column" )
        

Input

Output

Table

Column : int

1

2

3

Result

Column1 : float

1.0

[2]

Get the standard deviation by country.

Query

Column1

         "Table"."Country"
        

Column2

         STDEV ( "Table"."Values" )
        

Input

Output

Table

Country : string

Values : int

'US'

1

'DE'

4

'DE'

4

'FR'

5

'US'

2

'US'

3

Result

Column1 : string

Column2 : float

'DE'

0.0

'FR'

0.0

'US'

1.0

[3]

Get the standard deviation with nulls, grouped by country.

Query

Column1

         "Table"."Country"
        

Column2

         STDEV ( "Table"."Values" )
        

Input

Output

Table

Country : string

Values : int

'FR'

10

'FR'

null

'DE'

null

Result

Column1 : string

Column2 : float

'DE'

null

'FR'

0.0

See also: