1644. A random variable $X$, which takes the value $m$ with probability

$$
P_{m n}=C_{n}^{m} p^{m} q^{n-m}(0 \leqslant p \leqslant 1 ; p+q=1 ; m=0,1, \ldots, n),
$$

is called binomial. Find the mathematical expectation and variance of such a random variable.
Solution. $X$ can be considered as the number of occurrences of some event $A$ in $n$ independent trials, each of which has the same probability of occurrence, equal to $p$. Let $X_{i}$ be the number of occurrences of event $A$ in the $i$-th trial. $X=\sum_{i=1}^{n} X_{i}$, where $X_{i}$ has the following distribution table:

$$
\begin{gathered}
X_{i} \frac{0 \mid 1}{q \mid p} \\
E X=E \sum_{i=1}^{n} X_{i}=\sum_{i=1}^{n} E X_{i}=\sum_{i=1}^{n}(0 \cdot q+1 \cdot p)=\sum_{i=1}^{n} p=n p
\end{gathered}
$$

From the independence of the trials, it follows that the $X_{i}$ are independent, therefore

$$
\begin{gathered}
D X=D \sum_{i=1}^{n} X_{i}=\sum_{i=1}^{n} D X_{i}=\sum_{i=1}^{n}\left[E X_{i}^{2}-\left(E X_{i}\right)^{2}\right]= \\
=\sum_{i=1}^{n}\left[p-p^{2}\right]=n p(1-p)=n p q .
\end{gathered}
$$