====== Random variables as vectors ====== Random variables can be seen as vectors. ===== Inner product ===== The inner product is the generalization of dot products for vectors. The inner product of two random variables is the expected value of their product. The inner product of two random variables $X$ and $Y$ is given by: $$ = E[XY] $$ ===== Angles ===== The angle between two random variables is defined the same way as for vectors. The angle between random variables $X$ and $Y$ is defined by: $$ cos(\theta) = \frac{}{\sqrt{}} = \frac{E[XY]}{\sqrt{E[X^2]E[Y^2]}} $$ ===== Orthogonality and uncorrelatedness ===== Random variables $X$ and $Y$ are orthogonal if: $E[XY] = 0$. Random variables $X$ and $Y$ are uncorrelated if: $E[XY] = E[X]E[Y]$. Alternatively, they are uncorrelated if $E[\tilde{X}\tilde{Y}] = 0$, where $\tilde{X} = X - \mu_X$ and $\tilde{Y} = Y - \mu_Y$.