# varPopStable (/docs/reference/sql/aggregate-functions/varpopstable)



This page describes the RawTree engine binary used to generate this reference. It does not define Query API support. Descriptions retain upstream ClickHouse terminology. See [SQL interface scope](/docs/reference/clickhouse-compatibility#service-interfaces).

Returns the population variance.
Unlike [`varPop`](/reference/functions/aggregate-functions/varPop), this function uses a [numerically stable](https://en.wikipedia.org/wiki/Numerical_stability) algorithm.
It works slower but provides a lower computational error.

**Syntax**

```sql
varPopStable(x)
```

**Arguments**

* `x` — Population of values to find the population variance of. [`(U)Int*`](/reference/data-types/int-uint) or [`Float*`](/reference/data-types/float) or [`Decimal*`](/reference/data-types/decimal)

**Returned value**

Returns the population variance of `x`. [`Float64`](/reference/data-types/float)

**Examples**

**Computing stable population variance**

```sql title=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;
```

```text title=Response
┌─var_pop_stable─┐
│           14.4 │
└────────────────┘
```

*Introduced in version 1.1.0.*
