To play, we first choose 6 numbers out of 40. (Odds of matching all 6 numbers is 1 in 3,803,830.)
Then we have to match 4 of the 6 winning numbers. In how many ways can 4 numbers be chosen from the winning 6? We use the formula n! / [r! * (n-r)!]
6! / [4! * 2!] = (6 * 5) / 2 which equals 15
Since we can ONLY match 4 numbers, we must determine how many ways we can choose 2 numbers from the remaining 34 LOSING numbers.
34! / [ 2! * (34 -2)!] = (34 * 33) / 2 which equals 561.
Next we multiply 15 * 561 which equals the number of ways we can choose 4 of the 6 WINNING numbers plus 2 of the 34 LOSING numbers.
15 * 561 = 8,415
FINALLY, we divide that number by 3,803,830 which gives us the probability of choosing EXACTLY four of the six winning numbers from a set of 40.
8,415 / 3,803,830 / = 0.00221224397515136
Source 1728.com/puzzle.htm (See puzzle #14)
(That question is probably a little bit tougher than you thought, right?)