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

> 结果等于 varPop 的平方根。与 stddevPop 不同， 此函数采用数值稳定算法。

# stddevPopStable

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

引入版本：v1.1.0

其结果等于 [varPop](/zh/reference/functions/aggregate-functions/varPop) 的平方根。与 [stddevPop](/zh/reference/functions/aggregate-functions/stddevPop) 不同，该函数采用数值稳定算法。它的运行速度较慢，但计算误差更低。

**语法**

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

**参数**

* `x` — 用于计算标准差的值总体。[`(U)Int*`](/zh/reference/data-types/int-uint) 或 [`Float*`](/zh/reference/data-types/float) 或 [`Decimal*`](/zh/reference/data-types/decimal)

**返回值**

返回 `x` 的方差平方根。[`Float64`](/zh/reference/data-types/float)

**示例**

**基本用法**

```sql title=Query theme={null}
DROP TABLE IF EXISTS test_data;
CREATE TABLE test_data
(
    population Float64,
)
ENGINE = Log;

INSERT INTO test_data SELECT randUniform(5.5, 10) FROM numbers(1000000);

SELECT
    stddevPopStable(population) AS stddev
FROM test_data;
```

```response title=Response theme={null}
┌─────────────stddev─┐
│ 1.2999977786592576 │
└────────────────────┘
```
