Example 11 Let $x_{1}, x_{2}, \cdots, x_{19}$ all be positive integers, and satisfy $x_{1}+x_{2}+\cdots+x_{19}=95$. Find the maximum value of $x_{1}^{2}+x_{2}^{2}+\cdots+$ $x_{19}^{2}$.
(1995, Hebei Province Junior High School Mathematics Competition)
Explanation: $\bar{x}=\frac{1}{19}\left(x_{1}+x_{2}+\cdots+x_{19}\right)=5$.
From the variance formula $S^{2}=\frac{1}{19}\left(\sum_{i=1}^{19} x_{i}^{2}-19 \bar{x}^{2}\right)$, we know that $x_{1}^{2}+x_{2}^{2}+\cdots+x_{19}^{2}$ and $S^{2}$ reach their maximum values simultaneously.

For the positive integers $x_{1}, x_{2}, \cdots, x_{19}$, when only one of them is 77 and the other 18 are 1, it is clear that their fluctuation is the greatest, i.e., $S^{2}$ is the largest. In this case,
$$
\left(x_{1}^{2}+x_{2}^{2}+\cdots+x_{19}^{2}\right)_{\max }=18 \times 1+77^{2}=5947 .
$$