313. Find the mathematical expectation of a random variable $X$, uniformly distributed in the interval (a,b).
Solution. The density function of a uniform distribution is symmetric about the line $x=(a+b) / 2$, so $M(X)=(a+b) / 2$.

Thus, the expected value of a random variable uniformly distributed over the interval ( $a, b$ ) is the half-sum of the endpoints of this interval. Of course, the same result can be obtained using the formula

$$
M(X)=\int_{a}^{b} x f(x) \mathrm{d} x
$$

In particular, the expected value of a random variable $R$, uniformly distributed over the interval ( 0,1 ), is

$$
M(R)=(0+1) / 2=1 / 2
$$