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

> Cramer's V を計算し、バイアス補正を適用します。

# cramersVBiasCorrected

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

導入バージョン: v22.1.0

Cramer's V は、テーブル内の 2 つのカラム間の関連性を示す指標です。
[`cramersV` 関数](/ja/reference/functions/aggregate-functions/cramersV) の結果は 0 (変数間に関連性がないことを表す) から 1 の範囲を取り、各値がもう一方の値によって完全に決まる場合にのみ 1 に達します。
この関数は大きなバイアスを含む可能性があるため、このバージョンの Cramer's V では [バイアス補正](https://en.wikipedia.org/wiki/Cram%C3%A9r%27s_V#Bias_correction) を使用しています。

**構文**

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

**引数**

* `column1` — 比較対象の1つ目のカラム。[`Any`](/ja/reference/data-types)
* `column2` — 比較対象の2つ目のカラム。[`Any`](/ja/reference/data-types)

**戻り値**

0 (カラムの値の間に関連性がないことを表す) から 1 (完全な関連性) までの値を返します。[`Float64`](/ja/reference/data-types/float)

**例**

**通常の cramersV との比較**

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

```response title=Response theme={null}
┌─────cramersV(a, b)─┬─cramersVBiasCorrected(a, b)─┐
│ 0.5798088336225178 │          0.5305112825189074 │
└────────────────────┴─────────────────────────────┘
```
