Example 6. A die is rolled. Find the mathematical expectation of the discrete random variable $X$, equal to the number of points rolled.
Solution. This random variable can take six values: $x_{1}=1, x_{2}=2, x_{3}=3, x_{4}=4, x_{5}=5, x_{6}=6$; the probability of each of them is the same, equal to $1 / 6$. The distribution law of the random variable $X$ can be given by the formulas

$$
\begin{gathered}
P\left(X=x_{k}\right)=1 / 6, k=1,2,3,4,5,6 \\
\sum_{k=1}^{6} p_{k}=1
\end{gathered}
$$

Using formula (2.4.3), we find the expected value

$$
M(X)=(1+2+3+4+5+6) \cdot \frac{1}{6}=3.5
$$