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

> La fonction `theilsU` calcule le coefficient d'incertitude U de Theil, une valeur qui mesure l'association entre deux colonnes d'une table.

# theilsU

<div id="theilsU">
  ## theilsU
</div>

Introduit dans : v22.1.0

La fonction `theilsU` calcule le [coefficient d'incertitude U de Theil](https://en.wikipedia.org/wiki/Contingency_table#Uncertainty_coefficient), qui mesure l'association entre deux colonnes d'une table.
Ses valeurs vont de 0.0 (aucune association) à 1.0 (accord parfait).

**Syntaxe**

```sql theme={null}
theilsU(column1, column2)
```

**Arguments**

* `column1` — Première colonne à comparer. [`Any`](/fr/reference/data-types/index)
* `column2` — Deuxième colonne à comparer. [`Any`](/fr/reference/data-types/index)

**Valeur renvoyée**

Renvoie une valeur entre 0 et 1. [`Float64`](/fr/reference/data-types/float)

**Exemples**

**Exemple d'utilisation**

```sql title=Query theme={null}
SELECT theilsU(a, b)
FROM (
    SELECT
        number % 10 AS a,
        number % 4 AS b
    FROM
        numbers(150)
);
```

```response title=Response theme={null}
┌────────theilsU(a, b)─┐
│  0.30195720557678846 │
└──────────────────────┘
```
