# Math Help - Help with probability and counting problems

1. ## Help with probability and counting problems

1) A parking lot contains 100 cars that all look quite nice from the outside. However K of these cars happen to be lemons. The number K is shown to lie in the range {0,1,...,9}, with all values equally likely.
a) We test-drive 20 distinct cars chosen at random and to our pleasant surprise, none of them turns out to be a lemon. Given this knowledge, what is the probability that K=0?
b) Repeat part (a) when the 20 cars are again chosen at random, but now with replacement; that is, at each test-drive each car is equally likely to be selected, irrespective of whether it was previously selected.

2) A sweet factory has an endless supply of red, orange, yellow, green, blue and violet jelly beans. The factory packages the jelly beans into jars of 100 jelly beans each. One possible colour distribution, for example, is a jar of 58 red, 22 yellow and 20 green jelly beans. As a marketing gimmick, the factory guarantees that no two jars have the same colour distribution. What is the max. number of jars that the factory can produce whilst meeting this guarantee?

Thanks in advance for any help or insight you can provide!! Anything helps!

2. Originally Posted by argr78
1) A parking lot contains 100 cars that all look quite nice from the outside. However K of these cars happen to be lemons. The number K is shown to lie in the range {0,1,...,9}, with all values equally likely.
a) We test-drive 20 distinct cars chosen at random and to our pleasant surprise, none of them turns out to be a lemon. Given this knowledge, what is the probability that K=0?
b) Repeat part (a) when the 20 cars are again chosen at random, but now with replacement; that is, at each test-drive each car is equally likely to be selected, irrespective of whether it was previously selected.

See here

RonL

3. Thanks.

In the following equation: p(20 OK)= sum[p(20 OK|k=r), r=0 to 9], I am getting these values:

p(20 OK|k=0) = 1
+
p(20 OK|k=1) = 80 / 100 = 0.80
+
p(20 OK|k=2) = 80*79 / 100*99 = 0.6384
+
p(20 OK|k=3) = 80*79*78 / 100*99*98 = 0.5081
+
...
+
p(20 OK|k=9) = 80*79*78*...*72 / 100*99*98*...*92 = 0.1219

Is this the correct way to do it, or is there a shortcut? Also, I will need to multiply each term by p(k=r) = 0.10, otherwise the sum is larger than 1?

4. Originally Posted by argr78
Also, I will need to multiply each term by p(k=r) = 0.10, otherwise the sum is larger than 1?
Yes, I must have missed that when I typed the thing originaly, I've now added the correction

RonL

5. Originally Posted by argr78
Thanks.

In the following equation: p(20 OK)= sum[p(20 OK|k=r), r=0 to 9], I am getting these values:

p(20 OK|k=0) = 1
+
p(20 OK|k=1) = 80 / 100 = 0.80
+
p(20 OK|k=2) = 80*79 / 100*99 = 0.6384
+
p(20 OK|k=3) = 80*79*78 / 100*99*98 = 0.5081
+
...
+
p(20 OK|k=9) = 80*79*78*...*72 / 100*99*98*...*92 = 0.1219

Is this the correct way to do it, or is there a shortcut? Also, I will need to multiply each term by p(k=r) = 0.10, otherwise the sum is larger than 1?

p(20 OK|k=0) = 1

p(20 OK|k)= (100-k)/(100) x (100-k-1)/(100-1) x ... x (100-k-19)/(100-19)

............. = (100-k)!/(100-k-20)! x (100-20)!/100!

6. ## Office Hours

argr- you should have gone to seen Alex in office hours today, we went over it like 6 times. See you in class.

-anyt

7. 2) A sweet factory has an endless supply of red, orange, yellow, green, blue and violet jelly beans. The factory packages the jelly beans into jars of 100 jelly beans each. One possible colour distribution, for example, is a jar of 58 red, 22 yellow and 20 green jelly beans. As a marketing gimmick, the factory guarantees that no two jars have the same colour distribution. What is the max. number of jars that the factory can produce whilst meeting this guarantee?

As a trivial example, we shall deal with 5 jelly beans with 2 different colours (Red and Blue).
We can arrange them in the following ways: (x=bean, |=partition stick)

|xxxxx ( 0 red, 5 blue)
x|xxxx (1 red, 4 blue)
xx|xxx (2 red, 3 blue)
xxx|xx (3 red, 3 blue)
xxxx|x (4 red, 1 blue)
xxxxx| (5 red, 0 blue)

total of 6 ways to partition the 5 jelly beans into the 2 different colours.
To generalise, since there are 5 jelly beans plus 1 stick, there are 6! ways to arrange them. But as the 5 jelly beans and 1 partition are indistinguishable, we divide 6! by 5! to arrive at 6!/5!1! = 6

Now, we deal with 100 jelly beans and 6 groups of colours.
Line them all up in a row, together with 5 partition sticks.
There are 105! ways to arrange them. As the jelly beans and the 5 partition sticks are indistinguishable, we have 105!/(100!5!) = 96.56 million

8. Originally Posted by argr78
2) A sweet factory has an endless supply of red, orange, yellow, green, blue and violet jelly beans. The factory packages the jelly beans into jars of 100 jelly beans each. One possible colour distribution, for example, is a jar of 58 red, 22 yellow and 20 green jelly beans. As a marketing gimmick, the factory guarantees that no two jars have the same colour distribution. What is the max. number of jars that the factory can produce whilst meeting this guarantee?
The answer to that question is the same as knowing the number of non-negative integer solutions to this equation: $R + O + Y + G + B + V = 100$.
The number of ways to put N identical objects into K different cells is ${{N+K-1} \choose N}$ In this case, N=100 and K=6.

9. Hi Plato (or anybody who can help),

can you explain the formula

N+K-1 Choose N

with respect to the following model, as described by a textbook:

n indistinguishable jelly beans are randomly placed, into one of R distinguishable urns. (The question would have 6 urns each labelled with a different color code).

But I cannot understand how the formula
N+K-1 Choose N

could be derived from this point of view, as opposed to the partition stick model I gave earlier.