## Green Marbles

You walk up to a black jar containing fewer than 20 marbles. If you reach into the jar and randomly remove two marbles out of the jar without replacing the marbles, you have a 50 percent chance of getting two green marbles. How many green marbles are in the jar before you select the two marbles?
Source: mathcontest.olemiss.edu 11/28/2011

SOLUTION
Suppose there are three green balls labeled $G_1,G_2,G_3$ and two non-green balls labeled $X_1,X_2$ in the jar. We randomly remove two balls out of the jar and record the possible outcomes below:
$G_1,G_2$
$G_1,G_3$
$G_1,X_1$
$G_1,X_2$
$G_2,G_3$
$G_2,X_1$
$G_2,X_2$
$G_3,X_1$
$G_3,X_2$
$X_1,X_2$

Out of those ten possible outcomes we get three desirable outcomes, namely
$G_1,G_2$
$G_1,G_3$
$G_2,G_3$

Hence, the probability of getting two green marbles equals $\frac{3}{10}$.

In the above example, let $n=5$ be the total number of marbles (green and non-green) in the jar and let $r=3$ be the number of green marbles in the jar. Note that we do not care about the order of the two green marbles. We just want two green marbles.

Number of possible outcomes equals $_nC_2=\,_5C_2=10$

Number of desirable outcomes equals $_rC_2=\,_3C_2=3$

Probability of getting two green marbles equals

$\frac{_rC_2}{_nC_2}=\frac{3}{10}=30\%$

General Case
Let’s calculate the probability in the general case where $n<20$.

$\frac{_rC_2}{_nC_2}=\frac{\frac{r!}{2!\left (r-2\right )!}}{\frac{n!}{2!\left (n-2\right )!}}$

$=\frac{r!}{2!\left (r-2\right )!}\times \frac{2!\left (n-2\right )!}{n!}$

$=\frac{r!}{\left (r-2\right )!}\times \frac{\left (n-2\right )!}{n!}$

$=\frac{r\left (r-1\right )\left (r-2\right )!}{\left (r-2\right )!}\times \frac{\left (n-2\right )!}{n\left (n-1\right )\left (n-2\right )!}$

$=\frac{r\left (r-1\right )}{n\left (n-1\right )}$

We want the probability to be 50%:

$\frac{r\left (r-1\right )}{n\left (n-1\right )}=\frac{1}{2}$

Since all we know is that $n<20$, we will form products of pairs of consecutive positive integers from 1 through 19 and look for products that satisfy the ratio of 1 to 2. For example,
$2\times 1=2$
$3\times 2=6$
$\cdots$
We tabulate the results in the following table

 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 2 6 12 20 30 42 56 72 90 110 132 156 182 210 240 272 306 342

The table shows that the only products that satisfy the ratio are 6 and 12. We write
$\frac{r\left (r-1\right )}{n\left (n-1\right )}=\frac{3\left (3-1\right )}{4\left (4-1\right )}=\frac{3\left (2\right )}{4\left (3\right )}=\frac{6}{12}=\frac{1}{2}$

Thus, $r=3$ and there are 3 green balls in the jar.