Can you use Pearson correlation on binary data?

Can you use Pearson correlation on binary data?

5 Answers. The Pearson and Spearman correlation are defined as long as you have some 0s and some 1s for both of two binary variables, say y and x. It is easy to get a good qualitative idea of what they mean by thinking of a scatter plot of the two variables.

Is binary a continuous variable?

Binary variables are those that take on exactly two values, such as 0 and 1 or True and False or Male and Female. For analysis purposes, they can be considered either continuous or categorical. In general it doesn’t matter which way you think about them.

How to calculate correlation between binary and continuous variables?

The concept is to treat the ordinal or dichotomous variable as being a discrete observed counterpart to a continuous, normally distributed latent variable, and to estimate the Pearson correlation between that latent variable and the continuous variable.

Is it meaningful to calculate Pearson correlation between two variables?

Specifically, suppose that you think the two dichotomous variables (X,Y) are generated by underlying latent continuous variables (X*,Y*). Then it is possible to construct a sequence of examples where the underlying variables (X*,Y*) have the same Pearson correlation in each case, but the Pearson correlation between (X,Y) changes.

When to use bivariate Pearson correlation in Proc Corr?

Whether a statistically significant linear relationship exists between two continuous variables The strength of a linear relationship (i.e., how close the relationship is to being a perfectly straight line) Note: The bivariate Pearson Correlation cannot address non-linear relationships or relationships among categorical variables.

What’s the difference between Spearman and Pearson correlations?

2. One more difference is that Pearson works with raw data values of the variables whereas Spearman works with rank-ordered variables. Now, if we feel that a scatterplot is visually indicating a “might be monotonic, might be linear” relationship, our best bet would be to apply Spearman and not Pearson.