Click here to Skip to main content
15,867,568 members
Articles / Mathematics

Another Probability Problem

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
9 Jun 2013CPOL2 min read 7.5K   1   7
Another probability problem

Introduction

An interesting set of problems was posted on "Math, Math Education, Math Culture" LinkedIn group few weeks ago. I engaged myself in addressing few of them, so I will be posting my solutions in the next few posts. Just to clarify this from the beginning, interesting doesn't necessarily mean difficult. This particular post is dedicated to the probability problem and here is the original LinkedId discussion, if you happen to have a LinkedIn account. Otherwise, continue reading this post. Here is the problem ...

We have n urns, each of these urns contains A white balls and B black balls. We assume a ball from the first urn is randomly picked and then placed into the second urn, then another ball from the second urn is randomly picked and then placed into the third urn, and so on, until a ball from the last urn is finally randomly picked. If this last ball is white, what probability has this fact?

One way to attack the problem is to use total probability (Wikipedia is probably more descriptive on this topic).

Let's define the following two events:

  • Wi - white ball is picked from ith urn
  • Bi - black ball is picked from ith urn

It is worth noting that:

$P\left ( W_{i} \right )+P\left ( B_{i} \right )=1$

Now, applying total probability, we have:

$P\left ( W_{n} \right ) = P\left ( W_{n} | W_{n-1} \right )\cdot P\left ( W_{n-1} \right )+ P\left ( W_{n} | B_{n-1} \right )\cdot P\left ( B_{n-1} \right )$

where:

$P\left ( W_{n} | W_{n-1} \right )=\frac{A+1}{A+B+1}$

translated as "probability to pick a white ball from n-th urn, knowing that a white ball was picked from n-1-th urn".

$P\left ( W_{n} | B_{n-1} \right )=\frac{A}{A+B+1}$

translated as "probability to pick a white ball from n-th urn, knowing that a black ball was picked from n-1-th urn".

Putting all these together, we obtain:

$P\left ( W_{n} \right )= P\left ( W_{n-1} \right )\cdot \frac{1}{A+B+1}+\frac{A}{A+B+1}$

Or, if we note \(k= \frac{1}{A+B+1}\) then:

$P\left ( W_{n} \right )= P\left ( W_{n-1} \right )\cdot k+A\cdot k$

Continuing doing this recursively, we obtain:

$P\left ( W_{n} \right )= P\left ( W_{1} \right )\cdot k^{n-1} + A\cdot \left ( k^{n-1}+k^{n-2}+...+k^{2}+k \right )$

where (because W1 relates to the very first urn):

$P\left ( W_{1} \right )=\frac{A}{A+B}=A\cdot \frac{k}{1-k}$

Finally:

$P\left ( W_{n} \right )=A\cdot \frac{k^{n}}{1-k}+A\cdot \frac{k^{n}-k}{k-1}=\frac{A}{A+B}$

which means, the trick with picking randomly a ball and moving it to the next urn has no effect on the final probability. Interesting, isn't it?

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior) BlackRock
United Kingdom United Kingdom
My name is Ruslan Ciurca. Currently, I am a Software Engineer at BlackRock.

Comments and Discussions

 
QuestionIsn't the solution self evident? Pin
George Swan11-Jun-13 6:36
mveGeorge Swan11-Jun-13 6:36 
AnswerRe: Isn't the solution self evident? Pin
rtybase11-Jun-13 12:59
rtybase11-Jun-13 12:59 
GeneralRe: Isn't the solution self evident? Pin
George Swan11-Jun-13 19:36
mveGeorge Swan11-Jun-13 19:36 
GeneralRe: Isn't the solution self evident? Pin
rtybase11-Jun-13 23:21
rtybase11-Jun-13 23:21 
GeneralMy vote of 5 Pin
Volynsky Alex10-Jun-13 1:34
professionalVolynsky Alex10-Jun-13 1:34 
QuestionOne Pin
dojohansen9-Jun-13 21:35
dojohansen9-Jun-13 21:35 
That's not a vote!

> If this last ball is white, what probability has this fact?

Well, GIVEN that it's white, the answer is 1. That may not be what you mean, but it is what you ask. Smile | :)
AnswerRe: One Pin
rtybase10-Jun-13 7:30
rtybase10-Jun-13 7:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.