Here's the question: Determine the probability that a randomly chosen 5-element subset of numbers from 1 to 20 contains at least one single digit number and at least one prime number.
Hi. Currently stuck on this homework problem. I also want to clarify with this that the prime number can also be a single digit number, so (3, 10, 11, 12, 13) should be a valid combination.
First, we find the number of unrestricted 5-element subsets to be $\binom{20}{5}=15504$ That is $\frac{20!}{5!(20-5)!}=\frac{20*19*18*17*16}{5*4*3*2*1}$
We need the number of subsets that do not contain a prime number. There are $8$ prime numbers in the set, so that leaves $12$ that are not prime. There are $\binom{12}{5}=792$ subsets that do not contain a prime number.
We need the number of subsets that do not contain a single-digit number. There are $9$ single-digit numbers in the set, so that leaves $11$ to choose from. There are $\binom{11}{5}=462$ subsets that do not contain a single-digit number.
We need the number of subsets that contain neither prime numbers nor single-digit numbers. There are $7$ numbers to choose from, so there are $\binom{7}{5}=21$ such subsets.
Now that we have these numbers, we can use inclusion/exclusion. We will start with the total number of subsets $(15504)$, exclude those that do not contain a prime number $(792)$ and those that do not contain a single-digit number $(462)$, then include those that do not contain either $(21)$ because they were excluded twice. This gives us our total of $$15504-792-462+21=14271$$ qualifying subsets.
The probability that on of these is randomly chosen is: $$\frac{14271}{15504}\approx 92.05\%$$