Can someone explain to me how the following summation goes from the left to the right:
$\sum_{i=1}^{r}n(1-p)^{i-1} = \frac{n(1-(1-p)^r)}{p}$.
I have used the formula for a Geometric series. My common ratio is: $(1-p)$. I get the following:
$\sum_{i=1}^{r}n(1-p)^{i-1} = n\cdot\frac{1-(1-p^r)}{1-(1-p)}$.
From here, I simply don't know how to get to $\frac{n(1-(1-p)^r)}{p}$