Chi-square Test for Feature Reduction in Python

Contingency Table
Generated with seaborn countplot
  • Test statistic — 0.475
  • P-value — 0.4904
  • Degrees of Freedom — 1
  • Expected values — [[2,557.27, 2,605.73],[ 925.73, 943.27]]
  • Test statistic — 645.43
  • P-value — 1.43 * 10^-139
  • DF — 3
  • Expected values — [[1,132.16, 1,116.74, 1,736.42, 1,177.68], [ 409.84, 404.26, 628.58, 426.32]]

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store