# Math Help - probability problem

1. ## probability problem

A bag contains X quarters and Y dimes. Since quarters are bigger, any given quarter is twice as likely to be picked as any given dime. You pick Z coins without replacement from the bag, and put them in a cup. What is the probability that any given coin in the cup is a quarter?

I'm a programmer with no background in probability, and this problem relates to a programming problem I have, so I would be very grateful for an answer.

2. ## problem on quarter and dymes

total no of coins=x+ylet the pro.to get dyme is pthen pro.to get quarter is 2phere p+2p=1 p=1/3prob. to get a quarter is 2/3 E=event of getting quarterp(E)=(2x/3)/(2x/3+1y/3)as the cup contains z coins the no ways selecting z coins is (x+y)Czthe req.probability is (x+y)Cz(2x/3)/(2x/3+y/3)

3. Your formula is ((x+y)Cz)*(2x)/(2x+y) . Try x=2,y=2,z=2. This gives me a result of 6, which isn't a valid probability.

4. wait for some time it seems i went wrong somewhere

5. Sorry, yes 4, but still the same point.

6. $\frac{4X}{4X+Y}$

That's what I got for the probability of drawing a quarter from the cup. Or:

$\frac{2X}{2X+Y}$

...is the probability of any given coin in the cup being a quarter. Or so I think.

7. {(xCz+x-1Cz-1 yC1+x-2Cz-2 yC2+............y-1Cz-1 xC1)2/3}/x+yCzi hope it may give you the answer
if u take x=2,y=2,z=2then {2C2+1C1.2C1)2/3}/4C2 =1/3

8. Originally Posted by fschmidt
A bag contains X quarters and Y dimes. Since quarters are bigger, any given quarter is twice as likely to be picked as any given dime. You pick Z coins without replacement from the bag, and put them in a cup. What is the probability that any given coin in the cup is a quarter?

I'm a programmer with no background in probability, and this problem relates to a programming problem I have, so I would be very grateful for an answer.
fschmidt,

The probability that a coin chosen at random is a quarter is simple: $\frac{2X}{2X+Y}$.

The value of Z, and the fact that coins are chosen without replacement, are irrelevant.

Experience leads me to believe, however, that we may be solving the wrong problem, because the application of probability theory to the Real World, or to computer programs, is tricky. So why don't you share the programming problem from which your question arises with us, and maybe we can see if we are matching theory to your original problem correctly?

jw

9. Originally Posted by chandrasekhar_mallisetty
{(xCz+x-1Cz-1 yC1+x-2Cz-2 yC2+............y-1Cz-1 xC1)2/3}/x+yCzi hope it may give you the answer
if u take x=2,y=2,z=2then {2C2+1C1.2C1)2/3}/4C2 =1/3
For x=2,y=2,z=2, common sense tells me that the answer should be greater than 1/2.

10. Originally Posted by awkward
fschmidt,

The probability that a coin chosen at random is a quarter is simple: $\frac{2X}{2X+Y}$.

The value of Z, and the fact that coins are chosen without replacement, are irrelevant.
That they are chosen without replacement is relevant because the probabilities for the next coin change depending on the previous coins chosen. Normally this doesn't matter because if the probability of choosing each coin is the same, then the ratio of the coin types will remain about the same. But this isn't the case here.

11. In the case where z=2, I can calculate this as:

(2*prob(quarter quarter) + prob(quarter dime) + prob(dime quarter))/2

(2*(2*x/(2*x+y))*(2*(x-1)/(2*(x-1)+y)) + (2*x/(2*x+y))*(y/(2*(x-1)+y)) + (y/(2*x+y))*(2*x/(2*x+y-1)))/2

(x*(2*y^2+8*x*y-7*y+8*x^2-12*x+4))/((y+2*x-2)*(y+2*x-1)*(y+2*x))

for x=2,y=2,z=2, I get 19/30

The denominator looks promising but the numerator is ugly. Is there a general solution for any z here? I guess I will have to get some probability books to read.

12. Originally Posted by fschmidt
A bag contains X quarters and Y dimes. Since quarters are bigger, any given quarter is twice as likely to be picked as any given dime. You pick Z coins without replacement from the bag, and put them in a cup. What is the probability that any given coin in the cup is a quarter?

I'm a programmer with no background in probability, and this problem relates to a programming problem I have, so I would be very grateful for an answer.
The problem as I see it is to incorporate X, Y and the information that "Since quarters are bigger, any given quarter is twice as likely to be picked as any given dime" into a probability of selecting each type of coin for each pick.

I have no time to give details right now (or even to do the calculation and check if it makes sense), but one approach might be to pretend that at each pick, there are twice as many quarters in the bag as there really are .....

I'll post more on this later.

13. Originally Posted by fschmidt
That they are chosen without replacement is relevant because the probabilities for the next coin change depending on the previous coins chosen. Normally this doesn't matter because if the probability of choosing each coin is the same, then the ratio of the coin types will remain about the same. But this isn't the case here.
fschmidt,

I disagree with you there. True, the probabilities would change if you knew what coins were previously chosen, but you don't. Or if you were interested in the total number of quarters chosen, Z would be relevant-- but that isn't the question which was asked.

To get away from quarters for a moment, suppose you have a bag with 10 red balls and 20 black balls in it. Select a ball at random and put in a cup. What is the probability that it is red? 1/3. Or select all 30 balls and put them in the cup. Then select a ball at random from the cup. What is the probability it is red? 1/3.

Sure you don't want to describe your original problem to us? The fact that we are having this discussion makes me think that you may be interested in more than the simple probabilities.

jw

14. Originally Posted by awkward
fschmidt,

I disagree with you there. True, the probabilities would change if you knew what coins were previously chosen, but you don't. Or if you were interested in the total number of quarters chosen, Z would be relevant-- but that isn't the question which was asked.

To get away from quarters for a moment, suppose you have a bag with 10 red balls and 20 black balls in it. Select a ball at random and put in a cup. What is the probability that it is red? 1/3. Or select all 30 balls and put them in the cup. Then select a ball at random from the cup. What is the probability it is red? 1/3.

Sure you don't want to describe your original problem to us? The fact that we are having this discussion makes me think that you may be interested in more than the simple probabilities.

jw
I think we all have a different interpretation of the question. I support the request for a statement of the original problem.

My feeling is that that the number of coins picked from the bag is relevant though. Eg. Suppose that X = 2 and Y = 4 and TWO coins are picked:

There's a probabality that both are dimes (3/14 according to my calculations). It is therefore certain that a dime will be drawn from the cup.

On the other hand, there's also a probability that both are quarters (1/6 according to my calculations). It is therefore certain that a dime will NOT be drawn from the cup.

On the other hand, there's a probability that a dime and a quarter are picked. (1/3 + 2/7 = 13/21). So you have one of each in the bag. The probability of drawing a dime from the cup is 1/3.

So from two picks of the bag, the probability of getting a dime form the cup is:

(3/14)(1) + (1/6)(0) + (13/21)(1/3) = 53/126.

However, if one coin is picked from the bag, the probability that it's a dime is 1/2. The probability it's a quarter is 1/2.

So the probability of getting a dime form the cup is (1/2)(1) + (1/2)(0) = 1/2.

15. I get almost the same result, but I calculate the expected number of dimes in the cup as:

(3/14)*2 + (1/6)*0 + (13/21)*1 = 22/21

Since there are 2 coins in the cup, the probability that any given coin is a dime is (22/21)/2 = 11/21 and the probability that any given coin is a quarter is (1-11/21) = 10/21.

Page 1 of 2 12 Last