Example. Let $(\xi, \eta)$ be a random vector with independent components, both distributed according to the same exponential law. Find $\mathrm{M}|\xi-\eta|$.
Solution. The probability density $p(x, y)$ of the random vector $(\xi, \eta)$ is (see p. 321)

$$
p(x, y)=\left\{\begin{array}{cl}
\lambda^{2} e^{-\lambda(x+y)}, & (x, y) \in D \\
0, & (x, y) \notin D
\end{array}\right.
$$

where $D=\{(x, y): x \geqslant 0, y \geqslant 0\}$. In the considered case, $f(x, y) = |x-y|$, therefore

$$
\mathrm{M}|\xi-\eta|=\int_{-\infty}^{+\infty} \int^{+\infty}|x-y| p(x, y) d x d y=\lambda^{2} \iint_{D}|x-y| e^{-\lambda(x+y)} d x d y
$$

We divide the set $D$ into two non-intersecting regions:

$$
D=D_{1} \cup D_{2}
$$

where

$$
\begin{aligned}
& D_{1}=\{(x, y): \quad x \geqslant y, x \geqslant 0, y \geqslant 0\} \\
& D_{2}=\{(x, y): \quad x<y, x \geqslant 0, y \geqslant 0\}
\end{aligned}
$$

First, we find the integral over the region $D_{1}$:

$$
\begin{aligned}
& \lambda^{2} \int_{D_{1}}(x-y) e^{-\lambda(x+y)} d x d y= \\
& \quad=\lambda^{2} \int_{0}^{\infty} d x \int_{0}^{x} x e^{-\lambda(x+y)} d y-\lambda^{2} \int_{0}^{\infty} d y \int_{y}^{\infty} y e^{-\lambda(x+y)} d x= \\
& \quad=\lambda \int_{0}^{\infty} x e^{-\lambda x}\left(1-e^{-\lambda x}\right) d x-\lambda \int_{0}^{\infty} y e^{-\lambda y} e^{-\lambda y} d y= \\
& =\lambda \int_{0}^{\infty} x e^{-\lambda x} d x-\lambda \int_{0}^{\infty} x e^{-2 \lambda x} d x-\lambda \int_{0}^{\infty} y e^{-2 \lambda y} d y= \\
& =\frac{1}{\lambda}-\frac{1}{4 \lambda}-\frac{1}{4 \lambda}=\frac{1}{2 \lambda}
\end{aligned}
$$

(all three last integrals reduce to the integral $\int_{0}^{\infty} x e^{-x} d x=1$).

By symmetry, it is clear that the integral over the region $D_{2}$ is the same value, i.e.,

$$
\lambda^{2} \iint_{D_{2}}(y-x) e^{-\lambda(x+y)} d x d y=\frac{1}{2 \lambda}
$$

Therefore,

$$
\mathrm{M}|\xi-\eta|=\frac{1}{\lambda}
$$

Answer. $\mathrm{M}|\xi-\eta|=\frac{1}{\lambda}$.

Conditions of the Problem. Let $(\xi, \eta)$ be a random vector with independent components, both distributed according to the same exponential law. Find the mathematical expectation of the random variable $\zeta=f(\xi, \eta)$.

1. $\zeta=2 \xi \eta$. 2. $\zeta=(2 \xi-\eta)^{2}$. 3. $\zeta=(2 \xi+\eta)(\xi-2 \eta)$. 4. $\zeta=\sqrt{\xi \eta}$. 5. $\zeta=e^{-(\xi+\eta)}$. 6. $\zeta=\sin (\xi+\eta)$. 7. $\zeta=\cos (\xi-\eta)$. 8. $\zeta=|2 \xi-\eta|$. 9. $\zeta=\min (\xi, \eta)$. 10. $\zeta=\max (\xi, \eta)$.
Answers. 1. $2 / \lambda^{2}$. 2. $6 / \lambda^{2}$. 3. $-3 / \lambda^{2}$. 4. $\pi / \lambda$. 5. $\lambda^{2} /(\lambda+1)^{2}$. 6. $2 \lambda^{3} /\left(1+\lambda^{2}\right)^{2}$. 7. $\lambda^{2} /\left(1+\lambda^{2}\right)$. 8. $5 /(3 \lambda)$. 9. $1 /(2 \lambda)$. 10. $3 /(2 \lambda)$.

### 6.24. Normal Distribution

Problem Statement. The random variable $\xi$ is distributed according to the normal law $N\left(a, \sigma^{2}\right)$. Find the probability of the random event $A$, which consists of the values of $\xi$ satisfying certain inequalities.

## Plan of Solution.

1. Represent the event $A$ as

$$
A=\left\{\xi \in \bigcup_{i=1}^{k}\left(a_{i}, b_{i}\right)\right\}
$$

where $\left(a_{1}, b_{1}\right),\left(a_{2}, b_{2}\right), \ldots,\left(a_{k}, b_{k}\right)$ are pairwise non-intersecting intervals on the number line. To find the intervals $\left(a_{i}, b_{i}\right)$, we need to solve the inequalities defining $A$.

2. The probability of the random event (1) is found using the formula

$$
\mathrm{P}\left(\xi \in \bigcup_{i=1}^{k}\left(a_{i}, b_{i}\right)\right)=\sum_{i=1}^{k}\left(\Phi\left(\frac{b_{i}-a}{\sigma}\right)-\Phi\left(\frac{a_{i}-a}{\sigma}\right)\right)
$$

where $\Phi(x)$ is the Laplace function, i.e.,

$$
\Phi(x)=\frac{1}{\sqrt{2 \pi}} \int_{-\infty}^{x} e^{-u^{2} / 2} d u
$$

Tables for the Laplace function have been created *) (see, for example, Table 1.1 in the book by L.N. Bolshev and N.V. Smirnov "Tables of Mathematical Statistics", Moscow: Nauka, 1983), which provide values of the function only for $x \geqslant 0$. For negative $x$, we have

$$
\Phi(x)=1-\Phi(|x|) .
$$

The values of the Laplace function can be conveniently obtained using the package RESHEBNIK.VM.