# Correlation Coefficient between discrete and continuous: is it possible?

Is it correct to measure the correlation coefficient between a continuous variable and a discrete variable? I visualized it and there is definitely no linear relationship the way I see it that is why I decided that it was not possible to calculate the correlation coefficient for it. These are the two variables I am working with show on a marginal graph.

• What is x in your case ? Dec 5, 2023 at 14:59
• Y-area of apartment x-Number of bedrooms-discrete (1,2,3,4,5) Dec 5, 2023 at 15:12
• By applying the formula you can demonstrate it is possible to compute a correlation coefficient: all you need are pairs of numbers. What it means depends on what the values of $x$ and $y$ represent. And whether it's appropriate to do the calculation at all depends on your analytical objectives. Consider, then, editing your question to include such information.
– whuber
Dec 5, 2023 at 15:18
• Such a correlation would indicate something about stochastic ordering over the pairs, but further consideration is needed. Dec 5, 2023 at 15:31
• This might be a stupid question, but why wouldn't you consider the number of bedrooms as continuous ? Dec 5, 2023 at 16:05