1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Homework Help: Probabilty of choosing 2 items

  1. Jul 27, 2014 #1
    1. The problem statement, all variables and given/known data
    Two items are chosen at random from a batch of items containing 90 good and 2 defective ones.
    find the probability of at least one out of two items is defective

    2. Relevant equations

    3. The attempt at a solution

    P(defective , good) +P(good , defective) + P(defective , defective) =
    ((10/100) x (90/99)) + ((90/100) x (10/99)) + ((10/100) x (9/99))= 0.1909 (correct ans)

    why cant i do on this way?
    P( 1 defective , i good ) +P (2 defective) = ((2c1 x 90c1)/(92c2)) + (2c2/92c2)= 0.0452
  2. jcsd
  3. Jul 27, 2014 #2


    User Avatar
    Homework Helper

    Because you're answering a different question. You're looking to solve for 90 good and 10 defective items, as opposed to 2. Your solution would work if you account for this.
  4. Jul 27, 2014 #3


    User Avatar
    Science Advisor

    Did you copy the problem correctly? With denominators 100 and 99, it looks like they are saying there were 90 good and 10 defective items, not 90 good and 2 defective.

    First, the problem should be, as I said, 90 bad and 10 defective items. Either you or the person who put the problem in the book confused the number of defective items with the number sampled. But also, by using the same denominator, [itex]^{92}C_2[/itex], for both probabilities, drawing a bad item first and a good item second, you are assuming sampling with replacement which is clearly not intended here. Because there are two ways of choosing 1 good and 1 defective item: assuming there were 90 good items and 10 defective, so a total of 100 items, the probability of choosing a good item first is 90/100. Then there are 89 good items left and 10 bad for a total of 99 items. The probability of choosing a defective item is 10/99 so the probability of choosing a good item first then a bad item is (90/100)(10/99), the first fraction above. But you could also choose a bad item first. The probability of that is 10/100. The there are still 90 good items left and 9 bad for a total of 99 so the probability of choosing a good item second is 90/99 and the probability of choosing a bad item first, then a good item is (10/100)(90/99).

    Of course, those two products, (90/100)(10/99) and (10/100)(90/99) give the same thing. What's normally done is to note that there are n! ways of ordering n items so multiply by n!. 2!= 2 so instead of (90/100)(10/99)+ (10/100)(90/99), I would write that as 2(90/100)(10/99).
  5. Jul 27, 2014 #4
    Last edited: Jul 27, 2014
  6. Jul 27, 2014 #5
  7. Jul 27, 2014 #6
    sorry . it should be 10 defective ones, do you mean 92C2 is for replacement case? which means after I pick 1 item out of 92 items , then when i choose the 2nd item, i still have 92 options , which means the first ball chosen is put back ?

    can i do on this way?
    (10C1 x 9C1)/100C2) +( 10C2/100C2) = 0.1909 , but by doing so , i am assuming , the selection is with replacement am i right? but suprisingly, i also gt the same ans
  8. Jul 27, 2014 #7


    User Avatar
    Gold Member

    If ##X \in \left\{0,1,2\right\}## is the number of defective items chosen, then one way to obtain the answer is to simply compute ##P(X \geq 1) = 1 - P(X < 1) = 1 - P(X=0)##. This is quite a standard practice employed when you see the words 'at least'.
  9. Jul 27, 2014 #8

    Ray Vickson

    User Avatar
    Science Advisor
    Homework Helper

    This is a problem involving the hypergeometric distribution; it is something you will see over and over again, so is worth learning about once and for all. You already have the germ of the idea in some of your workings.

    If you have a population of ##N_1## items of type 1 and ##N_2## items of type 2 (with ##N = N_1 + N_2## items altogether), say you pick ##n## items at random without replacement. Then the probability of having ##k## type-1 items in your sample is
    [tex] P\{ k\: \text{ type 1 }\} = \frac{{N_1 \choose k} {N_2 \choose n-k}}{{N \choose n}}= \frac{_{N_1}C_k \, \times \, _{N_2}C_{n-k}}{_NC_n} [/tex]
    This is not hard to get: what is the probability of 11...122...2 in that specific order (with k type 1s and n-k type 2s)? Well, it is
    [tex] p = \frac{N_1}{N} \frac{N_1 - 1}{N-1} \cdots \frac{N_1 - k+1}{N - k+1}
    \frac{N_2}{N-k} \frac{N_2-1}{N-k-1} \cdots \frac{N_2 - (n-k)+1}{N- n+1} [/tex]
    The probability of any other string of k 1s and (n-k)2s is the same; so for example, the probability of 1221...122211...2 is also p, etc. This is because for each such string, when we compute the probability we have numerators ##N_1, N_1-1, \ldots, N_1 - k+1## and ##N_2, N_2 -1 , \ldots, N_2 - (n-k)+1## all multiplied together in some order, and we have denominators ##N, N-1, \ldots N-n+1## all multiplied together. So, the total numerators and denominators are the same, hence the probability is p. So, to get the probability of k type Is we need only multiply p by the number of different strings of k 1s and n-k 2s, which is ##_nC_k##. By manipulation, you end up with the formula given above.

    For more details about the hypergeometric distribution, see, eg.,
    http://en.wikipedia.org/wiki/Hypergeometric_distribution or
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted