> ## 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.

> 母分散を返します。varPop とは異なり、この関数では数値的に安定したアルゴリズムを使用します。処理は遅くなりますが、計算誤差をより小さく抑えられます。

# varPopStable

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

導入バージョン: v1.1.0

母分散を返します。
[`varPop`](/ja/reference/functions/aggregate-functions/varPop)とは異なり、この関数では[数値的に安定した](https://en.wikipedia.org/wiki/Numerical_stability)アルゴリズムを使用します。
処理は遅くなりますが、計算誤差を低く抑えられます。

**構文**

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

**引数**

* `x` — 母分散を求める対象の値の集合。[`(U)Int*`](/ja/reference/data-types/int-uint) または [`Float*`](/ja/reference/data-types/float) または [`Decimal*`](/ja/reference/data-types/decimal)

**戻り値**

`x` の母分散を返します。[`Float64`](/ja/reference/data-types/float)

**例**

**数値的に安定した母分散の計算**

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