1
$\begingroup$

As far as I know when it comes to theory, we use Pearson correlation when we want to check the correlation between two variables, which are both continuous or discrete. For a mixed case it's not so easy to use it to compute correlation coefficient. On the other hand, we have Pearson correlation estimators, where we can calculate mixed case without any problems (based on samples). Does the Pearson correlation coefficient give deceptive results in this case ?

$\endgroup$
  • $\begingroup$ Pearson coefficient is fine for binary values. I think it still works if the categories are ordered right on the same scale. $\endgroup$ – keiv.fly Feb 23 at 20:31
  • $\begingroup$ @keiv.fly I'm not talking about categorical variable, but about numerical, discrete variable. $\endgroup$ – I.D.M Feb 23 at 20:38
  • $\begingroup$ Wiki explains case mix as cohorts which are essentially categories. If you meant something else than categories you should explain what you mean by case mix. $\endgroup$ – keiv.fly Feb 23 at 20:48
  • $\begingroup$ I meant that we had one continuous variable (e.g with normal distribution) and one discrete variable (e.g with Poisson distribution). $\endgroup$ – I.D.M Feb 23 at 20:56
  • $\begingroup$ Pearson correlation estimators: what is the formula or procedure to calculate the estimate? $\endgroup$ – Subhash C. Davar Apr 4 at 16:06
1
$\begingroup$

If the discrete variable has a lot of discrete values then it is almost the same as a continuous variable, because continuous variables are technically discrete due to the way how numbers are represented in computers (float64 for Python).

The worst case is binary, but, in my experience, Pearson coefficient work well with binary and continuous data together. I know that asymptotic distributions could lead to biased estimators of linear regression. But Pearson coefficient is the way to calculate, it is not an estimation of something, so I cannot say if it is biased or non-biased. I know that if the relationship is linear then you get a strong Pearson coefficient, and if not then you get a small number.

For continuous data and binary data it means that you need to have a strong threshold. If everything below the threshold means 0 and everything above means 1 for the binary variable, then the correlation is strong. Though if I remember correctly it will still not be 1, because you cannot explain 100% of variance of a continuous variable with one binary variable. But you probably can get a number about 80%. This all depends on where the threshold is, and how the variables are distributed. If you have two distinct clouds of continuous variable that are separated by a big distance, then you will get a number close to 100%. Similar logic could be used for discrete variables that have several values.

Pearson coefficient gives a stronger weight to where the most points are, due to the way it is calculated. So if you do not have points in particular regions then there is no way for the coefficient to reflect the correlation there. In practice it means that you usually have points in a limited range, and you calculate the linear correlation in this range.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.