# Thread: Probability of colored-balls-selection and expectation values

1. ## Probability of colored-balls-selection and expectation values

John and Ken have each have an urn with $N$ colored balls. They are playing a game in which Player-1 *(see figure below)* will name a color, and Player-2 has to pick a ball from his urn. If he picks the named color ball, he will earn a point (success) and an opportunity to challenge the other.

The winner will be decided after the following three steps. The game will always reset other to step 1. Let's play the game now **(Note that this game is played with a replacement of balls)**.

**Step 1.** John calls GREEN, and Ken picks the GREEN with probability $P_1$, so now Ken gets to call the color. (Ken earns 1 point) (else reset)
**Step 2.** Ken calls BLUE, and John picks the color BLUE probability $P_2$, now John gets to call the color: (John earns 1 point) (else reset)
**Step 3.** John again calls a color (e.g. RED), and Ken picks up the RED ball, with probability $P_3$ (Ken earns 10 points and the game ends).

**Total points earned:**
John = 1
Ken = 11

What is the probability of Ken winning?

My initial work:

$P(Ken\ earn\ 11\ points) = P(Ken\ wins) = P_{kw}$
$P_{kw}= P(John\ call\ and \ loose). P(Ken\ call\ and \ loose). P(John\ call\ and \ loose)$

$P(John\ call\ and \ loose) = P_{JL} = \frac{1}{N}$
$P(Ken\ call\ and \ loose) = P_{KL} = \frac{1}{N}$
Now the probability that first step is taken by John is $P_x = 1/2$. So the actual probability of Ken winning would be $P_{k} = P_x.P_{kw} \, .$

$P_k = P_x(P_{JL}.P_{KL}.P_{JL})$
$P_k = \frac{1}{2N^3}$

Is it correct?

Second, what would be the expected number of times we have to play this game to decide a winner?
Third, how many failures can we expect? By failure I mean if we reset during step 1 or step 2?

2. ## Re: Probability of colored-balls-selection and expectation values

Needs more information. You seem to think the first player changes from round to round where the first player is random. The picture shows that John is always Player 1, Ken always Player 2. Nothing says the game is fair.
Next, nothing is mentioned about the score from previous rounds. Does it remain from round to round?

If the first player remains from round to round, then it does not matter if the score resets, there is 100% chance Ken will win. Reasoning: if the score resets every round, the game ends with Ken having 11 points and John having 1. If the score does not reset, John can only get a point if Ken gets one first. This means prior to the final step, John's best case scenario will be tied with Ken. Then Ken wins by getting 10 more points.

If the First Player changes, the problem becomes more difficult, and I will need to think more about it. (And i will need to know the rules for how and why it changes. If it is random or if it swaps between the two)

3. ## Re: Probability of colored-balls-selection and expectation values

Every thing is reseted once after (either) $step_1 \times step_2 = 0$
Secondly, at the start of each game (or after reset). Each player has the opportunity to take first turn with probability $\frac{1}{2}$

For further information, all the events are completely independent and completely memoryless.
The scores are also reseted once the game is reset.

Hope this makes it clear !!!

4. ## Re: Probability of colored-balls-selection and expectation values

There are N colored balls. Are they all distinct? Can a player call out a color not represented by the colors in the bowl? Do the players know what colors are in their opponents bowls? Do they get to see what they are picking or is it random? Do they know the number of each color in the bowl so that they can choose the least common color ball every pick? Are they rational actors, bound by a set of rules or is every turn completely random?

5. ## Re: Probability of colored-balls-selection and expectation values Originally Posted by SlipEternal There are N colored balls. Are they all distinct? Can a player call out a color not represented by the colors in the bowl? Do the players know what colors are in their opponents bowls? Do they get to see what they are picking or is it random? Do they know the number of each color in the bowl so that they can choose the least common color ball every pick? Are they rational actors, bound by a set of rules or is every turn completely random?
1. All N colors are distinct
2. Players can only call out of N balls, nothing else
3. Every thing is random, i.e. the players call the color name out of his own will, similarly the one who picks, pick ball blindly and randomly
4. Nops... Each color exist only one in the N-color set
5. Every turn is completely random.

Thanks for giving time to this question.

6. ## Re: Probability of colored-balls-selection and expectation values

Ok, that makes it a little easier. A given round will yield a winner $\dfrac{1}{N^3}$ times. This is because regardless of what color is chosen since each ball is a distinct color (contrary to the picture that shows many balls are the same color), there is a $\dfrac{1}{N}$ chance that the person selects that color. Each step has the same probability. So, the probability that Ken will win a single round is $\dfrac{1}{2N^3}$. If they keep playing until someone wins, then the probability that someone will eventually win will be 1. The winning round, there is a 50/50 chance that it will be Ken or John, so there is, overall, a 50% chance that Ken will win.

Now, the probability that the game will end on a single round is $\dfrac{1}{N^3}$. So, the probability that it will not end is $1-\dfrac{1}{N^3}$. The expected value of the number of games required to yield a winner is

$\displaystyle E(\text{num rounds}) = 1\cdot \dfrac{1}{N^3} + 2\cdot \left(1-\dfrac{1}{N^3}\right) \dfrac{1}{N^3} + 3 \cdot \left(1-\dfrac{1}{N^3}\right)^2\dfrac{1}{N^3} + \cdots = \sum_{k\ge 1} k\left( 1-\dfrac{1}{N^3}\right)^{k-1}\dfrac{1}{N^3}$

