Skip to main content
Skip to main content

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.

Syntax

Arguments

  • column1 and column2 are the columns to be compared

Returned value

  • a value between 0 and 1. The larger the result, the closer the association of the two columns.

Return type is always Float64.

Example

The two columns being compared below have a small association with each other. We have included the result of cramersV also (as a comparison):

Result: