# Proving $Y = aX + b$ given correlation coefficient $|\rho(X, Y)| = 1$

With correlation coefficient defined as:

$$\rho(X, Y) = \frac{\text{Cov}(X, Y)}{\sqrt{\text{Var}(X)}\sqrt{\text{Var}(Y)}}$$

can you help me prove

$$|\rho(X, Y)| = 1 \implies Y = aX + b$$

• Just a comment... if data is $\{(0,0),(1,1)\}$ then the correlation coefficient is 1 I imagine. Now while all the data obeys $Y=X$ it doesn't prove that this is in fact the law. I assume this is obvious to you but just pointing it out. – JP McCarthy Aug 28 '13 at 12:54
• I believe you want to write $Y=aX+b$ almost surely. – Stefan Hansen Aug 28 '13 at 12:59

Hint: In order for the correlation to be well-defined we must assume that $X$ and $Y$ are not degenerate ($X$ being degenerate meaning that $X=a$ almost surely). Now, show that $$\exists a,b\in\mathbb{R}:Y=aX+b\quad\text{a.s.}\iff \exists a\in\mathbb{R}\setminus\{0\}:\,\mathrm{Var}(Y-aX)=0.$$ Then you just need to show that $$|\rho(X,Y)|=1\;\;\Longrightarrow\;\; \exists a\in\mathbb{R}\setminus\{0\}:\,\mathrm{Var}(Y-aX)=0,$$ so start out by assuming that $\rho(X,Y)=1$ and then expand $\mathrm{Var}(Y-aX)$ and show that it is indeed zero for some $a\neq 0$.
• I think you meant to say the variance of $Y-aX$ not $Y-bX$. – Dilip Sarwate Aug 28 '13 at 13:37