Now, we can pull the $\dfrac{1}{N^3}$ from the sum:

$\displaystyle E(\text{num rounds}) = \dfrac{1}{N^3}\sum_{k\ge 1} k\left(1-\dfrac{1}{N^3}\right)^{k-1}$

Consider the following geometric sum::

$\displaystyle \sum_{k\ge 0} \left(1-\dfrac{1}{N^3}\right)^k = \dfrac{1}{1-\left(1-\dfrac{1}{N^3}\right)} = N^3$

The term-by-term derivative of the left hand side with respect to $N$ and the regular derivative with respect to $N$ on the RHS yields the following equality:

$\displaystyle 3N^{-4}\sum_{k\ge 1} k\left(1-\dfrac{1}{N^3}\right)^{k-1} = 3N^2$

So

$\displaystyle \sum_{k\ge 1}k\left(1-\dfrac{1}{N^3}\right)^{k-1} = N^6$

Plugging in, we get:

$E(\text{num rounds}) = \dfrac{N^6}{N^3} = N^3$

That gives us the expected number of rounds before the game yields a winner.

I have to get back to work, but you can consider the number of rounds of failures in the first or second steps.

7. ## Re: Probability of colored-balls-selection and expectation values

Oh, I did not take into account what happens if you reach step 3, but the player picks incorrectly. Does the game still end? I assumed it "reset" like if they did not grab the correct color in steps one or two.

8. ## Re: Probability of colored-balls-selection and expectation values

Thanks, Thanks Thanks.... Made my problem easy. I really appreciate your time and input.

Just to mention, there is slight slip you have made. i.e. The probability of winning the game in the very first iteration by Ken is $\frac{1}{2N^3}$, keeping in view the fact that the probability that the game would be start by John first!
Similarly, the probability of Ken winning in the second round would be: $\Big( 1 - \frac{1}{2N^3}\Big) \frac{1}{2N^3}$ ... so on and so forth

Otherwise, rest is very helpful to me...

One quick question. If we have, for example, $Q$ players, (so the contestants against Ken would be $Q-1$)

The winning probability would get down to $\frac{1}{QN^3}$ ?? and the rest remains similar?

btw many thanks again.

9. ## Re: Probability of colored-balls-selection and expectation values

I think that this is the most poorly written question I have ever seen.
Why not have just one bowl? Have it contain $N_1$ balls of colour $C_1$, $N_2$ balls of colour $C_2$ and $N_3$ balls of colour $C_3$. (of course have as many colours as you want.) Player Keith calls out a colour. Player James randomly draws out a ball. If it matches the called colour then J gets a point, be returns the ball and K calls a colour again. Otherwise, he returns the ball to the bowl and now James call out a colour. The game proceeds.

It seems to me the game is well defined. It is clearly a drawing with replacement. That means the probabilities remain constant. You may set an end, say the first player to reach a score of ten. I suggest that the two players flip a coin to see who calls first.

10. ## Re: Probability of colored-balls-selection and expectation values Originally Posted by Plato I think that this is the most poorly written question I have ever seen.
Why not have just one bowl? Have it contain $N_1$ balls of colour $C_1$, $N_2$ balls of colour $C_2$ and $N_3$ balls of colour $C_3$. (of course have as many colours as you want.) Player Keith calls out a colour. Player James randomly draws out a ball. If it matches the called colour then J gets a point, be returns the ball and K calls a colour again. Otherwise, he returns the ball to the bowl and now James call out a colour. The game proceeds.

It seems to me the game is well defined. It is clearly a drawing with replacement. That means the probabilities remain constant. You may set an end, say the first player to reach a score of ten. I suggest that the two players flip a coin to see who calls first.
Thanks for the comments Plato. Though it is poorly written question, but it took me a lot of time to map my actual problem into this question. But you have done well to summarize it further. Thanks

11. ## Re: Probability of colored-balls-selection and expectation values Originally Posted by sjaffry Thanks, Thanks Thanks.... Made my problem easy. I really appreciate your time and input.

Just to mention, there is slight slip you have made. i.e. The probability of winning the game in the very first iteration by Ken is $\frac{1}{2N^3}$, keeping in view the fact that the probability that the game would be start by John first!
Similarly, the probability of Ken winning in the second round would be: $\Big( 1 - \frac{1}{2N^3}\Big) \frac{1}{2N^3}$ ... so on and so forth
Not quite. The second part doesn't ask for the expected number of rounds until Ken wins. It asks for the expected number of rounds until someone wins. The expected value I gave is correct.

Now, if you want to find the probability overall that Ken wins (after any number of rounds), that will be:

$\displaystyle \dfrac{1}{2N^3}+\left(1-\dfrac{1}{N^3}\right)\dfrac{1}{2N^3}+\cdots$

Note that the term $\left(1-\dfrac{1}{N^3}\right)$ term. Because what you wrote $\left(1-\dfrac{1}{2N^3}\right)$ allows for John to win the first round (ending the game).

Now, the probability that Ken will eventually win:

$\displaystyle \dfrac\sum_{k\ge 0}\left(1-\dfrac{1}{N^3}\right)^k}{2N^3}=\dfrac{N^3}{2N^3} = \dfrac{1}{2}$

For Q players, what are the rules? How do you decide to whom play goes? Are the players numbered every round? Is the order random? Are there still only 3 steps? Many questions here.

#### Search Tags

probability, urn or ball 