I got another question, this one from Brooklyn, New York. It’s a commonly asked question, so I should write something about this. The question is whether you can get a correlation coefficient between two variables when one (or both) are categorical.

It turns out that you can do this, as long as the categorical variable is binary (has only two levels). It’s easiest to follow this if you code the variable as 0-1, but it turns out that how you code the variable doesn’t really matter much. I’ll show the math when I have time, but you can also see this on a variety of web sites:

- http://www.utexas.edu/cc/faqs/stat/general/gen5.html
- http://www.upa.pdx.edu/IOA/newsom/pa551/lectur15.htm
- http://www.jalt.org/test/bro_12.htm
- http://www.visualstatistics.net/Visual%20Statistics%20Multimedia/point-biserial_coefficient_of_correlation.htm
- http://www.public.asu.edu/~pythagor/phi_and_chi_square.htm
- http://www2.chass.ncsu.edu/garson/pa765/correl.htm
- http://www.viterbo.edu/personalpages/faculty/DWillman/p230/correl.htm

You can find an earlier version of this page on my original website.