# The probability distribution of a random variable $x$ is given below:  $\begin{array} {llllllll} \textbf{X:}& 0& 1& 2& 3 \\ \textbf{P(X=x):}& 0.1& 0.3 &0.5& 0.1& \end{array}$ If $Y=X^{2}+2X$ find the mean and variance of $Y$.

Toolbox:
• Moments of a discrete random variable :
• (i) About the origin : $\mu_r'=E(X^r)=\sum P_ix_i^{\Large r}$
• First moment : $\mu_1'=E(X)=\sum P_ix_i$
• Second moment : $\mu_2'=E(X^2)=\sum P_ix_i^2$
• (ii) About the mean : $\mu_n=E(X-\bar{X})^n=\sum (x_i-\bar{x})^nP_i$
• First moment : $\mu_1=0$
• Second moment : $\mu_2=E(X-\bar{X})^2=E(X^2)-[E(X)]^2=\mu_2'-(\mu_1')^2$
• $\mu_2=Var(X)$
Step 1:
$E(X)=\sum x_i P_i=0\times 0.1+1\times 0.3+2\times 0.5+3\times 0.1$
$\quad\quad=0.3+1+0.3$
$\quad\quad=1.6$
$E(X^2)=\sum x_i^2P_i=0\times 0.1+1\times 0.3+4\times 0.5+9\times 0.1$
$\quad\quad=0.3+2+0.9$
$\quad\quad=3.2$
$E(X^3)=\sum x_i^2P_i=0\times 0.1+1\times 0.3+8\times 0.5+27\times 0.1$
$\quad\quad\;\;=7$
$E(X^4)=\sum x_i^2P_i=0\times 0.1+1\times 0.3+16\times 0.5+81\times 0.1$
$\quad\quad\;\;=0.3+8+8.1$
$\quad\quad\;\;=16.4$
Step 2:
Now $Y=X^2+2X$
$E(Y)=E(X^2+2X)=E(X^2)+2E(X)$
$\quad\quad=3.2+2\times 1.6$
$\quad\quad=3.2+3.2$
$\quad\quad=6.4$
Step 3:
$E(Y^2)=E(X^2+2X)^2=E(X^4+4X^3+4X^2)$
$\qquad\;\;=E(X^4)+4E(X^3)+4E(X^2)$
$\qquad\;\;=16.4+4\times 7+4\times 3.2$
$\qquad\;\;=16.4+28+12.8$
$\qquad\;\;=57.2$
Step 4:
Var(Y)=$E(Y^2)-[E(Y)]^2$
$\qquad=57.2-(6.4)^2$
$\qquad=57.2-40.96$
$\qquad=16.24$