Tom K. answered 11/01/20
Knowledgeable and Friendly Math and Statistics Tutor
The key thing here is that it is sampling with replacement. That means the samples are independent, so we can use the binomial distribution.
P(green) = 30/(30+70) = 30/100 = 3/10
Then, from the binomial formula
P(18 greens in a sample of 20) = C(20,18)* (3/10)18 * (1-3/10)20-18 =
C(20,18)* (3/10)18 * (7/10)2 =
190 * 3.87420489 * 10-10 * 49/100 =
3.60688475259 * 10-8
Excel and statistics calculators also allow this to be calculated via a built-in function.
In Excel, binom.dist(18, 20, 3/10, 0) = 3.60688475259 * 10-8
(The final 0 means that this is P(X = 18), not P(X <=18)