Correlation and standard deviation If the standard deviation of x, sd(x), increases, the correlation cor(x,y) increases as well. Why? If the standard deviation increases 10%, the correlation increases 10% as well. Why?

It depends on how you increase the standard deviation. Typically, when some process increases the standard deviation of $x$ then the correlation decreases. But there are many variations

*

*Decreasing correlation when you increase the standard deviation of $x$ by adding some extra noise to it.


*Equal correlation when you scale the $x$ variable while keeping $y$ the same.


*Increasing correlation if you increase the standard deviation of $x$ by adding/subtracting a positive/negative correlated $y$ variable to it.

layout(matrix(1:4,2))
par(mar = c(5,5,1,1))

### create data
n = 300
set.seed(1)
xy = MASS::mvrnorm(n, mu = c(0,0), Sigma = matrix(c(1,0.62,0.62,1),2))
x = xy[,1]
y = xy[,2]
noise = rnorm(n, mean = 0, sd = sqrt(2.24))

plot(x,y, xlim = c(-3.5,3.5), ylim = c(-3.5,3.5), pch = 20, main = "original")
plot(x+noise,y, xlim = c(-3.5,3.5), ylim = c(-3.5,3.5), pch = 20, main = "less correlation")
plot(x+y,y, xlim = c(-3.5,3.5), ylim = c(-3.5,3.5), pch = 20, main = "more correlation")
plot(1.8*x,y, xlim = c(-3.5,3.5), ylim = c(-3.5,3.5), pch = 20, main = "same correlation")

