Derivation (expectation and variance of binomial distribution)
For $X\sim B(n,p)$, we can write $X = Y_1 + Y_2 + \ldots + Y_n$ with $Y_1,\ldots,Y_n\sim B(1,p)$ independent.
So $$ \begin{align*} \expect(X) &= \expect(Y_1)+\ldots+\expect(Y_n) = np, \\ \op{var}(X) &= \op{var}(Y_1) + \ldots + \op{var}(Y_n) = np(1-p). \end{align*} $$