Solve summation expression For a probability problem, I ended up with the following expression
$$\sum_{k=0}^nk\ \binom{n}{k}\left(\frac{2}{3}\right)^{n-k}\left(\frac{1}{3}\right)^k$$
Using Mathematica I've found that the result should be $\frac{n}{3}$. However, I have no idea how to get there. Any ideas?
 A: \begin{align*}
\sum_{k=0}^n k \binom{n}{k}\left(\frac{2}{3}\right)^{n-k}\left(\frac{1}{3}\right)^k &=\sum_{k=0}^n k\frac{n!}{k!(n-k)!}\left(\frac{2}{3}\right)^{n-k}\left(\frac{1}{3}\right)^k\\
&=\sum_{k=0}^n \frac{n!}{(k-1)!(n-k)!}\left(\frac{2}{3}\right)^{n-k}\left(\frac{1}{3}\right)^k\\
&=\frac{n}{3}\sum_{k=0}^n \frac{(n-1)!}{(k-1)!((n-1)-(k-1))!}\left(\frac{2}{3}\right)^{(n-1)-(k-1)}\left(\frac{1}{3}\right)^{k-1}\\
&=\frac{n}{3}\sum_{k=0}^n \binom{n-1}{k-1}\left(\frac{2}{3}\right)^{(n-1)-(k-1)}\left(\frac{1}{3}\right)^{k-1}\\
&=\frac{n}{3}\left(\frac{2}{3}+\frac{1}{3}\right)^{n-1}\\
&=\frac{n}{3}.
\end{align*}
The second to last line is a result of the binomial theorem.

Edit: It was pointed out that I need to be careful when $k=0$. I also made a mistake in applying the binomial theorem. Here is a revised proof. Note that when $k=0$, the term of the sum is $0$, so it is the same as starting at $k=1$.
\begin{align*}
\sum_{k=0}^n k \binom{n}{k}\left(\frac{2}{3}\right)^{n-k}\left(\frac{1}{3}\right)^k &= \sum_{k=1}^n k \binom{n}{k}\left(\frac{2}{3}\right)^{n-k}\left(\frac{1}{3}\right)^k\\ &=
\sum_{k=1}^n k \binom{n}{k}\left(\frac{2}{3}\right)^{n-k}\left(\frac{1}{3}\right)^k\\ &=\sum_{k=1}^n k\frac{n!}{k!(n-k)!}\left(\frac{2}{3}\right)^{n-k}\left(\frac{1}{3}\right)^k\\
&=\sum_{k=1}^n \frac{n!}{(k-1)!(n-k)!}\left(\frac{2}{3}\right)^{n-k}\left(\frac{1}{3}\right)^k\\
&=\frac{n}{3}\sum_{k=1}^n \frac{(n-1)!}{(k-1)!((n-1)-(k-1))!}\left(\frac{2}{3}\right)^{(n-1)-(k-1)}\left(\frac{1}{3}\right)^{k-1}\\
&=\frac{n}{3}\sum_{k=1}^n \binom{n-1}{k-1}\left(\frac{2}{3}\right)^{(n-1)-(k-1)}\left(\frac{1}{3}\right)^{k-1}\\
&=\frac{n}{3}\sum_{k=0}^{n-1} \binom{n-1}{k}\left(\frac{2}{3}\right)^{(n-1)-k}\left(\frac{1}{3}\right)^{k}\\
&=\frac{n}{3}\left(\frac{2}{3}+\frac{1}{3}\right)^{n-1}\\
&=\frac{n}{3}.
\end{align*}
A: Just some binomial coefficient massage and the binomial formula:
$$
\sum_{k=0}^nk\binom nkx^{n-k}y^k
=\sum_{k=1}^nn\binom{n-1}{k-1}x^{n-k}y^k
=ny(x+y)^{n-1}
$$
Now plug in $x=\frac23$ and $y=\frac13$.
A: Hint: $$k\binom{n}{k}=n\binom{n-1}{k-1}$$
A: You can solve the following question in two different ways:


*

*Using binomial distribution

*Using the direct approach


When rolling a fair $6$-sided die $n$ times, what is the expected number of times we get "1" or "2"?

Using binomial distribution, we split it into disjoint events and then add up their probabilities:


*

*The probability of getting "1" or "2" in a single roll is $\frac13$

*The probability of getting "1" or "2" in exactly $k$ out of $n$ rolls is $\binom{n}{k}\cdot\left(\frac13\right)^{k}\cdot\left(1-\frac13\right)^{n-k}$

*The expected number of times we get "1" or "2" in $n$ rolls is $\sum\limits_{k=0}^{n}k\cdot\binom{n}{k}\cdot\left(\frac13\right)^{k}\cdot\left(1-\frac13\right)^{n-k}$


Using the direct approach, we expect to get "1" or "2" exactly $\frac13$ of the time, i.e., in $\frac{n}{3}$ out of $n$ rolls.

Therefore:
$$\sum\limits_{k=0}^{n}k\cdot\binom{n}{k}\cdot\left(\frac13\right)^{k}\cdot\left(1-\frac13\right)^{n-k}=\frac{n}{3}$$
A: It is the expected value of $B(n,\frac{1}{3})$, where $B(n,p)$ is a binomial distribution with parameters $n\in \mathbb{N}$ and $p\in [0,1]$. Let $X\sim B(n,\frac{1}{3})$, then
$$
\sum_{k=0}^n k \binom{n}{k}\left(\frac{2}{3}\right)^{n-k}\left(\frac{1}{3}\right)^{k} = E[X]= \frac{n}{3}.
$$
A: Consider the function $$f\left(x\right)=\left(\frac{2}{3}+x\right)^{n}.
 $$ By the binomial theorem we have $$f\left(x\right)=\sum_{k=0}^{n}\dbinom{n}{k}\left(\frac{2}{3}\right)^{n-k}x^{k}
 $$ so if we take the derivative and we multiply by $x$ we have $$xf'\left(x\right)=\sum_{k=0}^{n}k\dbinom{n}{k}\left(\frac{2}{3}\right)^{n-k}x^{k}
 $$ so $$\sum_{k=0}^{n}k\dbinom{n}{k}\left(\frac{2}{3}\right)^{n-k}x^{k}=nx\left(\frac{2}{3}+x\right)^{n-1}
 $$ now take $x=\frac{1}{3}$.
