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

> Retorna a variância populacional. Diferentemente de varPop, esta função usa um algoritmo numericamente estável. Ela é mais lenta, mas fornece um menor erro computacional.

# varPopStable

<div id="varPopStable">
  ## varPopStable
</div>

Introduzido em: v1.1.0

Retorna a variância populacional.
Diferentemente de [`varPop`](/pt-BR/reference/functions/aggregate-functions/varPop), esta função usa um algoritmo [numericamente estável](https://en.wikipedia.org/wiki/Numerical_stability).
Ela é mais lenta, mas proporciona menor erro computacional.

**Sintaxe**

```sql theme={null}
varPopStable(x)
```

**Argumentos**

* `x` — Conjunto de valores para os quais será calculada a variância populacional. [`(U)Int*`](/pt-BR/reference/data-types/int-uint) ou [`Float*`](/pt-BR/reference/data-types/float) ou [`Decimal*`](/pt-BR/reference/data-types/decimal)

**Valor retornado**

Retorna a variância populacional de `x`. [`Float64`](/pt-BR/reference/data-types/float)

**Exemplos**

**Calculando a variância populacional estável**

```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 │
└────────────────┘
```
