Example 6. Find the variance of the discrete random variable $X$ representing the number of points that fall when tossing a die.
Solution. First, let's write down the distribution law of this random variable in the form of a table

| $X$ | 1 | 2 | 3 | 4 | 5 | 6 |
| :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| $P$ | $\frac{1}{6}$ | $\frac{1}{6}$ | $\frac{1}{6}$ | $\frac{1}{6}$ | $\frac{1}{6}$ | $\frac{1}{6}$ |

Let's find the mathematical expectations $M(X)$ and $M\left(X^{2}\right)$:

$$
\begin{gathered}
M(X)=1 \cdot \frac{1}{6}+2 \cdot \frac{1}{6}+3 \cdot \frac{1}{6}+4 \cdot \frac{1}{6}+5 \cdot \frac{1}{6}+6 \cdot \frac{1}{6}=\frac{21}{6} \\
M\left(X^{2}\right)=1 \cdot \frac{1}{6}+2^{2} \cdot \frac{1}{6}+3^{2} \cdot \frac{1}{6}+4^{2} \cdot \frac{1}{6}+5^{2} \cdot \frac{1}{6}+6^{2} \cdot \frac{1}{6}=\frac{91}{6}
\end{gathered}
$$

We will calculate the variance using formula (2.5.4):

$$
D(X)=M\left(X^{2}\right)-(M(X))^{2}=\frac{91}{6}-\left(\frac{21}{6}\right)^{2}=\frac{91}{6}-\frac{441}{36}=\frac{105}{36}=\frac{35}{12}
$$