If I have one variable that varies and another doesn't, doesn't this mean they are uncorrelated?

213 Views Asked by At

I'm having a problem with the data set I'm working with.

I have two column vectors that are full of 1s

enter image description here

which means that

$\sigma_{V13} = 0$ and $\sigma_{V14} = 0$

$$\text{Corr}(V_i,V_j) = \frac{\text{Cov}(V_i,V_j)}{\sigma_{V_i} \sigma_{V_j}}$$

So when I try to calculate the Pearson correlation matrix

I am getting undefined values

enter image description here

My Question

I know mathematically $\text{Corr}(V_i,V_j) = 0$ iff $\text{Cov}(V_i,V_j)$

But is it wrong to just say $\text{Corr}(V_{13},V_i) = 0$ and $\text{Corr}(V_{14},V_i) =0$ given $\sigma_{V13} = 0$ and $\sigma_{V14} = 0$ ? If so, why and what am I supposed to do with the columns of data if I cannot compute the correlation?

Like I understand mathematically why it is wrong because you cannot divide something by zero. But I don't understand intuitively why saying they are uncorrelated is wrong because, if one thing doesn't vary but another does, then they should be uncorrelated!

2

There are 2 best solutions below

2
On BEST ANSWER

You can't divide by $0$, so the Pearson correlation coefficient is undefined if one of the random variables is constant. On the other hand, two random variables are said to be "uncorrelated" if their covariance is $0$, and in particular this is the case when one of the random variables is constant.

1
On

You can perfectly have two different variables, one varying and the other staying the same, and still being correlated! Just imagine you live in a hot country and it is summer. The variable $x$ is either $0$ or $1$. $1$ if you leave your home with an umbrella and $0$ otherwise. Let $T$ be the average temperature on a day. If it doesn't rain for a whole month, most surely $T$ varied but your $x$ stayed $0$. Nonetheless, you know there is a correlation between $x$ and $T$: $x$ stayed $0$ precisely because $T$ only assumed high values for that sample.