<s>[INST] Possible ways of choosing 7 courses out of 20 with the constraint that at least 1 course has to be a stat course To fulfill the requirements for a certain degree, a student can choose to take any $7$ out of a list of $20$ courses, with the constraint that at least $1$ of the $7$ courses must be a statistics course. Suppose that $5$ of the $20$ courses are statistics courses.
(a) How many choices are there for which 7 courses to take?
The solution I believe is : $$\binom{5}{1}\binom{15}{6} + \binom{5}{2}\binom{15}{5} + \binom{5}{3}\binom{15}{4} + \binom{5}{4}\binom{15}{3} + \binom{5}{5}\binom{15}{2}$$
But the solution seems to be $$\binom{20}{7} - \binom{15}{7}$$
I evaluated the two expressions and they give different numerical values.
I want to know where am I going wrong.
The question was earlier asked in the following link:
Take seven courses out of 20 with requirement
 [/INST] The answers are equal and both correct.
The relationship between the answers is explained by Vandermonde's Identity
$$\binom{m+n}{r}=\sum\limits_{k=0}^r\binom{m}{k}\binom{n}{r-k}$$
In your case, that is $$\binom{20}{7}=\binom{5}{0}\binom{15}{7}+\binom{5}{1}\binom{15}{6}+\binom{5}{2}\binom{15}{5}+\dots+\binom{5}{5}\binom{15}{2}\color{grey}{+\binom{5}{6}\binom{15}{1}+\binom{5}{7}\binom{15}{0}}$$
The terms at the end were zero and so can be discarded.  Then, by subtracting the $\binom{5}{0}\binom{15}{7}$ term from both sides and evaluating $\binom{5}{0}$ as $1$ you are left with $$\binom{20}{7}-\binom{15}{7}=\binom{5}{1}\binom{15}{6}+\dots+\binom{5}{5}\binom{15}{2}$$
Arguably, the expression on the left is easier to work with since there are less terms and less arithmetic involved, but both are equally correct.
</s>