header
Show Answer
Math and science::INF ML AI

The urns

Problem statement

There are 11 urns labeled by u{0,1,2,...10}, each containing ten balls. Urn u contains u black balls and 10u white balls. Fred selects an urn u uniformly at random and draws N times with replacement from that urn, obtaining nB blacks and NnB whites. Fred's friend, Bill, looks on. If after N=10 draws nB=3 blacks have been drawn, what is the probability that the urn Fred is using is urn u from Bill's point of view?

Solution

Firstly, we know how to express the probability distribution of the number of blacks given the urn and the total ball count:

P(nB|u,N)=(NnB)funB(1fu)NnB(1)

Where we define [ fu:=? ].

Adding the u dimension creates the joint probability distribution of the random variables u and nb, P(u,nB|N). It can be written as:

[ P(u,nB|N)=P(?)P(u) ]

Notices how P(u) appears, the probability that Fred selects a given urn, which is uniform at 111 as per the question.

From here, we need Bayes Theorem, which is:

[ P(A|B)=P(A,B)P(B)=?P(B) ]

From the joint probability of u and nB we can obtain the conditional distribution of u given nB using Bayes Theorem:

P(u|nB,N)=P(u,nB|N)P(nB|N)=P(nB|u,N)P(u)P(nB|N)

We so far know 2 of the 3 expressions in that quotient. The third, the denominator, P(nB|N), is the marginal probability of nB which we can obtain using the sum rule:

P(nB|N)=uP(u,nB|N)=uP(u)P(nB|u,N)

So the conditional probability of u given nB is:

P(u|nB,N)=P(nB|u,N)P(u)uP(nB|u,N)P(u)=P(nB|u,N)P(u)P(nB|N)=1P(nB|N)111(NnB)funB(1fu)NnB

We must calculate and sum all probabilities of the form (1) above, then p the sum by the probabilities from (1) for the given urn.

By the way, the sum for when nB is 3 is: P(nB=3|N=10)=0.083.

Todo: compare this to the bent coin.