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

> 独立変数の平均からの偏差平方和を返します。

# regr_sxx

<h2 id="regr_sxx">
  regr\_sxx
</h2>

導入バージョン: v26.9.0

独立変数の偏差平方和を返します:

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

**構文**

```sql theme={null}
regr_sxx(y, x)
```

**別名**: `regrSXX`

**引数**

* `y` — 従属変数。 [`(U)Int*`](/reference/data-types/int-uint) または [`Float*`](/reference/data-types/float)
* `x` — 独立変数。 [`(U)Int*`](/reference/data-types/int-uint) または [`Float*`](/reference/data-types/float)

**戻り値**

`x` の平均からの偏差平方和を返します。 [`Float64`](/reference/data-types/float)

**例**

**基本的な使い方**

```sql title=Query theme={null}
SELECT regr_sxx(y, x)
FROM VALUES('x Float64, y Float64', (1, 2), (2, 4), (3, 6), (4, 8))
```

```response title=Response theme={null}
┌─regr_sxx(y, x)─┐
│              5 │
└────────────────┘
```
