Picking 6 numbers out of 40, where you make exactly 6 picks to get those 6 winning numbers, where all 40 possible numbers are different, picked numbers can't be repeated, and the order in which the numbers are picked doesn't matter:
P(first picked number is a winner) = 6/40
P(2nd picked number is a winner) = 5/39
P(3rd picked number is a winner) = 4/38
P(4th picked number is a winner) = 3/37
P(5th picked number is a winner) = 2/36
P(6th picked number is a winner) = 1/35
P(all 6 of the above events happen) = 6/40 * 5/39 * 4/38 * 3/37 * 2/36 * 1/35
P(all 6 of the above events happen) = (6 * 5 * 4 * 3 * 2 * 1) / (40 * 39 * 38 * 37 * 36 * 35)
P(all 6 of the above events happen) = 34! * 6! / 40!
P(all 6 of the above events happen) = "40 choose 6"
P(all 6 of the above events happen) = 40 nCr 6 (on a calculator)
P(all 6 of the above events happen) = 0.000000260526576 (about 1 in 3.8 million)