> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-mintlify-8c05c8a2.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

> Returns the population variance. Unlike varPop , this function uses a numerically stable algorithm. It works slower but provides a lower computational error.

# varPopStable

<h2 id="varPopStable">
  varPopStable
</h2>

Introduced in: v1.1.0

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 theme={null}
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 theme={null}
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 title=Response theme={null}
┌─var_pop_stable─┐
│           14.4 │
└────────────────┘
```
