Analysis of Child Paradox question #4

(Assume equal probability of a child being a boy or girl)

Question 1: A mother has two children. The younger one is a daughter named Mary. What is the probability that the other child is a girl?

Question 2: A mother has two children. The older one is a daughter named Mary. What is the probability that the other child is a girl?

Question 3: A mother has two children. One of them is a daughter. What is the probability that the other child is a girl?

Question 4: A mother has two children. One of them is a daughter named Mary. What is the probability that the other child is a girl?

Here is a fuller examination of question #4:

```A mother has two children. One of them is a daughter named Mary.
What is the probability that the other child is a girl?

Pr(G1) - Probability that first child is a girl
Pr(B1) - Probability that first child is a boy
Pr(G2) - Probability that second child is a girl
Pr(B2) - Probability that second child is a boy
Pr(M1) - Probability of naming first child Mary
Pr(M2) - Probability of naming second child Mary

Pr(~G1) - Probability that first child is NOT a girl
Pr(~B1) - Probability that first child is NOT a boy
Pr(~G2) - Probability that second child is NOT a girl
Pr(~B2) - Probability that second child is NOT a boy
Pr(~M1) - Probability of NOT naming first child Mary
Pr(~M2) - Probability of NOT naming second child Mary

All possible combinations of Girls & Boys named & not named Mary.
16 in all.
Sample Space is:
S = {
1: (Girl named Mary,     Girl named Mary    )  Pr(G1)Pr(M1|G1)  * Pr(G2)Pr(M2|G2&G1&M1)
2: (Girl named Mary,     Girl not named Mary)  Pr(G1)Pr(M1|G1)  * Pr(G2)Pr(~M2|G2&G1&M1)
3: (Girl named Mary,     Boy named Mary     )  Pr(G1)Pr(M1|G1)  * Pr(B2)Pr(M2|B2&G1&M1)
4: (Girl named Mary,     Boy not named Mary )  Pr(G1)Pr(M1|G1)  * Pr(B2)Pr(~M2|B2&G1&M1)
5: (Girl not named Mary, Girl named Mary    )  Pr(G1)Pr(~M1|G1) * Pr(G2)Pr(M2|G2&G1&~M1)
6: (Girl not named Mary, Girl not named Mary)  Pr(G1)Pr(~M1|G1) * Pr(G2)Pr(~M2|G2&G1&~M1)
7: (Girl not named Mary, Boy named Mary     )  Pr(G1)Pr(~M1|G1) * Pr(B2)Pr(M2|B2&G1&~M1)
8: (Girl not named Mary, Boy not named Mary )  Pr(G1)Pr(~M1|G1) * Pr(B2)Pr(~M2|B2&G1&~M1)
9: (Boy named Mary,      Girl named Mary    )  Pr(B1)Pr(M1|B1)  * Pr(G2)Pr(M2|G2&B1&M1)
10: (Boy named Mary,      Girl not named Mary)  Pr(B1)Pr(M1|B1)  * Pr(G2)Pr(~M2|G2&B1&M1)
11: (Boy named Mary,      Boy named Mary     )  Pr(B1)Pr(M1|B1)  * Pr(B2)Pr(M2|B2&B1&M1)
12: (Boy named Mary,      Boy not named Mary )  Pr(B1)Pr(M1|B1)  * Pr(B2)Pr(~M2|B2&B1&M1)
13: (Boy not named Mary,  Girl named Mary    )  Pr(B1)Pr(~M1|B1) * Pr(G2)Pr(M2|G2&B1&~M1)
14: (Boy not named Mary,  Girl not named Mary)  Pr(B1)Pr(~M1|B1) * Pr(G2)Pr(~M2|G2&B1&~M1)
15: (Boy not named Mary,  Boy named Mary     )  Pr(B1)Pr(~M1|B1) * Pr(B2)Pr(M2|B2&B1&~M1)
16: (Boy not named Mary,  Boy not named Mary )  Pr(B1)Pr(~M1|B1) * Pr(B2)Pr(~M2|B2&B1&~M1)

Now apply "One of them is a daughter named Mary"
This means either:
1. The first child is a "Girl named Mary"
2. The second child is a "Girl named Mary"
3. Both the first child AND the second child is a "Girl named Mary"

Elements of our sample space above which fit "One of them is a daughter named Mary":
1: (Girl named Mary,     Girl named Mary    )  Pr(G1)Pr(M1|G1)  * Pr(G2)Pr(M2|G2&G1&M1)
2: (Girl named Mary,     Girl not named Mary)  Pr(G1)Pr(M1|G1)  * Pr(G2)Pr(~M2|G2&G1&M1)
3: (Girl named Mary,     Boy named Mary     )  Pr(G1)Pr(M1|G1)  * Pr(B2)Pr(M2|B2&G1&M1)
4: (Girl named Mary,     Boy not named Mary )  Pr(G1)Pr(M1|G1)  * Pr(B2)Pr(~M2|B2&G1&M1)
5: (Girl not named Mary, Girl named Mary    )  Pr(G1)Pr(~M1|G1) * Pr(G2)Pr(M2|G2&G1&~M1)
6: (Girl not named Mary, Girl not named Mary)  NO
7: (Girl not named Mary, Boy named Mary     )  NO
8: (Girl not named Mary, Boy not named Mary )  NO
9: (Boy named Mary,      Girl named Mary    )  Pr(B1)Pr(M1|B1)  * Pr(G2)Pr(M2|G2&B1&M1)
10: (Boy named Mary,      Girl not named Mary)  NO
11: (Boy named Mary,      Boy named Mary     )  NO
12: (Boy named Mary,      Boy not named Mary )  NO
13: (Boy not named Mary,  Girl named Mary    )  Pr(B1)Pr(~M1|B1) * Pr(G2)Pr(M2|G2&B1&~M1)
14: (Boy not named Mary,  Girl not named Mary)  NO
15: (Boy not named Mary,  Boy named Mary     )  NO
16: (Boy not named Mary,  Boy not named Mary )  NO

Thus elements which fit "One of them is a daughter named Mary" are:
1: (Girl named Mary,     Girl named Mary    )  Pr(G1)Pr(M1|G1)  * Pr(G2)Pr(M2|G2&G1&M1)
2: (Girl named Mary,     Girl not named Mary)  Pr(G1)Pr(M1|G1)  * Pr(G2)Pr(~M2|G2&G1&M1)
3: (Girl named Mary,     Boy named Mary     )  Pr(G1)Pr(M1|G1)  * Pr(B2)Pr(M2|B2&G1&M1)
4: (Girl named Mary,     Boy not named Mary )  Pr(G1)Pr(M1|G1)  * Pr(B2)Pr(~M2|B2&G1&M1)
5: (Girl not named Mary, Girl named Mary    )  Pr(G1)Pr(~M1|G1) * Pr(G2)Pr(M2|G2&G1&~M1)
9: (Boy named Mary,      Girl named Mary    )  Pr(B1)Pr(M1|B1)  * Pr(G2)Pr(M2|G2&B1&M1)
13: (Boy not named Mary,  Girl named Mary    )  Pr(B1)Pr(~M1|B1) * Pr(G2)Pr(M2|G2&B1&~M1)

Now of these 7 possibilities, the ones which also satisfy
the question condition "other child is a girl" are:

1,2,5

Thus our answer to question 4 is:

Pr(any of {1,2,5})
---------------------------
Pr(any of {1,2,3,4,5,9,13})

On the top we have Pr(any of {1,2,5}):
1: (Girl named Mary,     Girl named Mary    )  Pr(G1)Pr(M1|G1)  * Pr(G2)Pr(M2|G2&G1&M1)
2: (Girl named Mary,     Girl not named Mary)  Pr(G1)Pr(M1|G1)  * Pr(G2)Pr(~M2|G2&G1&M1)
5: (Girl not named Mary, Girl named Mary    )  Pr(G1)Pr(~M1|G1) * Pr(G2)Pr(M2|G2&G1&~M1)

The probability for the top is:

Pr(G1)Pr(M1|G1)  * Pr(G2)Pr(M2|G2&G1&M1)  +   ;1
Pr(G1)Pr(M1|G1)  * Pr(G2)Pr(~M2|G2&G1&M1) +   ;2
Pr(G1)Pr(~M1|G1) * Pr(G2)Pr(M2|G2&G1&~M1)     ;5

Rearranging:
Pr(G1)Pr(G2) * Pr(M1|G1)Pr(M2|G2&G1&M1)   +   ;1
Pr(G1)Pr(G2) * Pr(M1|G1)Pr(~M2|G2&G1&M1)  +   ;2
Pr(G1)Pr(G2) * Pr(~M1|G1)Pr(M2|G2&G1&~M1)     ;5

Rearranging:
Pr(G1)Pr(G2) *
[Pr(M1|G1)Pr(M2|G2&G1&M1) + Pr(M1|G1)Pr(~M2|G2&G1&M1) + Pr(~M1|G1)Pr(M2|G2&G1&~M1)]

Rearranging:
Pr(G1)Pr(G2) *
[Pr(M1|G1)[Pr(M2|G2&G1&M1) + Pr(~M2|G2&G1&M1)] + Pr(~M1|G1)Pr(M2|G2&G1&~M1)]

Rearranging:
Pr(G1)Pr(G2) *
[Pr(M1|G1)[1] + Pr(~M1|G1)Pr(M2|G2&G1&~M1)]

Rearranging:
Pr(G1)Pr(G2) *
[Pr(M1|G1) + Pr(~M1|G1)Pr(M2|G2&G1&~M1)]

BOTTOM:
Now calculate the bottom. On the bottom we have Pr(any of {1,2,3,4,5,9,13}):
Pr(G1)Pr(M1|G1)  * Pr(G2)Pr(M2|G2&G1&M1)  +   ;1
Pr(G1)Pr(M1|G1)  * Pr(G2)Pr(~M2|G2&G1&M1) +   ;2
Pr(G1)Pr(M1|G1)  * Pr(B2)Pr(M2|B2&G1&M1)  +   ;3
Pr(G1)Pr(M1|G1)  * Pr(B2)Pr(~M2|B2&G1&M1) +   ;4
Pr(G1)Pr(~M1|G1) * Pr(G2)Pr(M2|G2&G1&~M1) +   ;5
Pr(B1)Pr(M1|B1)  * Pr(G2)Pr(M2|G2&B1&M1)  +   ;9
Pr(B1)Pr(~M1|B1) * Pr(G2)Pr(M2|G2&B1&~M1)     ;13

Put top and bottom together,
note that Pr(G1)*Pr(G2) on both top/bottom cancel out,

[Pr(M1|G1) + Pr(~M1|G1)Pr(M2|G2&G1&~M1)]
----------------------------------------
Pr(M1|G1)[Pr(M2|G2&G1&M1)+Pr(~M2|G2&G1&M1)+Pr(M2|B2&G1&M1)+Pr(~M2|B2&G1&M1)]
+Pr(~M1|G1)Pr(M2|G2&G1&~M1)
+Pr(M1|B1) Pr(M2|G2&B1&M1)
+Pr(~M1|B1)Pr(M2|G2&B1&~M1)

Rearranging:
[Pr(M1|G1) + Pr(~M1|G1)Pr(M2|G2&G1&~M1)]
----------------------------------------
Pr(M1|G1)[2]+Pr(~M1|G1)Pr(M2|G2&G1&~M1)+Pr(M1|B1)Pr(M2|G2&B1&M1)+Pr(~M1|B1)Pr(M2|G2&B1&~M1)

Rearranging, and our

[Pr(M1|G1) + Pr(~M1|G1)Pr(M2|G2&G1&~M1)]
----------------------------------------
2Pr(M1|G1)+Pr(~M1|G1)Pr(M2|G2&G1&~M1)+Pr(M1|B1)Pr(M2|G2&B1&M1)+Pr(~M1|B1)Pr(M2|G2&B1&~M1)

Now let us consider what happens if we add the constraint of Rational Naming.
That is, we never name a boy "Mary". This constraint was not part of the original question.

RATIONAL NAMING:
Pr(M1|B1)=0    ;Probability of first child being named Mary given first child is a boy.
Pr(~M1|B1)=1   ;Probability of first child NOT being named Mary given first child is a boy.

Inserting these values into our TOTAL ANSWER above gives:

[Pr(M1|G1) + Pr(~M1|G1)Pr(M2|G2&G1&~M1)]
----------------------------------------
2Pr(M1|G1)+Pr(~M1|G1)Pr(M2|G2&G1&~M1)+0+Pr(M2|G2&B1&~M1)

Rearranging:
[Pr(M1|G1) + Pr(~M1|G1)Pr(M2|G2&G1&~M1)]
----------------------------------------
2Pr(M1|G1) + [1 - Pr(M1|G1)]Pr(M2|G2&G1&~M1) + Pr(M2|G2&B1&~M1)

Rearranging:
[Pr(M1|G1) + Pr(~M1|G1)Pr(M2|G2&G1&~M1)]
----------------------------------------
2Pr(M1|G1) + Pr(M2|G2&G1&~M1) - Pr(M1|G1)Pr(M2|G2&G1&~M1) + Pr(M2|G2&B1&~M1)

Rearranging:
[Pr(M1|G1) + Pr(~M1|G1)Pr(M2|G2&G1&~M1)]
----------------------------------------
Pr(M1|G1)[2 - Pr(M2|G2&G1&~M1)] + Pr(M2|G2&G1&~M1) + Pr(M2|G2&B1&~M1)

Rearranging:
Pr(M1|G1) + Pr(~M1|G1)
----------------------------------------
Pr(M1|G1) + 1 + 1

Rearranging:
1
----------------------------------------
Pr(M1|G1) + 1 + 1

Thus, if we assume Rational Naming, the answer is:
1/2 if probability of naming first girl Mary is zero.
1/3 if probability of naming first girl Mary is 1.

We can consider other possibilities too:

FIRST CHILD GIRL ALWAYS NAMED MARY & RATIONAL NAMING
1
----------------------------------------
2 + 0+0+Pr(M2|G2&B1&~M1)

EVERYONE NAMED MARY
1
----- = 1/3
2 + 1

FIRST CHILD (BOY/GIRL) ALWAYS NAMED MARY
1
-------------------
2 + Pr(M2|G2&B1&M1)

FIRST CHILD IF GIRL ALWAYS NAMED MARY
1
----------------------------------------
2 + Pr(M1|B1)Pr(M2|G2&B1&M1) + Pr(~M1|B1)Pr(M2|G2&B1&~M1)

FIRST CHILD NEVER NAMED MARY
Pr(M2|G2&G1&~M1)                       1
----------------------------------- = ---  IF Pr(M2|G2&B1&~M1) = 1
Pr(M2|G2&G1&~M1) + Pr(M2|G2&B1&~M1)    2

NO TWO CHILDREN NAMED MARY
Pr(M1|G1) + Pr(~M1|G1)Pr(M2|G2&G1&~M1)
----------------------------------------
2Pr(M1|G1) + Pr(~M1|G1)Pr(M2|G2&G1&~M1) + Pr(~M1|B1)Pr(M2|G2&B1&~M1)
```

You may carry this further and explore other possibilities.