Let $X$ and $Y$ be two random variable.
The covariance of $X$ and $Y$ is defined by
$$\begin{align*} \cov{X,Y} &= E\brac{(X - E\brac{X}) (Y - E\brac{Y})} \br &= E\brac{XY} - E\brac{X} E\brac{Y} \end{align*}$$
When $\cov{X, Y} = 0$ we say that $X$ and $Y$ are uncorrelated.
- (Symmetry) $\cov{X, Y} = \cov {Y, X} $
- $\cov{X, X} = \var{X} $
- $\forall a, b \in \R$, $\cov{X, aY + b} = a \cov{X, Y}$
- $\cov{X, Y+Z} = \cov{X, Y} + \cov{X, Z} $
The correlation coefficient of $\rho\pare{ X, Y } $ of two random variables $X, Y $, where $\var {X} \neq 0, \var {Y} \neq 0$ is defined as
$$\rho (X, Y) = \frac{ \cov{X, Y}}{ \sqrt{ \var{X} \var{Y}}} = \frac{ \cov{X, Y}}{ \sigma_X \sigma_Y }$$
The correlation coefficient satisfies $$-1 \leq \rho (X, Y) \leq 1$$.
If $\rho > 0$, then the value of $X - E\brac{X}$ and $Y - E\brac{Y}$ “tend” to have the same sign.
If $\rho < 0$, then the value of $X - E\brac{X}$ and $Y - E\brac{Y}$ “tend” to have the opposite sign.
The size of $\abs{\rho}$ provides a normalized measure of the extent to which this is true.
For random variable $X$ and $Y$.
$$\begin{align*} \rho = 1 &\iff \exists c > 0, Y - E[Y] = c(X - E[X]) \br \rho = -1 &\iff \exists c < 0, Y - E[Y] = c(X - E[X]) \end{align*}$$
Let $X $ be a discrete random variable with the probability mass function $p_X(x) $ and $Y $ be a continuous random variable with the density function $f_Y(y) $ suppose that $X $ and $Y $ are independent. What is the distribution of $X+Y $.
</span>
</span>
<span class="proof__expand"><a>[expand]</a></span>
Let $X $ and $Y $ be random variable. Then,
$$-1 \leq \rho (X, Y) \leq 1$$
Equality $\rho(X, Y) \leq 1 \iff \cov{ X, Y }^2 \leq \var{ X } \var{ Y } $
$$E\brac{(X - E\brac{ X }) (Y - E\brac{ Y })}^2 \leq E\brac{ X - E\brac{ X }^2 } E\brac{ Y - E\brac{ Y }^2 } $$
$\abs{ \rho\pare{ X, Y}} = 1 \iff X = \alpha Y + \beta $ for some $\alpha, \beta \in \R $.
$\rho\pare{ X, Y } = 1 \iff X = \alpha Y + \beta $ for $\alpha > 0 $.
$\rho\pare{ X, Y } = -1 \iff X = \alpha Y + \beta$ for $\alpha < 0 $.
</span>
</span>
<span class="proof__expand"><a>[expand]</a></span>