1. ## continous random variable

Y has a distribution function:

$F(y) = \left\{ \begin{array}{rcl} 0 & \mbox{for} & y \leq 0 \\
\\
\frac{y}{8} & \mbox{for} & 0 < y < 2 \\
\\
\frac{y^2}{16} & \mbox{for} & 2 \leq y < 4 \\
\\
1 & \mbox{for} & y \geq y 4
\end{array}\right.$

find $\mu$ and $\sigma^2$

since $\mu = \int yf(y) dy \therefore \int^{2}_{0} y \left( \frac{y}{8} \right) dy + \int^{4}_{2} y \left( \frac{y^2}{16} \right) dy + \int^{\infty}_{4} y(1) dy= \frac{y^3}{24} \bigg{|}^{2}_{0} + \ \ \frac{y^4}{64} \bigg{|}^{4}_{2} + \ \ \frac{y^2}{2} \bigg{|}_{4}$ $= \frac{1}{3} +\frac{256-16}{16} + 8 = \frac{145}{12}$

I know that my final solution is incorect since it's suppossed to be $\frac{31}{12}$, where did I go wrong?

2. differentiate $F(y)$ to get $f(y)$ (not integrate). Then take $\int yf(y) \ dy$ to get $\mu$.