What coefficients do I use for a binomial distribution problem? 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?
 A: 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.
A: 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.
