Let $X$ be a negative binomial random variable with parameters $r$ and $p$, and let $Y$ be a binomial random variable with parameters $n$ and $p$. Show that $$ \mathbb{P}(X > n) = \mathbb{P}(Y < r). $$
I would like to get an analytic solution. Basically I want to show the following equality mathematically: $$ \sum_{i=n+1}^\infty \binom{i-1}{r-1} p^r (1-p)^r = \sum_{i=0}^{r-1} \binom{n}{i} p^i (1-p)^{n-i} $$
$X$ is the minimum number of trials needed to get $r$ successes and $Y$ is the number of successes in $n$ trials. Then it is clear that $Y<r\iff X>n$ from which the result follows.