# Pearson's correlation for non-linear data

It's known that Pearson's correlation is able to measure trends for an observed sample $y$ and a possible linear relationship with a simulated data $y^{(s)}$, being $+1$ if $y^{(s)} = a + by$ and $b >0$.

But, does it matter the shape of the observed data $y$? For instance, if I have $y = f(x) = x^2$, would it make any effect for Pearson's correlation? My intuition says no, but I want to find a more reliable source.

• Are you alluding to the canonical example of zero correlation but a clear relationship: $E[X] = 0$, density of $X$ is symmetric, and $Y = X^2$? Then $Corr(X,Y) = 0$ but there is an entirely deterministic relationship. Commented Jun 22, 2016 at 6:23
• I think my question is much simpler than that. Does the characteristics of the observed sample matter for the Pearson? Does it have to obey any sort of characteristics?
– rph
Commented Jun 23, 2016 at 13:02
• That has a simple mathematical answer, obtainable from any formula for the correlation: it is defined provided both variables have nonzero variance.
– whuber
Commented Sep 7, 2022 at 12:57
• "Does the characteristics of the observed sample matter for the Pearson?" what does that term 'matter' actually mean in this context?. You can compute a Pearson correlation for any set of paired numbers, whether it is a linear relationship or not, so I would say that it doesn't matter. Commented Sep 7, 2022 at 14:11

• I would say something like, "It may not pickup any aspect of a non-linear relationship." For example, if $X \sim N(0, 1)$ and $Y = X^2$, then $Corr(X,Y)=0$. That result is true! Saying it provides "false results" in this case isn't quite right. Commented Jun 23, 2016 at 16:06
Suppose, you have $$y=f(x)=x^2$$ Take log on both sides $$log(y) = 2 \ log(x)$$ Now have a linear relationship. Find Pearson's Correlation Coefficient now. Read this answer for more details.