Skip to main content
added 133 characters in body
Source Link
Dilip Sarwate
  • 47.8k
  • 4
  • 124
  • 235

whuber's much more detailed answer appeared while I was composing this answer of mine (which essentially uses the same argument).

Let $X$ and $Y$ denote two random variables with finite variances $\sigma_X^2$ and $\sigma_Y^2$ respectively and correlation coefficient $\rho = \pm 1$. Then, \begin{align}\operatorname{var}(Y-aX) &= \sigma_Y^2+ a^2\sigma_X^2 - 2a\cdot\operatorname{cov}(Y,X) &\text{standard result}\\ &= \sigma_Y^2+ a^2\sigma_X^2 - 2a\rho\sigma_X\sigma_Y &\text{substitute for}~\operatorname{cov}(Y,X)\\ &= \sigma_Y^2+ a^2\sigma_X^2 \mp 2a\sigma_X\sigma_Y & \text{since}~ \rho = \pm 1\\ &= (\sigma_Y\mp a\sigma_X)^2\\ &= (\sigma_Y - a\rho\sigma_X)^2 & \text{keep remembering that}~ \rho = \pm 1\\ &= 0 &\text{if we choose}~ a = \rho\frac{\sigma_Y}{\sigma_X}. \end{align} Thus, if $\rho = \pm 1$, then $Y-\rho\frac{\sigma_Y}{\sigma_X}X$ is a random variable whose variance is $0$, and so $Y-\rho\frac{\sigma_Y}{\sigma_X}X$ is a constant (almost surely). In other words, $Y = \alpha X + \beta$ (almost surely) and thus $X$ and $Y$ are linearly related (almost surely).

Let $X$ and $Y$ denote two random variables with finite variances $\sigma_X^2$ and $\sigma_Y^2$ respectively and correlation coefficient $\rho = \pm 1$. Then, \begin{align}\operatorname{var}(Y-aX) &= \sigma_Y^2+ a^2\sigma_X^2 - 2a\cdot\operatorname{cov}(Y,X) &\text{standard result}\\ &= \sigma_Y^2+ a^2\sigma_X^2 - 2a\rho\sigma_X\sigma_Y &\text{substitute for}~\operatorname{cov}(Y,X)\\ &= \sigma_Y^2+ a^2\sigma_X^2 \mp 2a\sigma_X\sigma_Y & \text{since}~ \rho = \pm 1\\ &= (\sigma_Y\mp a\sigma_X)^2\\ &= (\sigma_Y - a\rho\sigma_X)^2 & \text{keep remembering that}~ \rho = \pm 1\\ &= 0 &\text{if we choose}~ a = \rho\frac{\sigma_Y}{\sigma_X}. \end{align} Thus, if $\rho = \pm 1$, then $Y-\rho\frac{\sigma_Y}{\sigma_X}X$ is a random variable whose variance is $0$, and so $Y-\rho\frac{\sigma_Y}{\sigma_X}X$ is a constant (almost surely). In other words, $Y = \alpha X + \beta$ (almost surely) and thus $X$ and $Y$ are linearly related (almost surely).

whuber's much more detailed answer appeared while I was composing this answer of mine (which essentially uses the same argument).

Let $X$ and $Y$ denote two random variables with finite variances $\sigma_X^2$ and $\sigma_Y^2$ respectively and correlation coefficient $\rho = \pm 1$. Then, \begin{align}\operatorname{var}(Y-aX) &= \sigma_Y^2+ a^2\sigma_X^2 - 2a\cdot\operatorname{cov}(Y,X) &\text{standard result}\\ &= \sigma_Y^2+ a^2\sigma_X^2 - 2a\rho\sigma_X\sigma_Y &\text{substitute for}~\operatorname{cov}(Y,X)\\ &= \sigma_Y^2+ a^2\sigma_X^2 \mp 2a\sigma_X\sigma_Y & \text{since}~ \rho = \pm 1\\ &= (\sigma_Y\mp a\sigma_X)^2\\ &= (\sigma_Y - a\rho\sigma_X)^2 & \text{keep remembering that}~ \rho = \pm 1\\ &= 0 &\text{if we choose}~ a = \rho\frac{\sigma_Y}{\sigma_X}. \end{align} Thus, if $\rho = \pm 1$, then $Y-\rho\frac{\sigma_Y}{\sigma_X}X$ is a random variable whose variance is $0$, and so $Y-\rho\frac{\sigma_Y}{\sigma_X}X$ is a constant (almost surely). In other words, $Y = \alpha X + \beta$ (almost surely) and thus $X$ and $Y$ are linearly related (almost surely).

Source Link
Dilip Sarwate
  • 47.8k
  • 4
  • 124
  • 235

Let $X$ and $Y$ denote two random variables with finite variances $\sigma_X^2$ and $\sigma_Y^2$ respectively and correlation coefficient $\rho = \pm 1$. Then, \begin{align}\operatorname{var}(Y-aX) &= \sigma_Y^2+ a^2\sigma_X^2 - 2a\cdot\operatorname{cov}(Y,X) &\text{standard result}\\ &= \sigma_Y^2+ a^2\sigma_X^2 - 2a\rho\sigma_X\sigma_Y &\text{substitute for}~\operatorname{cov}(Y,X)\\ &= \sigma_Y^2+ a^2\sigma_X^2 \mp 2a\sigma_X\sigma_Y & \text{since}~ \rho = \pm 1\\ &= (\sigma_Y\mp a\sigma_X)^2\\ &= (\sigma_Y - a\rho\sigma_X)^2 & \text{keep remembering that}~ \rho = \pm 1\\ &= 0 &\text{if we choose}~ a = \rho\frac{\sigma_Y}{\sigma_X}. \end{align} Thus, if $\rho = \pm 1$, then $Y-\rho\frac{\sigma_Y}{\sigma_X}X$ is a random variable whose variance is $0$, and so $Y-\rho\frac{\sigma_Y}{\sigma_X}X$ is a constant (almost surely). In other words, $Y = \alpha X + \beta$ (almost surely) and thus $X$ and $Y$ are linearly related (almost surely).