# Counting using probability

1. Feb 22, 2008

### musicgold

Hi All,

I am trying to reconcile two approaches used in counting problems. The first approach uses combinations and the other uses probability. I understand the combinations approach, but not able to comprehend the probability approach. Consider the following example,

A carton contains 12 toasters, 3 of which are defective (D). If four toasters are sold at random, find the probability that exactly one will be defective.

By the combinations approach: 3C1 * 9C3 / 12C4 = 252/495 = 0.509

Now the probability approach :

I am purposely want to use here permutations and not combinations.

total possible permutations = 12P4 =11880

Another way of finding the total permutations is to find the chance of getting any permutation = 1/12 * 1/11* 1/10*1/9 = 0.000084. The reciprocal of this number gives the number 11880.

My confusion starts now. Consider the case DGGG, where G = Good, and D= Defective.

P (DGGG) = 3/12 * 9/11 * 8/10 * 7/9 = 0.127

If we divide this number by the probability of each permutation, 0.000084, we get 1512.
Thus, DGGG accounts for 1512 permutations or 1512 / 24 = 63 combinations.

I am having a hard time understanding how these 1512 permutations or 63 combinations look like.

Thanks,

MG.

2. Feb 22, 2008

### HallsofIvy

Staff Emeritus
What they look like? Imagine each defective toaster labeled $\(D_1$, $D_2$, or $D_3$ and each good toaster labled $G_1$, $G_2$, ..., $G_9$. Now look at all possible ways of writing one D and three Gs: $D_1G_1G_2G_3$ is one possibility, $G_4D_2G_7G_5$ is another,$G_1D_1G_3G_2$ yet another. I'm not about to write all 1512 of those! Notice that $D_1G_1G_2G_3$ and $G_1D_1G_3G_2$ have exactly the same "toasters" just in a different order. Those would be counted as different "permutations" but are exactly the same toasters. If we count only those that have at least one toaster different, we get the 63 "combinations".

Last edited: Feb 22, 2008
3. Feb 23, 2008

### unplebeian

This is a case of hypergeometric probability. Look that up.

4. Feb 23, 2008

### Staff: Mentor

What you have implicitly done is the equivalent of painting a number on each toaster. Rather than having twelve toasters, three of them defective, you have twelve distinct toasters, labeled {D1,D2,D3,G1,G2,G3,G4,G5,G6,G7,G8,G9}. Suppose you draw four toasters at random. For example, suppose you draw, in order, G2,G9,G1,D2. Drawing G1, D2, G9, G2 in order is a distinct permutation but the same combination as the previous example.

The 1512 permutations you discussed are the permutations of four toasters chosen from the twelve that have a defective toaster as the first item and good toasters as the remaining three. One way to look at that is to split the set of four into the defective toaster and three good toasters. The defective toaster is easy: three permutations. The good toasters are easy, too: the number of permutations of three items chosen from a set of nine is 504. 3*504=1512.

Regarding the 63 combinations, that is not a valid thing to do. You are explicitly talking about an ordering. You have to look at the entire picture if you want to discuss combinations.

5. Feb 23, 2008

### musicgold

Thank you everybody.

I think DH hit the nail on the head. What I was trying to understand was whether P(DGGG) accounts for a permutation such as GGDG ( with the third toaster being defective). And now I am clear that it does not account for that permutation. P(DGGG) accounts only for the permuations with the first toaster being defective and the next three being good. To account for all the permuations with one defective toaster, we need to consider P(GDGG), P(GGDG) and P(GGGD).

As I was struggling with this problem, I simplified it further to only choose 3 toasters from 6 total toasters ( 4 good, 2 defective). In that case,

P( any permutation ) =1/6*1/5*1/4 =0.0083

P(DDG) = 2/6 * 1/5 * 4/4 = 6.67%, and P(DDG) accounts for 8 permutations ( 6.67% / 0.0083 = 8).

These 8 permutations have the defective toasters in the first two places. I then realized that P(DDG) accounts for the following 8 permutations.

D1 D2 G1
D1 D2 G2
D1 D2 G3
D1 D2 G4
D2 D1 G1
D2 D1 G2
D2 D1 G3
D2 D1 G4

Please let me know whether my logic is correct. Thanks once again,

MG.