$\displaystyle \sum_{k=0}^n k {n \choose k} p^k (1-p)^{n-k}$ with $0<p<1$
I know of one way to evaluate it (from statistics) but I was wondering if there are any other ways.
This is the way I know:
Let
$$M(t)=\displaystyle \sum_{k=0}^n e^{kt} {n \choose k} p^k (1-p)^{n-k}$$
Then $$M(t)=\displaystyle \sum_{k=0}^n {n \choose k} (pe^t)^k (1-p)^{n-k}=(pe^t+1-p)^n$$
$$M'(t)=\displaystyle \sum_{k=0}^n ke^{kt} {n \choose k} p^k (1-p)^{n-k}=pe^tn(pe^t+1-p)^{n-1}$$
$$M'(0)=\displaystyle \sum_{k=0}^n k {n \choose k} p^k (1-p)^{n-k}=np$$
Yes.
$$\begin{align} \sum_{k=0}^n k \binom{n}{k} p^k (1-p)^{n-k} &= \sum_{k=1}^n k \binom{n}{k} p^k (1-p)^{n-k} = \sum_{k=1}^n k\frac{n!}{k!(n-k)!} p^k (1-p)^{n-k}\\ &=\sum_{k=1}^n \frac{n!}{(k-1)!(n-1-(k-1))!} p^k (1-p)^{n-k}\\ &=np\sum_{k=1}^n \frac{(n-1)!}{(k-1)!(n-1-(k-1))!} p^{k-1} (1-p)^{n-1-(k-1)}\\ &=np\sum_{\ell=0}^{n-1} \frac{(n-1)!}{\ell!(n-1-\ell)!} p^{\ell} (1-p)^{n-1-\ell}\\ &=np\sum_{\ell=0}^{n-1} \binom{n-1}{\ell} p^{\ell} (1-p)^{n-1-\ell}\\ &= np. \end{align}$$