# Need help with probability...

**URL:** <https://boards.straightdope.com/t/need-help-with-probability/342902>\
**Category:** Factual Questions\
**Created:** [February 3, 2006, 9:27pm UTC](https://boards.straightdope.com/t/need-help-with-probability/342902 "2006-02-03T21:27:52Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![BabaBooey](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@BabaBooey](https://boards.straightdope.com/u/BabaBooey)\
**Post date:** [February 3, 2006, 9:27pm UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/1 "2006-02-03T21:27:52Z")

</div>

Yes, it is homework. I don’t need an answer, just a nudge in the right direction because my logic seems correct on this matter and it’s frustrating the hell out of me.

14 PCs. 4 are bad. If 4 are picked by a customer, I need the probability that EXACTLY one is bad.

Here’s what I figure: there’s a (4/14) chance that one will be bad. Which of the four is bad is inconsequential. Then I took the complement of of the probability that the next one is wrong, then the next, then the final, so I end up with an equation that looks like this:

(4/14) \* [1-(3/13)] \* [1-(2/12)] \* [1-(1/11)]

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [February 3, 2006, 9:45pm UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/2 "2006-02-03T21:45:18Z")

</div>

The hypergeometric distribtuion is your friend.

---

<div class="post-metadata">

**Author:** ![Quercus](https://avatars.discourse-cdn.com/v4/letter/q/7ab992/32.png) [@Quercus](https://boards.straightdope.com/u/Quercus)\
**Post date:** [February 3, 2006, 9:49pm UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/3 "2006-02-03T21:49:49Z")

</div>

\*\*babaBooey, \*\*  
Your logic is good, but limited. Here’s a hint:

Isn’t 4/14 the probability that the FIRST pc chosen is bad?

---

<div class="post-metadata">

**Author:** ![BabaBooey](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@BabaBooey](https://boards.straightdope.com/u/BabaBooey)\
**Post date:** [February 3, 2006, 10:02pm UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/4 "2006-02-03T22:02:46Z")

</div>

Got it, thanks. Seems like my original way should be close, but the correct answer was over 4X what I got.

---

<div class="post-metadata">

**Author:** ![Cabbage](https://avatars.discourse-cdn.com/v4/letter/c/f07891/32.png) [@Cabbage](https://boards.straightdope.com/u/Cabbage)\
**Post date:** [February 3, 2006, 10:03pm UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/5 "2006-02-03T22:03:29Z")

</div>

To add to what’s been mentioned, what about your three final factors? Each time you pick a good computer, there are still just as many bad computers as there were before…

---

<div class="post-metadata">

**Author:** ![BabaBooey](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@BabaBooey](https://boards.straightdope.com/u/BabaBooey)\
**Post date:** [February 3, 2006, 10:09pm UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/6 "2006-02-03T22:09:13Z")

</div>

Posted before I got your message **Quercus**. As soon as I got the correct answer I divided it by 4 to see if that resulted in exactly what I originally got, but it wasn’t (.47952 vs. .1665). Trying to figure out what else I’m missing out on is giving me a headache, but now I at least I know how to do the problem.

---

<div class="post-metadata">

**Author:** ![borschevsky](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@borschevsky](https://boards.straightdope.com/u/borschevsky)\
**Post date:** [February 3, 2006, 11:00pm UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/7 "2006-02-03T23:00:46Z")

</div>

I usually find it easier to calculate the number of “hits” and number of total possibilities for questions like this, rather than multiplying out the probabilities, like:

Total # of ways to choose: 14 C 4  
Ways to choose exactly one bad one and 3 good ones: 4 C 1 \* 10 C 3

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [February 4, 2006, 4:13am UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/8 "2006-02-04T04:13:41Z")

</div>

To follow up on what **borschevsky** said, his method (which appears to be correct) gives a probability of 480/1001, or 47.952048…%

---

<div class="post-metadata">

**Author:** ![ultrafilter](https://avatars.discourse-cdn.com/v4/letter/u/3d9bf3/32.png) [@ultrafilter](https://boards.straightdope.com/u/ultrafilter)\
**Post date:** [February 4, 2006, 4:15am UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/9 "2006-02-04T04:15:22Z")

</div>

> [@borschevsky](#):
>
> I usually find it easier to calculate the number of “hits” and number of total possibilities for questions like this, rather than multiplying out the probabilities, like:
> 
> Total # of ways to choose: 14 C 4  
> Ways to choose exactly one bad one and 3 good ones: 4 C 1 \* 10 C 3

For those who aren’t familiar with it, this is the hypergeometric distribution that I mentioned earlier.

---

<div class="post-metadata">

**Author:** ![BabaBooey](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@BabaBooey](https://boards.straightdope.com/u/BabaBooey)\
**Post date:** [February 4, 2006, 5:16am UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/10 "2006-02-04T05:16:09Z")

</div>

> [@ultrafilter](#):
>
> For those who aren’t familiar with it, this is the hypergeometric distribution that I mentioned earlier.

Yeah, I saw that as I was reading it, but he described it in a much better way than my book does. I’m sure there’s great uses for in depth/complicated explanations of this kind of thing, but there should be books that describe it like **borschevsky** did. Much easier to learn and probably about 1/5th the size.

---

<div class="post-metadata">

**Author:** ![BabaBooey](https://avatars.discourse-cdn.com/v4/letter/b/dfb087/32.png) [@BabaBooey](https://boards.straightdope.com/u/BabaBooey)\
**Post date:** [February 4, 2006, 5:31am UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/11 "2006-02-04T05:31:02Z")

</div>

OK, one more problem that I didn’t get for HW. It was already due 20 minutes ago, but it bothered me to no end. If skeptical about due date, I can provide the answers in two days for proof, but I’m good peoples so take my word for it. 🙂

An elementary school is offering 3 language classes: one in Spanish, one in French, and one in German. These classes are open to any of the 97 students in the school. There are 34 in the Spanish class, 36 in the French class, and 19 in the German class. There are 12 students that in both Spanish and French, 6 are in both Spanish and German, and 9 are in both French and German. In addition, there are 4 students taking all 3 classes.

If one student is chosen randomly, what is the probability that he or she is taking exactly two language classes?

— OK, so here I figure (12 in S/F + 6 S/G + 9 F/G - 4 in all three) / 97. This is not correct.

If two students are chosen randomly, what is the probability that neither of them is taking Spanish?

— I tried a handful of methods for this one, but just thought of one that may or may not be correct (can’t check now, only can correctness before it’s due and once answers are posted): Figure check the probability that both are in the class: (34/97) \* (33/96) then add probability that just one is in the class. Now I’m a bit buzzed so I’m off on how to do that. It wouldn’t be just 34/97 because that wouldn’t be considering the possiblity that the second is in the class. Would it just be 97 choose 34?

_Sigh_, I have a love hate relationship with this class. It’s nice having a math class that requires thinking as opposed to the first 3 calculus and differential equations, but damn if it isn’t tough.

---

<div class="post-metadata">

**Author:** ![Chronos](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/chronos/32/134_2.png) [@Chronos](https://boards.straightdope.com/u/Chronos)\
**Post date:** [February 4, 2006, 7:48am UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/12 "2006-02-04T07:48:54Z")

</div>

> [@](#):
>
> — OK, so here I figure (12 in S/F + 6 S/G + 9 F/G - 4 in all three) / 97. This is not correct.

It’s important to note precisely what the problem statement says about set membership. Let’s say Mary is one of those teachers’ pets who’s in all three. The statement “Mary is in both French and Spanish” is then true. So Mary is one of those twelve students in both French and Spanish. You should be able to take it the rest of the way from here.

---

<div class="post-metadata">

**Author:** ![nivlac](https://avatars.discourse-cdn.com/v4/letter/n/3bc359/32.png) [@nivlac](https://boards.straightdope.com/u/nivlac)\
**Post date:** [February 4, 2006, 9:46am UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/13 "2006-02-04T09:46:13Z")

</div>

> [@BabaBooey](#):
>
> OK, one more problem that I didn’t get for HW. It was already due 20 minutes ago, but it bothered me to no end. If skeptical about due date, I can provide the answers in two days for proof, but I’m good peoples so take my word for it. 🙂
> 
> An elementary school is offering 3 language classes: one in Spanish, one in French, and one in German. These classes are open to any of the 97 students in the school. There are 34 in the Spanish class, 36 in the French class, and 19 in the German class. There are 12 students that in both Spanish and French, 6 are in both Spanish and German, and 9 are in both French and German. In addition, there are 4 students taking all 3 classes.
> 
> If one student is chosen randomly, what is the probability that he or she is taking exactly two language classes?
> 
> — OK, so here I figure (12 in S/F + 6 S/G + 9 F/G - 4 in all three) / 97. This is not correct.
> 
> If two students are chosen randomly, what is the probability that neither of them is taking Spanish?
> 
> — I tried a handful of methods for this one, but just thought of one that may or may not be correct (can’t check now, only can correctness before it’s due and once answers are posted): Figure check the probability that both are in the class: (34/97) \* (33/96) then add probability that just one is in the class. Now I’m a bit buzzed so I’m off on how to do that. It wouldn’t be just 34/97 because that wouldn’t be considering the possiblity that the second is in the class. Would it just be 97 choose 34?
> 
> _Sigh_, I have a love hate relationship with this class. It’s nice having a math class that requires thinking as opposed to the first 3 calculus and differential equations, but damn if it isn’t tough.

My suggestion is to draw a simple Venn diagram and you’ll easily determine how many students are taking exactly two language classes, as well as the number who are taking Spanish. The desired probabilities easily follow.

---

<div class="post-metadata">

**Author:** ![borschevsky](https://avatars.discourse-cdn.com/v4/letter/b/97f17d/32.png) [@borschevsky](https://boards.straightdope.com/u/borschevsky)\
**Post date:** [February 4, 2006, 7:25pm UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/14 "2006-02-04T19:25:44Z")

</div>

> [@BabaBooey](#):
>
> If two students are chosen randomly, what is the probability that neither of them is taking Spanish?
> 
> — I tried a handful of methods for this one, but just thought of one that may or may not be correct (can’t check now, only can correctness before it’s due and once answers are posted): Figure check the probability that both are in the class: (34/97) \* (33/96) then add probability that just one is in the class.

Probably it’s easier to come at this from the other direction. If there are 34 people in the class, then there are 63 not in the class. So it’s just 63/97 \* 62/96. Your way would work as well, but there would just be more math.

It’s often useful to look at it this way. For example, a common question you’ll get is: you’re playing the lottery, and what is the probability that you’ll pick at least one number right? You could figure: prob. you got 1 right + prob. 2 right + prob. 3 right…, but it’s much easier to figure the probability you got them all wrong, and subtract that from 1.

Or you can do it the same way as I suggested for the previous problem:

Total # of ways to choose 2 students: 97 C 2  
Ways to choose 2 who don’t take Spanish: 63 C 2

If you divide these out, you’ll get the same answer both ways.

---

<div class="post-metadata">

**Author:** ![aahala](https://avatars.discourse-cdn.com/v4/letter/a/a88e4f/32.png) [@aahala](https://boards.straightdope.com/u/aahala)\
**Post date:** [February 4, 2006, 8:15pm UTC](https://boards.straightdope.com/t/need-help-with-probability/342902/15 "2006-02-04T20:15:55Z")

</div>

> [@BabaBooey](#):
>
> There are 12 students that in both Spanish and French, 6 are in both Spanish and German, and 9 are in both French and German. In addition, there are 4 students taking all 3 classes.
> 
> If one student is chosen randomly, what is the probability that he or she is taking exactly two language classes?
> 
> — OK, so here I figure (12 in S/F + 6 S/G + 9 F/G - 4 in all three) / 97. This is not correct.

I think the words “In addition” in the second sentence means the 4 were not being mentioned in the first, so you shouldn’t subtract them.

If you were in law class, the “In addition” could be interpreted as simply additional info and saying there were 12 in both Spanish and French is silient on how many, if any of them were in German. So if Bill Clinton were your teacher, then you might want to subtract these four from each of the three pairings to figure the probability. (12-4+6-4+9-4) /97
