Your mistake is that you replaced the wrong number when going from the 5-match to the 4-match case. 25c5=53510 tells you how many possible outcomes there are. That doesn’t change, so you should leave the “5” alone here.
If you want to match all five numbers, there is exactly one outcome that works. Thus, 1-in-53510 is the chance of hitting all five. Multiplying by the number of attempts gets you your first (correct) answer:
50,000,000 * (1/53510) = 941.1
If you want to match four numbers, you need to count up the number of possible 4-match outcomes. If your numbers are 1-2-3-4-5, then the complete list of 4-match outcomes is:
You’re on the right track. It looks like you tried the r out front because that’s what worked for the 4-match case. If you plug in the 5-match numbers, though, you’ll find it doesn’t work for that one (or, as you found, the 2-match or 3-match).
You’re spot on with the second factor: You have to pick (r-t) values from the list of (n-r) un-guessed numbers. For the numbers you got corrent, you need the same logic: You have to pick (t) values from the list of (r) guessed numbers. For example, if you chose 1-2-3-4-5 as your numbers and you are looking to guess two right, you might match 1-2, 1-3, 1-4, etc. The number of possible pairs is (5 C 2) since you are picking two items from a list of five.
The final result is thus the product of the two combinations:
(r C t) * ( (n-r) C (r-t) )
The reason your formula worked for the 4-match and 1-match cases is because