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

<h2 id="regr_syy">
  regr\_syy
</h2>

導入バージョン: v26.9.0

従属変数の平方和を返します:

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

**構文**

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

**別名**: `regrSYY`

**引数**

* `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)

**戻り値**

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

**例**

**基本的な使い方**

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

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