14. (3b, 9-11) n people are lined up back-to-back. Taller people block the view of shorter ones, making them invisible. What is the expected number of people who are visible?
# Solution.

Let $X_{n}$ be the random variable "The number of visible people among $n$ people." Suppose we have calculated $\mathrm{M} X_{n-1}$. What happens when we add the $n$-th person to the end of the queue? With probability $\frac{1}{n}$, this person is taller than all the others. And with probability $\frac{n-1}{n}$, this person is not the tallest. In the first case, one more person becomes visible, and in the second case, the number of visible people does not change. Therefore,

$$
X_{n}=\frac{1}{n}\left(X_{n-1}+1\right)+\frac{n-1}{n} X_{n-1}=X_{n-1}+\frac{1}{n}
$$

Now, let's move to the expectations:

$$
\mathrm{M} X_{n}=\mathrm{M} X_{n-1}+\frac{1}{n}=\mathrm{M} X_{n-2}+\frac{1}{n-1}+\frac{1}{n}=\ldots=\mathrm{M} X_{1}+\frac{1}{2}+\frac{1}{3}+\ldots+\frac{1}{n}
$$

Notice that $\mathrm{M} X_{1}=1$, since one person is always visible. Therefore,

$$
\mathrm{M} X_{n}=1+\frac{1}{2}+\frac{1}{3}+\ldots+\frac{1}{n}
$$

Answer: $\mathrm{M} X_{n}=1+\frac{1}{2}+\frac{1}{3}+\ldots+\frac{1}{n}$.