statsmodels.stats.contingency_tables.Table2x2.test_nominal_association#

Table2x2.test_nominal_association()#

Assess independence for nominal factors

Assessment of independence between rows and columns using chi^2 testing. The rows and columns are treated as nominal (unordered) categorical variables.

Returns:
Bunch

A bunch with attributes

  • statisticfloat

    The chi^2 test statistic.

  • dfint

    The degrees of freedom of the reference distribution.

  • pvaluefloat

    The p-value for the test.