I'm working on a paper (gambling game) and I'm struggling to prove that the sum of the probability mass function equals 1.
People buy cards and each card can be (randomly) chosen for winning with probability $p$. If more people win at the same time, then they share the prize $(=S)$ fairly as in you get $a/b$ part of $S$ if there are in total $b$ cards that have won and $a$ of them are yours. You have bought $k$ cards and there are in total $n$ cards that have been bought. So there are $n-k$ cards that are not yours.
Say $X$ is random variable of the prize you win.
It holds Range$(X)=\{\dfrac{aS}{b} : a,b\in \mathbb{N}, \hspace{10pt} 0 \leq a\leq k, \hspace{10pt} a\leq b\leq n,\hspace{10pt} b\neq 0\}$.
The probability mass function if $X=0$: \begin{align} \mathbb{P}(X=0)=(1-p)^k \end{align} In other cases we assume that $a$ is how many cards of yours win, and $b$ is how many cards in total win *. \begin{align} \mathbb{P}(X=\frac{aS}{b})=\binom{k}{a}p^a(1-p)^{k-a}\binom{n-k}{b-a}p^{b-a}(1-p)^{n-k-(b-a)} \end{align} \begin{align}\mathbb{P}(X=\frac{aS}{b})=\binom{k}{a}\binom{n-k}{b-a}p^{b}(1-p)^{n-b}\end{align}
Okay, if I want to sum all then.... \begin{align}\mathbb{P}(X=0)+\sum\limits_{a=1}^{k}\sum\limits_{b=a}^n\binom{k}{a}\binom{n-k}{b-a}p^{b}(1-p)^{n-b}\end{align}
How can I show that this sums up to 1. This double summation and double binomial coefficients make things hard. Is there something wrong that I have done? Are there other theorems that show that the probability mass function is in fact a probability mass function (instead of doing this)?
I really appreciate your help. I also appreciate if you tell me what kind of distribution this is so I can search for it.
*: Remark that that might not be how you want to see $a, b$ because different fractions can be written such that $a/b=a'/b'$ where gcd$(a',b')=1$. We don't cosider that here.
Solution with help that provided in the comments: Take the sum together as: \begin{align}\sum\limits_{a=0}^{k}\sum\limits_{b=a}^n\binom{k}{a}\binom{n-k}{b-a}p^{b}(1-p)^{n-b}\stackrel{(1)}{=}\sum\limits_{b=0}^{n}\sum\limits_{a=0}^{\min\{k,b\}}\binom{k}{a}\binom{n-k}{b-a}p^{b}(1-p)^{n-b}\stackrel{(2)}{=}\sum\limits_{b=0}^{n}\sum\limits_{a=0}^{k}\binom{k}{a}\binom{n-k}{b-a}p^{b}(1-p)^{n-b}\stackrel{(3)}{=}\sum\limits_{b=0}^{n}\binom{n}{b}p^{b}(1-p)^{n-b}=(p+1-p)^n=1\end{align}
(1): Change of bounds of summation.
(2): Take $\min\{k,b\}=k$, if that is not the case, there is still no problem because the extra terms are zero because of the binomial coefficient.
(3): Vandermonde's identity