Example. Let $\xi$ be a continuous random variable with probability density

$$
p(x)=\left\{\begin{array}{cl}
\lambda e^{-\lambda x}, & x \geqslant 0 \\
0, & x<0
\end{array}\right.
$$

where $\lambda$ is a positive constant (exponential distribution). Let $\eta=\cos \xi$. Find $\mathrm{P}(\eta<0)$.
Solution. In this case, $f(x) = \cos x$. Let's find the set

$$
G = \{x: f(x)8\}$.
7. Uniform distribution $U[0, 4\pi]; \eta = \sin \xi; A = \{\eta > 0\}$.
9. Geometric distribution; $\eta = \sin (\pi \xi / 2); A = \{\eta > 0.2\}$.
10. Geometric distribution; $\eta = \cos (\pi \xi); A = \{\eta < 0\}$.

Answers. 1. 0.8. 2. 3/4. 3. $\left(e^{-2 \lambda} - e^{-3 \lambda}\right) / 2$. 4. $e^{-\lambda}$. 5. $2^{-\lambda} - 4^{-\lambda}$. 6. $1 - e^{-a}\left(1 + a + a^{2} / 2 + a^{3} / 6\right)$.
7. $2 / 3$. 8. $1 / 2$.
9. $p / (1 - q^{4})$. 10. $1 / (1 + q)$.

### 6.21. Numerical Characteristics of a Function of a Random Variable

Problem Statement. A random variable $\xi$ is given, and $f(x)$ is a numerical (non-random) function. Find the expectation and variance of the random variable $\eta = f(\xi)$.

Solution Plan. If $\xi$ is a continuous random variable with probability density $p(x)$, then the expectation and variance can be calculated using the formulas

$$
\mathrm{M} \eta = \int_{-\infty}^{+\infty} f(x) p(x) \, dx
$$

$$
\mathrm{D} \eta = \int_{-\infty}^{+\infty} (f(x) - m)^{2} p(x) \, dx = \int_{-\infty}^{+\infty} f^{2}(x) p(x) \, dx - m^{2}
$$

where $m = \mathrm{M} \eta$.

If $\xi$ is a discrete random variable taking values $a_{1}, a_{2}, \ldots, a_{n}, \ldots$ with probabilities $p_{1}, p_{2}, \ldots, p_{n}, \ldots$ respectively, then

$$
\begin{gathered}
\mathrm{M} \eta = \sum_{n} f(a_{n}) p_{n} \\
\mathrm{D} \eta = \sum_{n} (f(a_{n}) - m)^{2} p_{n} = \sum_{n} f^{2}(a_{n}) p_{n} - m^{2}
\end{gathered}
$$

where the summation is over all possible values of $n$ and $m = \mathrm{M} \eta$.