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

> تحسب الدالة `theilsU` معامل عدم اليقين Theil's U، وهي قيمة تقيس الارتباط بين عمودين في جدول.

# theilsU

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

استُحدثت في: v22.1.0

تحسب الدالة `theilsU` [معامل عدم اليقين لـ Theil's U](https://en.wikipedia.org/wiki/Contingency_table#Uncertainty_coefficient)، وهو قيمة تقيس الارتباط بين عمودين في جدول.
وتتراوح قيمه من 0.0 (عدم وجود ارتباط) إلى 1.0 (تطابق تام).

**الصيغة**

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

**الوسائط**

* `column1` — العمود الأول المطلوب مقارنته. [`Any`](/ar/reference/data-types/index)
* `column2` — العمود الثاني المطلوب مقارنته. [`Any`](/ar/reference/data-types/index)

**القيمة المُعادة**

تعيد قيمة بين 0 و1. [`Float64`](/ar/reference/data-types/float)

**أمثلة**

**مثال استخدام**

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