contingency
The 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.
语法
参数
column1
和column2
是要进行比较的列
返回值
- 一个介于 0 和 1 之间的值。结果越大,两个列之间的关联越紧密。
返回类型 始终是 Float64。
示例
下面比较的两个列之间的关联性较小。我们还包括了 cramersV
的结果(作为比较):
结果: