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?

$$P(X=2) = \frac{({}_{10} C_2)({}_{40} C_5)}{({}_{50} C_7)} = 0.296$$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.

$\displaystyle{\frac{({}_{80}C_5)}{({}_{100}C_5)} \doteq 0.32}$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:

- does not contain a spade?
- contains exactly 5 hearts?
- contains at most one ace?

- $\displaystyle{\frac{({}_{39}C_{13})}{({}_{52}C_{13})} \doteq 0.0128}$
- $\displaystyle{\frac{({}_{13}C_5)({}_{39}C_8)}{({}_{52}C_{13})} \doteq 0.1247}$
- $\displaystyle{P(\textrm{no aces}) + P(\textrm{one ace}) = \frac{({}_{48}C_{13})}{({}_{52}C_{13})} + \frac{({}_{48}C_{12})({}_4C_1)}{({}_{52}C_{13})} \doteq 0.7427}$

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

- $P(2)$
- $P(X \le 2)$
- $\mu = E(X)$
- $\sigma^2 = Var(X)$

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