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

> Renvoie la somme des carrés des écarts de la variable indépendante par rapport à sa moyenne.

# regr_sxx

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

Introduit dans : v26.9.0

Renvoie la somme des carrés de la variable indépendante :

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

**Syntaxe**

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

**Alias** : `regrSXX`

**Arguments**

* `y` — Variable dépendante. [`(U)Int*`](/reference/data-types/int-uint) ou [`Float*`](/reference/data-types/float)
* `x` — Variable indépendante. [`(U)Int*`](/reference/data-types/int-uint) ou [`Float*`](/reference/data-types/float)

**Valeur renvoyée**

Renvoie la somme des carrés des écarts de `x` par rapport à sa moyenne. [`Float64`](/reference/data-types/float)

**Exemples**

**Utilisation de base**

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

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