Can you do correlations with binary data?

Can you do correlations with binary data?

You need to understand the association between binary variables just as you need to understand the association between continuous variables. While the principle of correlation is the same with binary data, however, the computations are different.

What is a correlation matrix good for?

A correlation matrix is simply a table which displays the correlation. The measure is best used in variables that demonstrate a linear relationship between each other. The fit of the data can be visually represented in a scatterplot. For instance, it may be helpful in the analysis of multiple linear regression models.

What is Phi correlation?

The phi correlation coefficient (phi) is one of a number of correlation statistics developed to measure the strength of association between two variables. The phi is a nonparametric statistic used in cross-tabulated table data where both variables are dichotomous.

What is a strong Phi value?

I have general rule of thumb for correlation coefficients and you can use the same rule for the Phi coefficient. -1.0 to -0.7 strong negative association. -0.7 to -0.3 weak negative association.

Is a correlation matrix meaningful for a binary?

Thus when applied to binary/categorical data, you will obtain measure of a relationship which does not have to be correct and/or precise. There are quite a few answers on stats exchange covering this topic – this or this for example. It depends. Suppose you have a number of features, say 20, for your binary classification task.

How to calculate correlation coefficient for binary classification?

For binary classification, there is another (and arguably more elegant) solution: treat the true class and the predicted class as two (binary) variables, and compute their correlation coefficient (in a similar way to computing correlation coefficient between any two variables).

Is the correlation matrix useful for continuous data?

When examining my dataset with a binary target (y) variable I wonder if a correlation matrix is useful to determine predictive power of each variable. My predictors (X) contain some numeric and some factor variables. Well correlation, namely Pearson coefficient, is built for continuous data.

Which is the best metric for binary classification?

Scalar metrics are ubiquitous in textbooks, web articles, online courses, and they are the metrics that most data scientists are familiar with. But a couple of weeks ago, I stumbled upon another scalar metric for binary classification: the Matthews Correlation Coefficient (MCC).