Example. Find the characteristic function of a discrete random variable $\xi$ having a geometric distribution (this means that $\xi$ takes values $n=1,2, \ldots$ and

$$
\mathrm{P}(\xi=n)=p q^{n-1}
$$

where $p>0, q>0, p+q=1)$. Using the characteristic function, find the mathematical expectation $\mathrm{M} \xi$ and the variance $\mathrm{D} \xi$.
Solution. Let $a_{n}=n$, then $p_{n}=\mathrm{P}\left(\xi=a_{n}\right)=p q^{n-1}$, $n=1,2, \ldots$

1. We find the characteristic function $\varphi(t)$ of the discrete random variable $\xi$ using formula (1). We get

$$
\begin{aligned}
& \varphi(t)=\sum_{n=1}^{\infty} e^{i t a_{n}} p_{n}=\sum_{n=1}^{\infty} e^{i t n} p q^{n-1}= \\
&=p e^{i t} \sum_{n=1}^{\infty}\left(q e^{i t}\right)^{n-1}=\frac{p e^{i t}}{1-q e^{i t}}=\frac{p}{e^{-i t}-q}
\end{aligned}
$$

(here we used the formula for the sum of the terms of a geometric progression). Thus,

$$
\varphi(t)=\frac{p}{e^{-i t}-q}
$$

2. We find $\mathrm{M} \xi$ and $\mathrm{D} \xi$ using formulas (3) and (4).

Calculating the derivatives of $\varphi(t)$

$$
\varphi^{\prime}(t)=\frac{i p e^{-i t}}{\left(e^{-i t}-q\right)^{2}}, \quad \varphi^{\prime \prime}(t)=\frac{p e^{-i t}}{\left(e^{-i t}-q\right)^{2}}-\frac{2 p e^{-2 i t}}{\left(e^{-i t}-q\right)^{3}}
$$

we get

$$
\mathrm{M} \xi=\frac{p}{(1-q)^{2}}=\frac{1}{p}, \quad \mathrm{M} \xi^{2}=-\frac{p}{(1-q)^{2}}+\frac{2 p}{(1-q)^{3}}=\frac{2}{p^{2}}-\frac{1}{p}
$$

and

$$
\mathrm{D} \xi=\mathrm{M} \xi^{2}-(\mathrm{M} \xi)^{2}=\frac{2}{p^{2}}-\frac{1}{p}-\frac{1}{p^{2}}=\frac{1}{p^{2}}-\frac{1}{p}=\frac{1-p}{p^{2}}=\frac{q}{p^{2}}
$$

Answer. $\varphi(t)=\frac{p}{\left(e^{-i t}-q\right)}, \mathrm{M} \xi=\frac{1}{p}, \quad \mathrm{D} \xi=\frac{q}{p^{2}}$.

PROBLEM STATEMENT. Find the characteristic function of the random variable $\xi$ (by the distribution series - in the discrete case, by the probability density - in the continuous case). Find the mathematical expectation $\mathrm{M} \xi$ and the variance $\mathrm{D} \xi$ using the characteristic function.

1. $\mathrm{P}(\xi=k)=C_{n}^{k} p^{k} q^{n-k}, k=0,1, \ldots, n, \quad p>0, q>0, p+q=1$ (binomial distribution).
2. $\mathrm{P}(\xi=n)=\frac{a^{n}}{n!} e^{-a}, n=0,1,2, \ldots, 00, q>0, p+q=1$, $m$ - natural number (negative binomial distribution).
4. $p_{\xi}(x)=\frac{1}{\sqrt{2 \pi} \sigma} e^{-(x-a)^{2} /\left(2 \sigma^{2}\right)}, \quad x \in(-\infty,+\infty), \quad 0a,$\end{cases}$ $0<a<+\infty$ (triangular distribution).
8. $p_{\xi}(x)= \begin{cases}\frac{1}{\Gamma(t)} x^{t-1} e^{-x}, & x \in(0,+\infty), \\ 0, & x \notin(0,+\infty),\end{cases}$ $0<t<+\infty$ (gamma distribution).
9. $p_{\xi}(x)=\frac{1}{2} \lambda e^{-\lambda|x|}, x \in(-\infty,+\infty), 0<\lambda<+\infty$ (Laplace distribution).
10. $p_{\xi}(x)=\frac{1}{\pi\left(1+x^{2}\right)}, x \in(-\infty,+\infty) \quad$ (Cauchy distribution).

Answers.

1. $\varphi(t)=\left(p e^{i t}+q\right)^{n}, \mathrm{M} \xi=n p, \mathrm{D} \xi=n p q$.
2. $\varphi(t)=\exp \left[a\left(e^{i t}-1\right)\right], \mathrm{M} \xi=a, \mathrm{D} \xi=a$.
3. $\varphi(t)=[p /(1-q \exp (i t))]^{m}, \mathrm{M} \xi=m q / p, \quad \mathrm{D} \xi=m q / p^{2}$.
4. $\varphi(t)=e^{i t a-\sigma^{2} t^{2} / 2}, \mathrm{M} \xi=a, \mathrm{D} \xi=\sigma^{2}$.
5. $\varphi(t)=\lambda /(\lambda-i t), \mathrm{M} \xi=1 / \lambda, \mathrm{D} \xi=1 / \lambda^{2}$.
6. $\varphi(t)=\left(e^{i t b}-e^{i t a}\right) /[i t(b-a)], \mathrm{M} \xi=(a+b) / 2, \quad \mathrm{D} \xi=(b-a)^{2} / 12$.
7. $\varphi(t)=2(1-\cos a t) /\left(a^{2} t^{2}\right), \mathrm{M} \xi=0, \mathrm{D} \xi=a^{2} / 6$.
8. $\varphi(t)=1 /(1-i t)^{\alpha}, \mathrm{M} \xi=\alpha, \mathrm{D} \xi=\alpha$.
9. $\varphi(t)=\lambda^{2} /\left(\lambda^{2}+t^{2}\right), \mathrm{M} \xi=0, \mathrm{D} \xi=2 / \lambda^{2}$.
10. $\varphi(t)=e^{-|t|}, \mathrm{M} \xi$ and $\mathrm{D} \xi$ do not exist.

### 6.20. Distribution of a Function of a Random Variable

PROBLEM STATEMENT. The distribution of a random variable $\xi$ is given and $f(x)$ is a numerical (non-random) function, $\eta=f(\xi)$. Find the probability of the random event $\{\eta \in B\}$, where $B$ is an interval on the real line (the interval can be open or closed, finite or infinite).

SOLUTION PLAN. Consider the set $G$ on the real line:

$$
G=\{x: f(x) \in B\}
$$

Clearly,

$$
\mathrm{P}(\eta \in B)=\mathrm{P}(f(\xi) \in B)=\mathrm{P}(\xi \in G)
$$

To find $\mathrm{P}(\xi \in G)$, we use the distribution of the random variable $\xi$.