title: How to calculate correlation between binary variables in python?
body: <p>Two binary variables (x and y) form two columns for a number of dates in a pandas Dataframe. I want to calculate a correlation score between x and y that quantifies how correlated x=1 is with y=1 ( x=0 with y=0). </p>
  
  <ol>
  <li>What definition of correlation is appropriate?</li>
  <li><p>Is there a built in function? </p>
  
  <hr>
  
  <p>| day |  _x |  _ y|</p>
  
  <pre><code>0  | 1 | 1
  
  1  | 1 | 0
  
  2  | 0 | 0
  
  3  | 1 | 1
  </code></pre></li>
  </ol>
  
  <p>Explanation: These are two categoricals. say, x = had eggs for breakfast (0 or 1) and y = got a headache (0 or 1). And there data from several days for both x and y I'm trying to see how 'strongly correlated' having an eggs and having a headache are. I understand that Pearson's correlation is not applicable here. What could be used?</p>