Let events A1,...,Ak form a partition of the space S such that Pr(Aj)>0 for j=1,...,k, and let B be any event such that Pr(B)>0. Then for i=1,...,k,
Pr(Ai|B) = Pr(Ai)*Pr(B|Ai) / Sum for j=1 to k of Pr(Aj)*Pr(B|Aj).
The source of this problem is the May 1997 issue of the Actuarial Review. Applying this theorm:
B=boy selected
A1=boy added
A2=girl added
g=number of girls before baby is added.
Pr(A2|B) = (1/2)*(2/(3+g)) / [(1/2)*(2/(3+g)) + (1/2)*(3/(3+g))] = 0.4
Michael Shackleford, A.S.A.