Example 10. The probability density function of a random variable $X$ is given by

$$
p(x)= \begin{cases}0 & \text { if } x \leq 0 \\ 3 x^{2} / 8 & \text { if } \quad 0 < x < 2\end{cases}
$$

Find the mathematical expectation of the random variable $X$.
Solution. Using formula (2.4.7), we find

$$
M(X)=\int_{0}^{2} x \cdot 3 x^{2} / 8 d x=\int_{0}^{2} 3 x^{3} / 8 d x=\left.\frac{3}{8} \cdot \frac{x^{4}}{4}\right|_{0} ^{2}=1.5
$$