## Example 5.

Find the mathematical expectation of a random variable $X, \quad$ having a uniform distribution on the interval $[\alpha, \beta]$.
Solution.

Using formula $(2.4 .8)$ and taking into account the formula, we find

$$
\begin{gathered}
M(x)=\int_{-\infty}^{+\infty} x p(x)=\int_{-\infty}^{\alpha} x p(x) d x+\int_{\alpha}^{\beta} x p(x) d x+\int_{\beta}^{+\infty} x p(x) d x= \\
=\int_{\alpha}^{\beta} \frac{x d x}{\beta-\alpha}=\left.\frac{1}{\beta-\alpha} \cdot \frac{x^{2}}{2}\right|_{\alpha} ^{\beta}=\frac{\beta^{2}-\alpha^{2}}{2(\beta-\alpha)}=\frac{\beta+\alpha}{2} \\
M(X)=\frac{\beta+\alpha}{2} .
\end{gathered}
$$

Therefore, the mathematical expectation of a random variable uniformly distributed on an interval is the midpoint of this interval.