Skip to main content

varPopStable

Introduced in: v1.1.0 Returns the population variance. Unlike varPop, this function uses a numerically stable algorithm. It works slower but provides a lower computational error. Syntax
varPopStable(x)
Arguments Returned value Returns the population variance of x. Float64 Examples Computing stable population variance
Query
DROP TABLE IF EXISTS test_data;
CREATE TABLE test_data
(
    x UInt8,
)
ENGINE = Memory;

INSERT INTO test_data VALUES (3),(3),(3),(4),(4),(5),(5),(7),(11),(15);

SELECT
    varPopStable(x) AS var_pop_stable
FROM test_data;
Response
┌─var_pop_stable─┐
│           14.4 │
└────────────────┘
Last modified on June 8, 2026