3

An urn contain two balls. It is known that the urn was filled by tossing a fair coin twice and putting a white ball for each head, and putting a black ball for each tail. A ball is drawn from the urn and is found to be white. What is the probability that the other ball in the urn is also white.

My Attempt:- Recently I encountered a similar problem where I applied Bayes Theorem. This question was actually asked in an interview. I was asked to write my answers in board. I tried in this way:-

Let $E_1, E_2,E_3$ be the events that the urn contains (1)two white balls, (2)two black balls and (3)a black and a white ball respectively. All three are mutually exclusive. Now, $$P(E_1)=\frac{1}{2}\times \frac{1}{2}=\frac{1}{4}$$ $$P(E_2)=\frac{1}{2}\times \frac{1}{2}=\frac{1}{4}$$ $$P(E_3)=2\times \frac{1}{2}\times \frac{1}{2}=\frac{1}{2}$$ (I may get white in the first throw and black in the second. Or, black in the first and white in second.)

Let $A$ be the event that a ball is chosen and it is found to be white

$$P(A/E_1)=1$$ $$P(A/E_2)=0$$ $$P(A/E_3)=\frac{1}{2}$$ Now, we need $P(E_1/A)$. By Bayes theorem, $$P(E_1/A)=\frac{\frac{1}{4}\times 1}{\frac{1}{4}\times 1+\frac{1}{4}\times 0+\frac{1}{2}\times \frac{1}{2}}=\frac{1}{2}$$

Am I correct ?

2 Answers2

1

Yes, well, the working is correct, but unecessary.   You have revealed that you understand the math, but hadn't thought about the underlying problem.

"The probability is $1/2$.   Since the results of each coin toss -and therefore the colour of each ball- is independent of that of the other, then knowing the colour of that particular ball -so long as it was drawn from the urn without bias- tells me nothing of the colour of the unrevealed ball; other than that is was selected by the result of an independent fair coin toss."

Graham Kemp
  • 129,094
0

Yes, your reasoning is correct. The denominator in your final calculation wasn't needed however. The first ball selected will be white with probability $\frac{1}{2}$.

$$P(E_1 \mid A)=\frac{P(A \mid E_1)\cdot P(E_1)}{P(A)}=\frac{\frac{1}{4}}{\frac{1}{2}}=\frac{1}{2}$$

An R simulation gives

x = replicate(10^6, sample(0:1,2,repl=T))
x=as.data.frame(x,row.names=c("first","second"))
x=t(x)
x=as.data.frame(x)
attach(x)
x <- x[ which(first==1),]
mean(second==1)

[1] 0.500002
Remy
  • 8,128
  • What about $P({WW}|{WB,BW,WW})= \frac 1 3 ?$ – BruceET Mar 28 '18 at 08:06
  • 1
    In R, x = replicate(10^6, sum(sample(0:1,2,repl=T))); mean(x[x>=1]==2)a returns 0.3334173. // Once you get one white ball, you know it's not an urn with two black ones. // Similar problem: 'You are talking to a girl who says she has exactly one sibling. What is the probability the sibling is also a girl?" – BruceET Mar 28 '18 at 08:27
  • @BruceET You bring up a good point. I think the difference is that your calculation finds the probability of getting $2$ whites given that you got at least one, while we are finding the probability of getting $2$ whites given we just observed one white. The probability of observing a white is different given that you got $WW$ rather than $WB$ or $BW$. I don't know if there is a difference, but I'm trying to work out an R simulation. – Remy Mar 28 '18 at 17:39
  • @BruceET I added an R simulation in my answer. Please let me know what you think and if there is a more efficient way to do what I did. It took some time for me to figure out how to simulate this. – Remy Mar 28 '18 at 18:05
  • Not clear to me how this models the current problem. There is no order of the balls within the urn. You could have BW with twice the probability of BB or WW. But once you see a W, you can eliminate possibility of BB. Independence collapses because you have useful info. // I'm not sure I'm right because of any expertise with combinatorics; rather because this is a classic trick problem when posed in terms of girls and boys in a family, and I've seen it before. – BruceET Mar 28 '18 at 22:16
  • 1
    I'm looking at a problem similar to the one you suggested with the siblings here and you seem to be right. Perhaps someone else can provide insight. – Remy Mar 28 '18 at 22:42