Linear transformations
In this section, we concentrate on a random variable that is defined as a linear transformation of another,
\[ Y \;\;=\;\; a + bX \]where \(a\) and \(b\) are known constants.
Mean and variance
If \(X\) is a random variable and \(a\) and \(b\) are constants, then the random variable \(Y = a + bX\) has the following mean and variance.
\[ \begin{align} E[Y] &= a + b \times E[X] \\[0.4em] Var(Y) &= b^2 \times Var(X) \end{align} \]We proved the result for the mean earlier when \(X\) was a discrete random variable. The proof for continuous variables is similar but with summation replaced by integration.
\[ \begin{align} E[a + b \times X] \;&=\; \int_{-\infty}^{\infty} {(a + b x) \times f(x)\;dx} \\ & =\; \int_{-\infty}^{\infty} {\left( a \times f(x) \; + \; b x \times f(x) \right)}\;dx \\ & =\; a \int_{-\infty}^{\infty} {f(x)\;dx} \; + \; b \int_{-\infty}^{\infty} { x \times f(x)\;dx} \\[0.3em] & =\; a \; + \; b \times E[X] \end{align} \]since \(\int_{-\infty}^{\infty} {f(x)\;dx} = 1\).
The proof that we gave earlier for the variance when \(X\) is discrete also holds when it is continuous.