Skip to main content
Skip to main content

stddevPop

stddevPop

Introduced in: v1.1

Returns the population standard deviation of a numeric data sequence. The result is equal to the square root of varPop.

Note

This function uses a numerically unstable algorithm. If you need numerical stability in calculations, use the stddevPopStable function. It works slower but provides a lower computational error.

Syntax

stddevPop(x)

Aliases: STD, STDDEV_POP

Arguments

Returned value

Returns the square root of population variance of x. Float64

Examples

Computing population standard deviation

CREATE TABLE test_data (population UInt8) ENGINE = Log;
INSERT INTO test_data VALUES (3),(3),(3),(4),(4),(5),(5),(7),(11),(15);

SELECT stddevPop(population) AS stddev FROM test_data;
┌────────────stddev─┐
│ 3.794733192202055 │
└───────────────────┘