What is the correlation if the standard deviation of one variable is 0?

As I understand, we can get correlation by normalizing covariance using the equation


where σi=E[(Xiμi)2] is the standard deviation of Xi.

My concern is what if the standard deviation equals zero? Is there any condition that guarantees it cannot be zero?



It’s true that, if one of your SD’s is 0, that equation is undefined. However, a better way to think about this is that if one of your SD’s is 0, there is no correlation. In loose conceptual terms, a correlation is telling you about how one variable moves around as the other variable moves around. An SD of 0 implies that variable is not ‘moving around’. You would have to have a vector of a constant, such as rep(constant, n_times).

Source : Link , Question Author : chepukha , Answer Author : gung – Reinstate Monica

Leave a Comment