Exactly..
This can be done with what is known as a hypergeometric distribution.
Assuming the sampling is done without replacement(that is, you don't return the defective item). Given a population of N items(in your case, N=5,000,000) having k successes(0 successes because they're all failures) and N-k failures(4 in this case), the probability of selecting a sample of size n(where n=4) that has x successes(0 successes) and n-x failures(4) is given by:
Since 3% of 5000000 is 150000.
\(\displaystyle \frac{C(k,x)C(N-k,n-x)}{C(N,n)}\)
\(\displaystyle \frac{C(4850000,0)C(150000,4)}{C(5000000,4)}\)
Here's the astonishing result I got:
\(\displaystyle \frac{21092906260312462500}{26041635416678124998750000}\)
Or about .00000081.
The difference between the result already obtained is not worth mentioning. I just rounded it off.
In other words, your odds are about 81 in 100 million of selecting 4 bad items in a row out of 5 million if 3% are rated as defective.
You'd have to have some mighty bad luck. It seems that way with me sometimes when I go shopping. Like that character in L'il Abner who went around with the rain cloud over his head all the time.
I know this probably looks like Greek to you, but it shows that probability can be an involved subject if you want to get particular.