patpy.tl.test_proportions

patpy.tl.test_proportions#

patpy.tl.test_proportions(target, groups)#

Run statistical test to check if distribution of target differs between groups

Parameters:
  • target (array-like) – Categories of the observations

  • groups (array-like) – Groups (e.g. cluster numbers) of the observations

Returns:

-result (dict) Result of statistical test with the following keys - score: chi-square statistic - p_value: p-value of the test - dof: number of the degrees of freedom for the statistical test