The following combinatorial equality is true? If yes, anyone can give me a hint how to prove it?

$$\sum_{n=x}^{M}\binom{n}{x}q^x(1-q)^{n-x}\binom{M}{n}r^n(1-r)^{M-n}=\binom{M}{x}q^xr^x(1-qr)^{M-x} $$ where $0<r,q<1$.

Any hint on how to derive this combinatorial equality? I need this equality to solve a probability problem of my interest, any help will be very helpful, thank you.


Here is a nice "story proof."

Consider $M$ speeding drivers passing by a cop on the highway.

A speeding driver gets pulled over by the cop with probability $r$.

If a speeding driver gets pulled over, the probability he or she receives a ticket is $q$.

Assume the cop pulls people over and disperses tickets independently.

The probability that a given speeding driver gets a ticket equals $qr$. This is because $$\mathbb{P}(\text{Get Ticket})=\mathbb{P}(\text{Get Ticket}|\text{Pulled Over})\mathbb{P}(\text{Pulled Over})=qr$$ If $X$ denotes the number of drivers who get ticketed, then $X\sim \text{Binomial}(M,qr)$ so $$\mathbb{P}(X=x)={M \choose x}(qr)^x(1-qr)^{M-x}$$ where $x\in \{0,1,...,M\}$. Now let $N$ denote the number of drivers the cop pulls over. Then $N\sim \text{Binomial}(M,r)$ and $X|N\sim \text{Binomial}(N,q)$. From the total law of probability, $$\begin{eqnarray*}\mathbb{P}(X=x)&=&\sum_{n=x}^{M}\mathbb{P}(X=x|N=n)\mathbb{P}(N=n) \\ &=& \sum_{n=x}^{M}{n \choose x}q^x(1-q)^{n-x}\cdot {M \choose n}r^n(1-r)^{M-n}\end{eqnarray*}$$


We use the identity $$ \binom{n}x\binom{M}n=\binom{M}x\binom{M-x}{n-x} $$ (which is provable by converting the binomial coefficients to factorials) to obtain \begin{align} \sum_{n=x}^{M}\binom{n}{x}q^x(1-q)^{n-x}\binom{M}{n}r^n(1-r)^{M-n} &=\binom{M}xq^xr^x\sum_{n=x}^M\binom{M-x}{n-x}(1-q)^{n-x}r^{n-x}(1-r)^{M-n} \\&=\binom{M}xq^xr^x\sum_{n=0}^{M-x}\binom{M-x}{n}(1-q)^{n}r^{n}(1-r)^{(M-x)-n} \\&=\binom{M}xq^xr^x\Big((1-q)r+(1-r)\Big)^{M-x} \\&=\binom{M}{x}q^xr^x(1-qr)^{M-x} \end{align} In the second equality, we reindex the sum, replacing $n$ with $n+x$. In the third equality, we use the binomial theorem.