Tom K. answered 11/14/20
Knowledgeable and Friendly Math and Statistics Tutor
X is the number of white balls selected. 4 balls are being selected, so X can range from 0 to 4 (there are at least 4 white balls - in this case, there are 5 - and there are at least 4 nonwhite balls - in this case, 20 + 25 = 45, so 0 - 4 are all possible).
Then, we are calculating P(X2 + 12 = 7X when X is an integer between 0 and 4)
X2 + 12 = 7X
X2 - 7X + 12 = 0
(X - 3)(X - 4) = 0
X = 3,4
As X must be an integer between 0 to 4, and X =3, 4, which are integers between 3 and 4, we calculate
P(X = 3) + P(X = 4)
Alternatively, we can calculate, 1 - P(X <= 2)
We are selecting X white balls when there are 5 white balls and a total of 5 + 20 + 25 = 50 balls.
Then, 1 - P(X <=2) = 1 - hypgeom.dist(2,4,5,50,1) = 0.001976
Calculating this using combinations, P(X = 3) + P(X = 4) =
(C(5,3)C(45,1) + C(5,4)C(45,0))/C(50,4) =
(10*45 + 5 * 1)/230300 =
455//230300 =
13/6580 =
0.001976
Look how much easier the problem was in Excel (or on your calculator if it has the hypergeometric distribution).