Tom K. answered 06/21/20
Knowledgeable and Friendly Math and Statistics Tutor
This is the hypergeometric distribrution, not the binomial.
View this as the number of successes in a sample of 6, given 6 successes in a population of size 40.
P(x) = C(6,x)C(34,6-x)/C(40,6) ; alternatively, you can use your calculator/computer's hypergeometric formula. For example, in Excel, you can use =hypgeom.dist(x,6,6,40,0) where x ranges from 0 to 6.
Thus,
P(0) = .3504
P(1) = .4350
P(2) = .1812
P(3) = .0312
P(4) = .0022
P(5) = .000053
P(6) = .000000261