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

<h2 id="varPop">
  varPop
</h2>

도입 버전: v1.1.0

모집단 분산(population variance)을 계산합니다.

모집단 분산은 다음 공식으로 계산됩니다:

$$
\frac{\Sigma{(x - \bar{x})^2}}{n}
$$

<br />

여기서:

* $x$는 모집단의 각 값
* $\bar{x}$는 모집단 평균
* $n$은 모집단 크기

<Note>
  이 함수는 수치적으로 불안정한 알고리즘을 사용합니다. 계산에서 [수치 안정성](https://en.wikipedia.org/wiki/Numerical_stability)이 필요한 경우 [`varPopStable`](/reference/functions/aggregate-functions/varPopStable) 함수를 사용하십시오. 속도는 느리지만 계산 오차가 더 낮습니다.
</Note>

**구문**

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

**별칭**: `VAR_POP`

**인수**

* `x` — 모집단 분산을 구할 값들의 모집단. [`(U)Int*`](/reference/data-types/int-uint) 또는 [`Float*`](/reference/data-types/float) 또는 [`Decimal*`](/reference/data-types/decimal)

**반환 값**

`x`의 모집단 분산을 반환합니다. [`Float64`](/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
    varPop(x) AS var_pop
FROM test_data;
```

```response title=Response theme={null}
┌─var_pop─┐
│    14.4 │
└─────────┘
```
