Probability-Bayes theorem

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Probability-Bayes theorem

kangkan
From a bag containing n balls,all either black or white,all numbers for each being equally likely,a ball is drawn and turns out to be white.this is replaced an another ball is drawn ,which is also white.If the ball is replaced prove that chance of drawing black ball in next try is 1/2 *(n-1)* [ (2n+1)^-1]

Thanks
Reply | Threaded
Open this post in threaded view
|

Re: Probability-Bayes theorem

Amit Goyal
Administrator
From a bag containing n balls, all either black or white, all numbers for each being equally likely, a ball is drawn and turns out to be white. This is replaced and another ball is drawn, which is also white. If the ball is replaced prove that chance of drawing black ball in next try is 1/2 *(n-1)* [ (2n+1)^-1] .

Let W(j) be the event that ball in the jth draw is white. And B(j) be the event that ball in the jth draw is black. So, if A' denote the complement of event A, it is clear that B(j) = W(j)'.
Also let A(k) be the event that bag has k white balls. Clearly, Pr(A(k)) = 1/(n+1) for all k in {0, 1, 2, ..., n}

We need to find
Pr(B(3)|W(1), W(2)) = Pr(B(3), W(1), W(2))/Pr(W(1), W(2))

Let us first evaluate the numerator:
Pr(B(3), W(1), W(2))
=  Pr(B(3), W(1), W(2), A(0))  + Pr(B(3), W(1), W(2), A(1)) + ....  +  Pr(B(3), W(1), W(2), A(n))
Clearly,
Pr(B(3), W(1), W(2), A(0)) = 0
and
Pr(B(3), W(1), W(2), A(n)) = 0
For k in {1, 2, ... , n -1},
Pr(B(3), W(1), W(2), A(k))
= Pr(A(k)) x Pr(W(1)|A(k)) x Pr(W(2)|W(1), A(k)) x Pr(B(3)|W(1), W(2), A(k))
= (1/(n+1)) x (k/n) x (k/n) x ((n-k)/n)
So,
Pr(B(3), W(1), W(2)) = Σ (1/(n+1)) x (k/n) x (k/n) x ((n-k)/n)


Let us now evaluate the denominator:
Pr(W(1), W(2))
=  Pr(W(1), W(2), A(0))  + Pr(W(1), W(2), A(1)) + ....  +  Pr(W(1), W(2), A(n))
Clearly,
Pr(W(1), W(2), A(0)) = 0

For k in {1, 2, ... , n},
Pr(W(1), W(2), A(k))
= Pr(A(k)) x Pr(W(1)|A(k)) x Pr(W(2)|W(1), A(k))
= (1/(n+1)) x (k/n) x (k/n)
So,
Pr(W(1), W(2)) = Σ (1/(n+1)) x (k/n) x (k/n)

Thus,
Pr(B(3)|W(1), W(2))
= [Σ (1/(n+1)) x (k/n) x (k/n) x ((n-k)/n)]/[Σ (1/(n+1)) x (k/n) x (k/n)]
= [Σk^2(n-k)]/[nΣk^2]
= 1 - [Σk^3]/[nΣk^2]

Applying Σk^3 = [n(n+1)/2]^2
and [Σk^2] = [n(n+1)(2n+1)]/6
to above we get
Pr(B(3)|W(1), W(2))
= 1 - [Σk^3]/[n Σk^2]
= 1 - 6(n+1)/[4(2n+1)]
= 1 - 3(n+1)/[2(2n+1)]
= (n-1)/[2(2n+1)]
Reply | Threaded
Open this post in threaded view
|

Re: Probability-Bayes theorem

kangkan
Thhanks Amit :)