# Math Help - Probability with a "known"

1. ## Probability with a "known"

A box contains 4 red apples, 4 green apples and 8 peaches.
3 are picked at random.
It is known that at least 1 of the 3 is an apple.
What is probability that at least 2 are red apples?

2. ## Re: Probability with a "known"

Hey Wilmer.

This is a conditional probability. (Hint: P(A|B) = P(A and B)/P(B)).

3. ## Re: Probability with a "known"

Thanks Chiro.
I'm trying to re-learn (completely forgot!) conditional probability.
OK:
16^3 = 4096

At least 1 (of the 3 picked) is an apple: 3584
At least 2 (of the 3 picked) are red apples: 640

P(A and B) = 3584/4096 + 640/4096 ? That's sure not correct...
Where am I goofing?

4. ## Re: Probability with a "known"

Couple of things:

1. You are assuming that the 3 items are picked with replacement, meaning that after you pick a fruit you put it back in the bin and then select another. This makes each selection independent of the others. But I intepret the problem to mean that the fruit is selected without replacement, so the bin ends up with 13 fruits in it. In this case there are 16*15*14 = 3360 possible combinations of selections.

2. In chiro's post event A is "selection of at least 2 red apples" and event B is "selection of at least 1 red apple" So P(A and B) is the probability of selecting at least 2 red apples and at least 1 red apple, which is the same as simply the probability of selecting at least 2 red apples.

P(at least 2) = P(2) + P(3)
P(2) = (4/16) x (3/15) x (12/14) x C(3,1), where C(3,1) is the combination of one item out of 3.
P(3) = (4/16) x (3/15) x (2/14)

P(at least one red apple) = P(1)+P(2)+P(3). You already have values for P(2) and P(3), so now you just need to determine P(1). Then you can apply P(A|B) = P(A and B)/P(B). Can you finish it from here?

3. If the fruits are replaced after each selection then the number of ways to get 3 reds is 4^3 = 64. not 640, and the number of ways to get 2 reds is 4^2x12x3 = 576. So the probability of selecting at least two reds is (64+576)/4096.

5. ## Re: Probability with a "known"

Thanks for replying, Mr. Baines.
Originally Posted by ebaines
> 1. You are assuming that the 3 items are picked with replacement,

YUK...my face just turned red! Without replacement, of course...

> 2. In chiro's post event A is "selection of at least 2 red apples" and event B is "selection of at least 1 red apple"

event A ok but not event B: should be "selection of at least 1 apple" (red or green)

I'd appreciate a full solution (which you just about gave me anyhow)!
Easier for me to "learn" that way.
Btw, this is not homework (I'm 72!), but a re-learning process.

6. ## Re: Probability with a "known"

In ebaines post, he writes P(1), P(2), P(3), but doesn't explain what those are. By P(1), he means the probability of picking exactly one red apple. P(2) would be the probability of picking exactly two red apples. P(3) is the probability of picking exactly three red apples. And he did not mention it, but we should add P(0) is the probability of picking exactly 0 red apples.

So, why are we discussing P(0), P(1), P(2), and P(3)? It is because these are probabilities of "disjoint" events. That means that if you pick exactly zero apples, it is not possible that you also picked exactly one apple. The events do not overlap. No matter what three fruit you pick, the outcome will be in exactly one of the four events. These are also called "mutually exclusive" events. So, their probabilities are additive. If you want the probability of picking zero or two apples, it would be P(0) + P(2). If you want the probability of picking at least 2 apples, like ebaines said, that would be P(2) + P(3). Lastly, if you pick three fruits, there is 100% chance that you picked three fruits. So, the sum of the four probabilities must equal 1. In other words, P(0)+P(1)+P(2)+P(3) = 1.

7. ## Re: Probability with a "known"

Originally Posted by Wilmer
Thanks for replying, Mr. Baines.

I'd appreciate a full solution (which you just about gave me anyhow)!
Well, the probability of at least 1 red apple would be P(at least 1) = P(1) + P(2) + P(3), as ebaines said.

Since P(0)+P(1)+P(2)+P(3) = 1, we have P(0) + P(at least 1) = 1, so P(at least 1) = 1-P(0).

Let's calculate P(0). That means that you do not pick any red apples. So, for your first pick, you have 12/16 fruits to choose. The second pick, you have 11/15, and the third, you have 10/14. So, $P(0) = \dfrac{12\cdot 11\cdot 10}{16\cdot 15\cdot 14}$ and $P\left(\text{at least }1\right) = 1-\dfrac{12\cdot 11\cdot 10}{16\cdot 15\cdot 14} = \dfrac{17}{28}$

Next, another way to calculate the probability of at least 2 red apples is to take the probability of at least 1 red apple and subtract the probability of exactly 1 red apple. Let's look at the outcomes that yield exactly 1 red apple:

We can choose a red apple, then two fruit that are not red apples.
We can choose a fruit that is not a red apple, then a red apple, then a fruit that is not a red apple.
We can choose two fruit that are not red apples, then a red apple.

These are disjoint outcomes. It is not possible that your first choice is simultaneously a red apple and not a red apple. But, if you wind up with one red apple, it had to be one of your three choices. So, the sum of the three probabilities must equal the probability of picking exactly one red apple (again, we can only add probabilities if they are disjoint, and we only know they add up to the whole probability if they cover every possible outcome).

So, the probability for picking red, non-red, non-red:
$\dfrac{4}{16}\dfrac{12}{15}\dfrac{11}{14}$

The probability for picking non-red, red, non-red:
$\dfrac{12}{16}\dfrac{4}{15}\dfrac{11}{14}$

The probability for picking non-red, non-red, red:
$\dfrac{12}{16}\dfrac{11}{15}\dfrac{4}{14}$

Then, the probability for picking exactly 1 red apple:
\begin{align*}\dfrac{4}{16} \dfrac{12}{15} \dfrac{11}{14}+\dfrac{12}{16} \dfrac{4}{15} \dfrac{11}{14}+\dfrac{12}{16} \dfrac{11}{15} \dfrac{4}{14} & = \dfrac{4\cdot 12\cdot 11 + 12\cdot 4\cdot 11 + 12\cdot 11\cdot 4}{16\cdot 15\cdot 14}\\ & = 3\dfrac{4\cdot 12\cdot 11}{16\cdot 15\cdot 14} \\ & = \dfrac{33}{70}\end{align*}

The 3 you see before the fraction on the middle row is the same as C(3,1) that ebaines used. It means we want one red apple, but we don't care which specific pick of the three got it. There are three picks to choose from where we wind up with the red apple, so there are three times the number of ways of getting the red apple on the first pick, then no more red apples.

This means, the probability of at least 2 red apples would be
$P\left(\text{at least }2\right) = P(2)+P(3) = P\left(\text{at least }1\right) - P(1) = \dfrac{17}{28}-\dfrac{33}{70} = \dfrac{19}{140}$

So, the conditional probability would be:
$\dfrac{P\left(\text{at least }2\right)}{P\left(\text{at least }1\right)} = \dfrac{\left(\dfrac{19}{140}\right)}{\left(\dfrac{ 17}{28}\right)} = \dfrac{19}{85}$

8. ## Re: Probability with a "known"

Thanks, Slip....
Originally Posted by SlipEternal
Well, the probability of at least 1 red apple would be P(at least 1).......
Once more: it's not the probability of "at least 1 red apple",
but the probability of "at least 1 apple" (red or green); ********************
here's my initial post:
A box contains 4 red apples, 4 green apples and 8 peaches.
3 are picked at random.
It is known that at least 1 of the 3 is an apple. ********************
What is probability that at least 2 are red apples?

9. ## Re: Probability with a "known"

Originally Posted by Wilmer
Thanks, Slip....

Once more: it's not the probability of "at least 1 red apple",
but the probability of "at least 1 apple" (red or green); ********************
here's my initial post:
A box contains 4 red apples, 4 green apples and 8 peaches.
3 are picked at random.
It is known that at least 1 of the 3 is an apple. ********************
What is probability that at least 2 are red apples?
I see. Sorry about that.

Ok, so again, if at least two of the chosen fruit are red apples, then you are guaranteed that at least one of the chosen fruit is an apple (red or green), so $P(A\text{ and }B)$ is still $P\left(\text{at least }2\text{ are red apples}\right) = \dfrac{19}{140}$ as we calculated before.

Now, we just need the probability that at least one of the chosen fruit is an apple. What are the possible outcomes? We can pick so that we wind up with exactly 0, 1, 2, or 3 apples (red or green). It is not possible that we wind up with exactly 0 apples and exactly 1 apple simultaneously, so these are disjoint events. Also, if we pick three fruits, the only possible outcomes are exactly 0, 1, 2, or 3 apples, so the sum of the probabilities of each disjoint event must equal 1. The probability of picking at least one apple is:

$1 - P\left(\text{only picked peaches}\right) = 1 - \dfrac{8}{16}\cdot \dfrac{7}{15}\cdot \dfrac{6}{14} = \dfrac{9}{10}$.

So, again, to find the conditional probability by dividing the two:

$P(A\text{ if we know }B) = \dfrac{P(A\text{ and }B)}{P(B)} = \dfrac{\left(\dfrac{19}{140}\right)}{\left(\dfrac{ 9}{10}\right)} = \dfrac{19}{126}$

10. ## Re: Probability with a "known"

Originally Posted by SlipEternal
I $P(A\text{ if we know }B) = \dfrac{P(A\text{ and }B)}{P(B)} = \dfrac{\left(\dfrac{19}{140}\right)}{\left(\dfrac{ 9}{10}\right)} = \dfrac{19}{126}$

Was confused, as I couldn't get close to that from simulation program I wrote;
then I realised that if there is no apples (red or green) picked, then this "attempt"
is skipped and a new attempt made; see line 130:

100 1-4 = red apples, 5-8 = green apples, 9-16 = peaches
110 Do 1000000 times
120 Pick at random (from 1 to 16), no replacement, a b and c
130 If a>8 and b>8 and c>8 then goto 120
140 If at least 2 of a,b,c are < 5 then t = t + 1
150 End loop
160 Print t
Ran it 5 times; t = 150870, 151364, 150930, 150,747 and 150562
And 19/126 = ~150794
So all's fine! Thanks again.

11. ## Re: Probability with a "known"

Slip, what do you get if we change problem slightly to:

A box contains 8 red apples, 8 green apples and 16 peaches.
5 fruits are picked at random.
It is known that at least 1 of the 5 is an apple (red or green).
What is probability that at least 2 are red apples?

Trying to simulate...thanks.

12. ## Re: Probability with a "known"

You can use the same technique as before:

P(At least 2 red | at least 1 red or green) = P( at least 2 red AND at least 1 red or green)/P(at least one red or green).

As before, the numerator can be simplified to P(at least 2 red), since if there are 2 red then you know that there is at least 1 red or green.

P(at least 2 red) = P(2 red) + P(3 red)+P(4 red) + P(5 red). Note that it also equals 1 - (P(0 red)+P(1 red)). We'll use the latter form as it's less work:
P(0 red) = Permut(24,5)/Permut(32,5), where "Permut(A,B)" means the permutation of A things B at a time:

$P(0\ red)= \frac {24 \times 23 \times 22 \times 21 \times 20}{32 \times 31 \times 30 \times 29 \times 28} = 0.211$

P(1 red) = Permut(24,5)xPermut(8,1)/Permut(32,5) x C(5,1):

$P(1\ red)= \frac {24 \times 23 \times 22 \times 21 \times 8} {32 \times 31 \times 30 \times 29 \times 28} \times 5 = 0.422$

Therefore
$P(at\ least\ 2\ red) = 1 - 0.211-0.422 = 0.367$

Now for the denominator: P(at least 1 red or green) = 1 - P( no red or green)

$1 - P(no\ red\ or\ green) = 1-\frac {16 \times 15 \times 14 \times 13 \times 12}{32 \times 31 \times 30 \times 29 \times 28} = 0.978$

So - the probability that there are at least 2 red apples given that there is at least 1 red or green apple is:

$\frac {0.367}{0.978} = 0.375.$

13. ## Re: Probability with a "known"

Another way to do this is with combinations (since you don't care about the order that you pick the fruit). You will get the same answer either way. With combinations, you can just divide the number of outcomes. So, if we figure out the number of outcomes with (at least two red AND at least one red or green) divided by the number of outcomes with at least one apple (red or green), that will give us the same probability.

Just as ebaines did, we want the number of outcomes with exactly 0 red and exactly 1 red, then take the compliment (total number of outcomes minus outcomes that give us only 0 or 1 red). For exactly 0 red, that is $\binom{24}{5}$ outcomes.
For exactly 1 red, that is $\binom{24}{4}\binom{8}{1}$ outcomes (note: since we are doing combinations, we don't care which of the apples is red). So, there are $\binom{32}{5} - \binom{24}{5} - \binom{24}{4}\binom{8}{1}$ outcomes with at least 2 red.

For at least one apple (red or green), we want the number of outcomes with 0 apples and take the compliment: $\binom{32}{5} - \binom{16}{5}$.

So, the probability that you get at least 2 red apples given that you pick at least one apple (red or green):

$\dfrac{\binom{32}{5} - \binom{24}{5} - \binom{24}{4}\binom{8}{1}}{\binom{32}{5} - \binom{16}{5}} = \dfrac{73,864}{197,008} = \dfrac{1319}{3518} \approx 0.375$

14. ## Re: Probability with a "known"

Thank you very much Slip and Mr.Baines; confirmed my simulation; 5 runs @ 1 million each:
1: 374,846
2: 375,431
3: 375,019
4: 374,897
5: 374,961
...and 1319/3518 = ~374,929

More important is the help you've both given me in "remembering" this probability style,
by showing the steps...thanks again.
I'll recommend you both for a raise