# Hypergeometric Distribution Problem With Rocks!

The question I am working on is:

A geologist has collected 10 specimens of basaltic rock and 10 specimens of granite. The geologist instructs a laboratory assistant to randomly select 15 of the specimens for analysis.

a.What is the pmf of the number of granite specimens selected for analysis?

b.What is the probability that all specimens of one of the two types of rock are selected for analysis?

c. What is the probability that the number of granite specimens selected for analysis is within 1 standard deviation of its mean value?

For part b), I calculated the probability as $2 \cdot h(10; 15, 10, 20) + 2 \cdot h(5;15,10,20)$

I multiplied 2 by each hypergeometric distribution, because there are 2 ways to pick all of the rocks of the same type, and 2 ways of picking 5 rocks of the same type. However, this isn't the correct answer. What is wrong with my reasoning?

For part c), I calculated the average value to be 7.5, which is correct; my variance would then be $V(X) = \frac{10}{19} \cdot 7.5 \cdot (1-\frac{10}{20})$. In the answer key, though, they have $\frac{5}{19}$ for their first term. Why is that?

-

Suppose there are $n_b$ basaltic rocks, and $n_g$ granite rocks, and we sample $n_b + n_g > m > \max(n_b, n_g)$ rocks at random among $n_b+n_g$ equiprobably. There is the total of $N_T =\binom{n_b+n_g}{m}$ orderless configurations.

The number of configurations where $k$ granite rocks are selected is $\binom{n_g}{k} \binom{n_b}{m-k}$, making the probability $$\mathbb{P}\left(k \text{ out of } m \text{ rocks are granite} \right) = \frac{\binom{n_g}{k} \binom{n_b}{m-k}}{\binom{n_b+n_g}{m}} \tag{1}$$ The event that all granite rocks are sampled, corresponds to event $\{n_g \text{ out of } m \text{ rocks are granite}\}$, while the event that all basalt rocks are sampled corresponds to the event $\{m-n_b \text{ out of } m \text{ rocks are granite}\}$. These events are disjoint, therefore $$\mathbb{P}\left(\text{All specimens of one of the two types of rock are selected }\right) = \frac{\binom{n_b}{m-n_g}}{\binom{n_b+n_g}{m}} + \frac{\binom{n_g}{m-n_b} }{\binom{n_b+n_g}{m}}$$

To answer the last question use expression $(1)$ for pmf to compute the mean, and the standard deviation, find $k$ that satisfy the requirement and add pmfs at those values.

-
For part c), why do you suggest I use expression $(1)$? Why can't I just use the Variance formula for a Hypergeometric distribution: $V(X) = \frac{N-M}{N-1} \cdot E(X) \cdot (1-\frac{M}{N})$? –  Mack Feb 21 '13 at 14:57
Because the problem asks you to compute $\mathbb{P}\left( (X-\mathbb{E}(X))^2 < \mathbb{Var}(X) \right)$ which is to say to sum $\sum_{k=m-n_b}^{n_g} \mathbb{P}\left(X=k\right) \left[ (k-\mathbb{E}(X))^2 < \mathbb{Var}(X) \right]$, where $\left[ \ldots \right]$ denotes the indicator function, also known as Iverson bracket. –  Sasha Feb 21 '13 at 15:27
This is how they calculate $V(X)$ in the answer key to my textbook: $V(X)= \frac{5}{19} \cdot 7.5 \cdot (1- \frac{10}{20})$. I just want to know why 5/19 is in the calculation, shouldn't it be 10/19? –  Mack Feb 21 '13 at 15:39