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.