# How to tell intuitively from the joint probability distribution whether two random variables are correlated?

Let us suppose we have two plots representing the joint probability distribution of two random variables. On the first plot, the two variables are correlated, while on the second plot they are uncorrelated. Is there a quick, intuitive way to tell which plot is which?

To extend the question: what features should we look at the plot of a joint PDF to intuitively tell whether the two variables are correlated or not? Example plots supporting the answers would be helpful.

• That on the first plot we have the joint distribution of two variables, on the second one the joint distribution of other two. I remove the two-two part to make it clearer. – Botond Mar 15 '17 at 13:44

Actually this is pretty simple. Recall that correlation measures linear relationship between two variables. If variables are correlated, then the bivariate plot is more or less skew (depending on the value of correlation), while in case of non-correlated variables, it is "random" and symmetric.

You can find an illustration below, where on the first plot you see quite strong positive correlation, on the second one negative correlation, and on the third plot no correlation. While the shapes of the point-clouds will not always be roundish (here they are since I used multivariate normal distribution), their skewness will suggest correlation.

set.seed(123)

library(mvtnorm)

partmp <- par(mfrow = c(1,3))

Sigma_corr <- matrix(
c(
1,   0.8,
0.8, 1
), ncol = 2, byrow = TRUE
)

X_corr <- rmvnorm(5000, sigma = Sigma_corr)
cor(X_corr)
plot(X_corr)

Sigma_corr_neg <- matrix(
c(
1,   -0.5,
-0.5, 1
), ncol = 2, byrow = TRUE
)

X_corr_neg <- rmvnorm(5000, sigma = Sigma_corr_neg)
cor(X_corr_neg)
plot(X_corr_neg)

Sigma_uncorr <- matrix(
c(
1,   0.0,
0.0, 1
), ncol = 2, byrow = TRUE
)

X_uncorr <- rmvnorm(5000, sigma = Sigma_uncorr)
cor(X_uncorr)
plot(X_uncorr)

par(partmp)

• That indeed answers correlation. Would it be possible to identify statistical independence in a similar manner? I imagine that is more complicated because non-linear relationships come into the picture – Botond Mar 15 '17 at 14:06
• @Botond in case of correlation it is so obvious because we are talking about linear relationship. In other cases different kinds of "patterns" (vs "random" and symmetric spread) on plots would suggest some kind of dependence. – Tim Mar 15 '17 at 14:12