Simplify an expression to show equivalence I am trying to simplify the following expression I have encountered in a book
$\sum_{k=0}^{K-1}\left(\begin{array}{c}
K\\
k+1
\end{array}\right)x^{k+1}(1-x)^{K-1-k}$
and according to the book, it can be simplified to this:
$1-(1-x)^{K}$
I wonder how is it done? I've tried to use Mathematica (to which I am new) to verify, by using
$\text{Simplify}\left[\sum _{k=0}^{K-1} \left(\left(
\begin{array}{c}
 K \\
 k+1
\end{array}
\right)*x{}^{\wedge}(k+1)*(1-x){}^{\wedge}(K-1-k)\right)\right]$
and Mathematica returns
$\left\{\left\{-\frac{K q \left((1-q)^K-q^K\right)}{-1+2 q}\right\},\left\{-\frac{q \left(-(1-q)^K+(1-q)^K q+(1+K) q^K-(1+2 K) q^{1+K}\right)}{(1-2 q)^2}\right\}\right\}$
which I cannot quite make sense of it.
To sum up, my question is two-part:


*

*how is the first expression equivalent to the second?

*how should I interpret the result returned by Mathematica, presuming I'm doing the right thing to simplify the original formula?
Thanks a lot!

The following answer makes sense only with some background in probability.
Suppose first that $0 \le x\le 1$.
A possibly biased coin has probability $x$ of landing "heads."  Toss the coin $K$ times.  We compute the probability $P$ of one or more heads in two different ways.  
The probability we get exactly $k+1$ heads is 
$$\binom{K}{k+1}x^{k+1}(1-x)^{K-1-k}.$$
Add up, from $k=0$ to $k=K-1$. We get the probability of $1$ head, plus the probability of $2$ heads, plus the probability of $3$ heads, and so on, up to the probability of $K$ heads.  Thus 
$$P=\sum_{k=0}^{K-1}\binom{K}{k+1}x^{k+1}(1-x)^{K-1-k}.$$
The probability of $0$ heads (all tails) is $(1-x)^K$, so the probability of one or more heads is $1-(1-x)^K$, and therefore 
$$P=1-(1-x)^K.$$
The argument so far only proves the desired result for $0\le x\le 1$. But note that for any $K$, each of the expressions we are trying to prove equal is a polynomial of degree $K$.  But if two polynomials $A(x)$ and $B(x)$ with real coefficients, each of degree $\le K$, are equal at $K+1$ values of $x$, then they are identically equal.
