> ## 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 │
└────────────────┘
```
