2
$\begingroup$

I'm studying for an exam and my study guide explained combinations, permutations, and binomial distributions, but didn't cover much how to recognize where each comes into play in problems. I'm having trouble formulating the following example problem:

An operator is to operate three different switches from a group of seven. It is known that three of the seven are inoperable. If the switches are selected at random, what is the probability that two will be inoperative?

It seems like it should be a binomial process of two successes (inoperative switch) out of three trials (chosen switches) with a probability of 3/7 (three inoperative switches out of seven on the panel). However, my result, 108/343, does not match any of the given options:

3/7, 9/14, 12/35, 18/42

Assuming there's no misprint in my study guide, where am I going wrong in my formulation of the problem?

$\endgroup$
  • 1
    $\begingroup$ Hint: are the switches being selected with or without replacement? $\endgroup$ – Sycorax Dec 18 '14 at 16:30
  • 1
    $\begingroup$ Hint 2: And in how many ways could you pick 2 inoperable switches? $\endgroup$ – Jake Dec 18 '14 at 16:49
  • $\begingroup$ The switches are selected without replacement, which should mean they're a combination, and there are 35 combinations of three switches chosen from seven. So then the question is, how many ways can I pick three switches from seven, two of which are inoperable. $\endgroup$ – fpt Dec 18 '14 at 18:46
  • $\begingroup$ Maybe my brain's just not working because I'm sick with a cold, but why would there be 12 ways to pick two inoperable switches? I can see how one'd want to use 35 (# of combinations of 3 from 7) as the denominator of the probability, though. $\endgroup$ – fpt Dec 18 '14 at 19:08
1
$\begingroup$

By now, I think you have established that the probability distribution for the number of inoperable switches is not binomially distributed, because individual switches are not selected with replacement.

That said, we should look at the correct sample space over which the elementary outcomes are counted. This consists of all possible ways to choose $3$ switches out of the set of $7$ available, without replacement. Clearly, there are $\binom{7}{3}$ such ways to do this.

Of these $\binom{7}{3}$ outcomes, how many of them contain $2$ defective and $1$ working switch? To get such an outcome, we must have chosen $2$ inoperable switches from the set of $3$ inoperable switches available; simultaneously, we must also have chosen $1$ operable switch from the set of $7-3 = 4$ operable switches available. Therefore, there are $$\binom{3}{2} \times \binom{4}{1}$$ such outcomes. The rest is up to you to calculate.

In general, the probability model we are working with here is called hypergeometric, and it gives the probability of obtaining $m$ "successes" among $n$ trials without replacement from a popuplation of $N$ items, when there are a total of $M$ "successful" items and $N-M$ "failures" available in the population being sampled: specifically $$\Pr[X = m] = \frac{\binom{M}{m} \binom{N-M}{n-m}}{\binom{N}{n}},$$ if $X$ is hypergeometric.

$\endgroup$
  • $\begingroup$ Huzzah! Thank you so much, heropup! Not only did you neatly show me the leap I was failing to make (joint probability), but you also pointed the way to a nice general solution for this sort of problem! $\endgroup$ – fpt Dec 18 '14 at 19:58
0
$\begingroup$

In case you want to sanity check your answer, you can write a little simulation like this:

got_two_bad <- function(objects=c(rep("good", 4), rep("bad", 3))) {
    ## Got exactly two bad when sampling 3 objects
    my_sample <- sample(objects, size=3, replace=F)  # Note the replace=F
    return(sum(my_sample == "bad") == 2)
}
mean(replicate(10^5, got_two_bad()))  # Around 0.34 -- should be (12 / 35)

Of course in this case you can get an exact expression for the answer -- the comments under your original post give good hints on how to get there.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.