# Homework Help: Probability Urn Problem

1. Nov 28, 2012

### CAF123

1. The problem statement, all variables and given/known data
An urn contains 3 red and 7 black balls. A and B withdraw balls consecutively until a red ball is selected. Find the probability that A selects the red ball. (A draws the first ball.)

3. The attempt at a solution

A selects first => he will win with prob 3/10
B selects second => prob that he gets red is conditional on what colour A took.
P(B got red) = P(B got red| A got red)P(A got red) + P(B got red| A not got red)P(A not red) = (2/9)(3/10) + (3/9)(7/10) = 3/10. This seems nonintuitive - it seems the prob of B getting red is independent of what A took. Can someone explain this?

Where to go from here?

2. Nov 28, 2012

### phinds

If B draws, then A has already drawn. How many balls are left after A draws?

3. Nov 28, 2012

### CAF123

B will have to choose from the remaining 9 balls

4. Nov 28, 2012

### phinds

So why is it that you have a probability for B that is "... out of 10" ?

5. Nov 28, 2012

### Ray Vickson

Explanation: you are neglecting the fact that if A draws a red ball the game stops and B does not get to draw a ball at all.

Your conclusion would be correct if B got to select a ball whether or not A got red; that is, even though B would be drawing from an urn now containing 9 balls, he would still have a 3/10 chance of getting red. To see this, number the balls from 1 to 10. There are 10! permutations altogether; A takes the first ball in line, then B takes the second, etc. The number of permutations in which the first ball is red is the same as in which the second ball is red, so A and B have the same probabilities of choosing red. In fact, this argument applies to any position, so if they continually choose balls without replacement (and don't look at the colors), then, when B chooses the very last ball he still has a 3/10 chance of choosing red! The argument is the same: the number of permutations in which a red ball is last is (3/10)*10! Students are often very surprised when they first see this.

RGV

6. Nov 28, 2012

### CAF123

So this means the probability remains the same indep of what has been chosen before as long as we don't know what balls have been picked out before?

I solved this problem by noting down the combinations in which A would win:
R, BBR, BBBBR,BBBBBBR and I attained the right answer. Is there a more elegant approach? e.g say if the number of balls got very large, my method is inefficient.

Last edited: Nov 28, 2012
7. Nov 28, 2012

### haruspex

Set up a recurrence relation. Define P(r, b) = prob that first player gets the first red, given r red and b black available. Consider the possible outcomes of the first player's draw, and thereby obtain an equation relating P(r, b) to P(r, b-1).

8. Nov 28, 2012

### Ray Vickson

You can generalize and get a formula; then you can worry about the best way to evaluate that formula. If we have R red and B black balls, with N = R+B balls altogether, and if Mr. A starts, then if he wins he does so on an odd-numbered draw. Let Pk = probability that A wins on draw 2k+1 for k = 0,1,2,... . If A wins on draw 2k+1 the first 2k balls must be black and then the next one must be red, so
$$P_k = \frac{B(B-1) \cdots (B-2k+1)}{N(N-1) \cdots (N-2k+1)} \frac{R}{N-2k} = \frac{{B \choose 2k}}{{N \choose 2k}}\frac{R}{N-2k} .$$
Computationally, it might be better to go at it recursilvely:
$$n:= B;\\ d:= B+R;\\ f:=n/d;\\ \text{for } j=1 \text{ to } 2k-1 \text{ do }\\ \mbox{ } n:=n-1;\\ \mbox{ } d:=d-1;\\ \mbox{ } f:=f*n/d;\\ \text{end for};\\ Pk:=f*R/(d-1);$$