Random variable as a vector I read the following on the AP statistics website.

There’s a nice geometric model that represents random variables as vectors whose lengths correspond to their standard deviations. When the variables are independent, the vectors are orthogonal. Then the standard deviation of the sum or difference of the variables is the hypotenuse of a right triangle.

It doesn't elaborate further - it just points this out as a neat fact. How can we represent a random variable as a vector?
I assume this is not referring to multivariate random variables (i.e. a vector of random variables), but to a single random variable. I assume this because the length of a multivariate random variable does not (to my knowledge) represent a standard deviation.
 A: We are treating each random variable as a vector.
If we shift the random variable such that the mean is zero.
The definition of co-variance meets the definition of an inner product, and it is very close to the definition of the euclidean inner product.
$cov(X,Y) = \frac 1n\sum_{i=1}^n X_iY_i$
$St Dev = \sqrt {cov(X,X)}$
Which compares to the Euclidean inner product of $\langle \mathbf x,\mathbf y\rangle = \sum_{i=1}^n x_iy_i$
And norm $\|\mathbf x\|^2 = \langle \mathbf x,\mathbf x\rangle$
A: The AP folks might be thinking along these lines:
Real-valued random variables are real-valued $\mathcal S$-measurable functions on a  probability space $(\Omega,\mathcal S, P)$.  Those with finite variances are elements of $L^2(\Omega)$, the square integrable functions. (Functions on $\Omega$, integrable with respect to the measure $P$.)  This is an inner product space, with inner product $\langle X,Y\rangle = E XY = \int_\Omega X(\omega)Y(\omega)P(d\omega)$. Consider the mean centering map $c: X\mapsto X-EX$.  It is the orthogonal projection onto the space of square-integrable mean $0$ random variables.  Then $\|c(X)\|^2=\langle c(X),c(X)\rangle$ equals the variance of $X$.  If $X$ and $Y$ are uncorrolated then $c(X)$ and $c(Y)$ are perpendicular.  
So maybe $L^2(\Omega)$ is the vector space in question, and $c(X)$ is the vector corresponding to $X$.
