Peter G. answered 10/09/16
Tutor
4.9
(61)
Success in math and English; Math/Logic Master's; 99th-percentile
Using standard variables,
N = total number of numbers = 39
n = number drawn (without replacement) = 5
K = total number of N which are winning = 5
k = number of winning sought = depends on whether we are matching 5, 4, or 3
In the first case, we have k = 5. Then we have 39!/34! ways of choosing 5 from the 39 (this becomes the denominator), and 5! ways of arranging the 5 winning numbers (this becomes the numerator), so 1/(39-choose-5) is the probability.
In the case of k = 3 or 4, we arrive at the standard formula for a hypergeometric distribution, which also works in the case above of k = 5.
(K-choose-k)(N-K-choose-n-k)
------------------------------------
(N-choose-n)
To see this more intuitively, for k = 3 we have 5*4*3 ways to choose the three winning marbles, and 34*33 ways to choose the remaining two, non-winning marbles. Then we have 5-choose-3 ways to arrange what order those three winning marbles appear out of the five just drawn in sequence. Multiplying all this together gives the numerator. As in the case above, the denominator is 39*38*37*36*35.