An urn has 6 coupons in it.
- 3 red, 2 blue, 1 green
in order to win a prize I must collect a complete set of all the coupons of a particular colour. So all three reds, two blues or just 1 green constitute a winning set. I continue to draw until I have completed a set but must halt once I do. Coupons are not replaced, I draw one at a time and each coupon has an equal chance of being picked.
Example draws: RRR, RRBR, RG, G, BRRB, RRBG, etc
What is the probability of completing each set?
I already used brute force and found probabilities:
Red = 54/360 ; Green = 96/360 ; Blue = 210/360
The denominator is 6!/2! because I only checked the first 4 draws, the last two are irrelevant.
So my question is: How do I do this using Maths? I'm looking for a general solution that can be applied to larger numbers of coupons and more colours.
Edit: Maybe involves Hypergeometric distribution, unsure how to apply.
You could try to use absorbing Markov chains.
For this example there will be 9 states (the first 6 listed below are transient, the last three are absorbing). We can enumerate the states as follows:
The transition matrix is then
$ P = \begin{bmatrix} 0 & 3/6 & 2/6 & 0 & 0 & 0 & 0 & 0 & 1/6 \\ 0 & 0 & 0 & 2/5 & 2/5 & 0 & 0 & 0 & 1/5 \\ 0 & 0 & 0 & 0 & 3/5 & 0 & 0 & 1/5 & 1/5 \\ 0 & 0 & 0 & 0 & 0 & 2/4 & 1/4 & 0 & 1/4 \\ 0 & 0 & 0 & 0 & 0 & 2/4 & 0 & 1/4 & 1/4 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1/3 & 1/3 & 1/3 \\ 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 & 0 \\ 0 & 0 & 0 & 0 & 0 & 0 & 0 & 0 & 1 \\ \end{bmatrix} $
With the transition matrix in hand you can use the formulas given in the wiki to calculate various different properties of the urn model. Here is a Matlab script which computes the probabilities you are interested in.
In order to generalize this, you would need to find a convenient way to enumerate the states and transition probabilities for an arbitrary number of colors/coupons.