Example 7. The random variable $X$ is given by the distribution function

$$
F(x)=\left\{\begin{array}{lc}
0 & \text { if } x \leq 0 \\
x / 2 & \text { if } 0 < x \leq 2 \\
1 & \text { if } x > 2
\end{array}\right.
$$

Find the probability that in the experiment the random variable $X$ will take a value in the interval $(1,2)$.
Solution. For this interval, $F(x)=x / 2$. According to formula (2.2.2), we get:

$$
P(1<X<2)=F(2)-F(1)=(2 / 2)-(1 / 2)=0.5
$$