# Is Pearson's correlation defined when one random variable has zero variance?

Pearson's correlation coefficient is often seen defined as $$\rho_{X,Y}={\mathrm{cov}(X,Y) \over \sigma_X \sigma_Y} ={E[(X-\mu_X)(Y-\mu_Y)] \over \sigma_X\sigma_Y}$$ which makes sense only when the variances of $X$ and of $Y$ are nonzero.

Has Pearson's correlation been generalized to be defined when one or both random variables have zero variance(s)?

For example, independent random variables are said to have Pearson's correlation zero. But a constant is always independent with any random variable. Can we say a constant and any random variable has zero Pearson's correlation?

Thanks and regards!

-
The correlation is only (to my knowledge) defined for any two non-degenerate random variables, and hence your statement should read: "any two independent non-degenerate random variables have correlation zero". But, why do you want to define correlation between degenerate (almost surely constant) random variables? –  Stefan Hansen May 3 '13 at 10:02