title: how to understand the chi square contingency table
body: <p>I have few categorical features:</p>
  
  <pre><code>['Gender',
   'Married',
   'Dependents',
   'Education',
   'Self_Employed',
   'Property_Area']
  
  from scipy.stats import chi2_contingency
  chi2, p, dof, expected = chi2_contingency((pd.crosstab(df.Gender, df.Married).values))
  print (f'Chi-square Statistic : {chi2} ,p-value: {p}')
  </code></pre>
  
  <h3>output:</h3>
  
  <pre><code>Chi-square Statistic : 79.63562874824729 ,p-value: 4.502328957824834e-19
  </code></pre>
  
  <p>How can I know if the features are independent from each other from these statistics?</p>
  
  <p>I am trying to build a classification model so I just wanted to know are these categorical columns useful for predicting my target variable.</p>