I am asked to solve a probability problem, but despite the solution is correct, I still think it can be improved, but I struggle to see how.
There exist two types of people: category $A$ that will pass a test with probability $p_a$ and category $B$ that will pass a test with probability $p_b$. There are $a$ people in category $A$ and $b$ people in category $B$. Let us also assume that the $p_a$ is independent of $p_b$ and vice versa. What is the probability that $c$ people will pass the test, given knowledge of $a$ and $b$?
This can otherwise be formulated as: given I know how many $a$ students there are and how many $b$ students there are, with their probabilities of passing the test, what is the probability that $c$ will pass? It can be solved by thinking how many ways can $c$ students be taken, such as $0$ from $a$ and $c$ from $b$, $1$ from $a$ and $c - 1$ from $b$ and so on.
I derived the following formula which seems correct:
$p(c | a, b) = \sum_{x=0}^a {a \choose x} (p_a)^x (1 - p_a)^{a - x} {b \choose c - x} (p_b)^{c - x} (1 - p_b)^{b - c + x}$
This does just what is described above: it checks every possible combination of students from the two categories; I assumed that it is always the case that $a < b$ for simplicity. However, when I plot this probability function, I observe a binomial distribution, which makes me wonder if there is an easier way to represent it, namely as a standard binomial distribution, such as
$p(c | a, b) = {\alpha \choose \beta} p ^ {\beta} (1 - p)^{\alpha - \beta}$