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

> 結果は varSamp の平方根です

# stddevSamp

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

導入バージョン: v1.1.0

数値データの数列の標本標準偏差を返します。
結果は [`varSamp`](/ja/reference/functions/aggregate-functions/varSamp) の平方根になります。

<Note>
  この関数は、数値的に不安定なアルゴリズムを使用します。
  計算で[数値安定性](https://en.wikipedia.org/wiki/Numerical_stability)が必要な場合は、[`stddevSampStable`](/ja/reference/functions/aggregate-functions/stddevSampStable) 関数を使用してください。処理は遅くなりますが、計算誤差が小さい結果が得られます。
</Note>

**構文**

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

**別名**: `STDDEV_SAMP`, `STDDEV`

**引数**

* `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
(
    population UInt8,
)
ENGINE = Log;

INSERT INTO test_data VALUES (3),(3),(3),(4),(4),(5),(5),(7),(11),(15);

SELECT
    stddevSamp(population)
FROM test_data;
```

```response title=Response theme={null}
┌─stddevSamp(population)─┐
│                      4 │
└────────────────────────┘
```
