[Math] Lottery problem – Chance of 4 out of 5 balls matching

combinatoricsprobabilityproblem solving

In a lottery, an urn contains 40 balls that are numbered 1, 2, …, 40. Each week, 5 balls are drawn from the urn without replacement. To enter, one chooses 5 numbers. Anyone who correctly predicts exactly (and only) four of the five numbers (order doesn't matter) wins the jackpot. What's the probability of winning this lottery?

My approach was to do $\frac{{5 \choose 4} \times 34}{{40 \choose 5}}$, as I have to choose 4 out of the 5 balls, and there are $40-5-1=34$ ways to choose the last number so it does not match the final ball. As well, there should be $40 \choose 5$ ways to select five balls from the urn. However, this doesn't seem to work… Where have I gone wrong?

Best Answer

To win you must select exactly 4 of the 5 'matching' numbers, and 1 of the 35 'nonmatching' numbers. Count the ways to do this and divide by the count of ways to select any 5 of the 40 numbers.

$$\frac{{5\choose 4}{35\choose 1}}{40\choose 5}$$