Originally Posted by

**ThePerfectHacker** CaptianBlack, what is wrong with what I said? You and me certainly understand that problem differently.

1. The product rule for probabilities applies only when the events

are independent. That is not the case here.

2. That you have the wrong answer can be shown by considering

the following argument:

Given that the ball selected is red then it came from either

urn 1 or urn 2 and so the probability that the ball comes

from urn 1 given it is red plus the probability that it comes

from urn2 given that it is red should be 1. But using your

method this sum is:

3. If I understand your argument you should have had (5/8)(2/5)=2/8=1/4=25%.

4. When in doubt about a probability calculation I usually simulate the

problem. Below is an Euler session (comments in blue, answer in red)

modelling this problem:

(Euler is a freeware matrix numerical analysis language see:

http://mathsrv.ku-eichstaett.de/MGF/...othmann/euler/)

>

>ncase=100000;.. set number of replications

>

>..select urn for each replication

>xurn=random(1,ncase);

>nurn=(xurn<3/8)*1+(xurn>=3/8)*2;

>

>

>..select colour for each replication-using

>..correct prob for each urn; 1-red ball, 0-blue ball

>xcol=(nurn==1)*(random(1,ncase)<(4/5));

>xcol=xcol+(nurn==2)*(random(1,ncase)<(2/5));

>

>..find replications with red ball selected

>idx=nonzeros(xcol==1);

>urn=nurn(idx);

>

>

>..compute proportion of the replications

>..where a red ball selected where the urn

>..was urn 2.

>pp=sum(urn==2)/length(urn)

0.455936

>

RonL