contingency function calculates the contingency coefficient, a value that measures the association between two columns in a table. The computation is similar to the
cramersV function but with a different denominator in the square root.
column2are the columns to be compared
- a value between 0 to 1. The larger the result, the closer the association of the two columns.
Return type is always Float64.
The two columns being compared below have a small association with each other. We have included the result of
cramersV also (as a comparison):
number % 10 AS a,
number % 4 AS b
┌──────cramersV(a, b)─┬───contingency(a, b)─┐
│ 0.41171788506213564 │ 0.05812725261759165 │