In a small pond there are 50 fish, 10 of which have been tagged. A fisherman's catch consists of 7 fish (assume his catch is a random selection done without replacement). What is the probability that exactly 2 tagged fish are caught?
R: dhyper(2,10,40,7) Excel: =HYPGEOM.DIST(2,7,10,50,FALSE)
A lot of 100 fuses is inspected by choosing 5 at random and testing them individually. If all 5 "blow" at the correct amperage, the lot is accepted. Suppose the lot contains 20 defective fuses. Find the probability of accepting the lot.
R: dhyper(5,80,20,5) Excel: =HYPGEOM.DIST(5,5,80,100,FALSE)
The following problems involve being dealt, at random and without replacement, a bridge hand (i.e., 13 cards) from a standard deck of 52 cards. Find the probability of being dealt a bridge hand that:
R: a. dhyper(13,39,13,13) b. dhyper(5,13,39,13) c. phyper(1,4,48,13) Excel: a. =HYPGEOM.DIST(13,13,39,52,FALSE) b. =HYPGEOM.DIST(5,13,13,52,FALSE) c. =HYPGEOM.DIST(1,13,4,52,TRUE)
A bag contains 24 pieces of candy, of which 12 are peppermints and 12 are butterscotch. Let $X$ be the number of peppermints in a sample of 5 pieces of candy selected at random and without replacement from the bag. Find
Note $\displaystyle{P(x) = \frac{({}_{12}C_x)({}_{12}C_{5-x})}{({}_{24}C_5)}}$, and then
$P(2) \doteq 0.3416$
R: dhyper(2,12,12,5) Excel: =HYPGEOM.DIST(2,5,12,24,FALSE)
$P(X \le 2) = P(0) + P(1) + P(2) \doteq 0.5$
R: phyper(2,12,12,5) Excel: =HYPGEOM.DIST(2,5,12,24,TRUE)
$\mu = E(X) = \Sigma \; XP(X) = 1 \cdot P(1) + 2 \cdot P(2) + \cdots 5 \cdot P(5) = 2.5$
$\sigma^2 = Var(X) = [\Sigma \; X^2 P(X)] - \mu^2 \doteq 1.0326$
Note, (c) and (d) can be solved simultaneously with the following:
R: X.outcomes = 0:5 X.probabilities = dhyper(X.outcomes,12,12,5) X.exp = sum(X.outcomes * X.probabilities) X.var = sum(X.outcomes^2 * X.probabilities) - X.exp^2 X.exp X.var