Finding the Expected value and Variance of the Binomial probability distribution Let $X \sim \text{Binomial}(n,p)$, that is, the probability mass function of $X$, $f(x)$, is such that
$$f(x) = 
\begin{cases}
{n \choose x} p^x (1-p)^{n-x} & \text{for } x=0,1,2,\ldots,n\\
0 & \text{otherwise} \\
\end{cases}$$
I have to find $\mathbb{E}(X)$ and $\mathbb{V}(X)$.
I am fully aware that $\mathbb{E}(x)=np$ but I am supposed to solve this using either a summation or an integral as would be done in any other question. Also,
I am aware that $\sum {n \choose k}a^k b^{n-k} = (a+b)^n$  but I'm not sure exactly how to use this since we have a factor of $x$ in our $\mathbb{E}(x)$ function.

Note that
\begin{align*}
 \mathbb{E}[X] 
 &= \sum_{x=0}^{n}{x {n \choose x}p^{x}(1-p)^{n-x}} \\
 &=\sum_{x=1}^{n}{x {n \choose x}p^{x}(1-p)^{n-x}}
 & 0 \cdot f(0) = 0 \\
 &= \sum_{x=1}^{n}{x \frac{n!}{x!(n-x)!} p^{x}(1-p)^{n-x}} \\
 &= np \sum_{x=1}^{n}{\frac{(n-1)!}{(x-1)!(n-1-(x-1))!}p^{x-1}(1-p)^{n-x}} \\
 &= np \sum_{x=1}^{n}{{n-1 \choose x-1}p^{x-1}(1-p)^{n-x}} \\
 &= np \sum_{y=0}^{n-1}{{n-1 \choose y}p^{y}(1-p)^{(n-1)-y}}
 & y=x-1 \\
\end{align*}
Can you use the binomial theorem here? Can you use the same trick to compute $\mathbb{E}[X(X-1)]$? Note that, since $\mathbb{V}[X]=\mathbb{E}[X^2]-\mathbb{E}[X]^2$, you can determine $\mathbb{V}[X]$ from $\mathbb{E}[X(X-1)]$ and $\mathbb{E}[X]$.
