# Fun with conditional probability

Bayesian concept of probability is linked not with frequency, but with state of information. The processing of this information proceeds in a propositional sense. In fact there are semantic work related to the use of Bayesian statistic as foundation for programming languages (BLOG), First kind logic (MEBN , also look at the fun Of Starships and Klingon) and thus the foundation principles of Network-Centric warfare and commerce.

Property of Baysian calculation of proabability are sometimes difficult to grasp and very counter intuitive, interesting consideration can hide behind apparently trivial formulas that can help to answer questions like: *If you know your neighbour has a son born on Tuesday, which is the probability your neighbour has two sons?*

The conditional probability for two events, the probability of happening given that has happened, is given by the probability of both and happening divided by the probability of happening.

If A and B are independent events, like two consequent dice rolls, it gives that .

We consider for the following examples that the probability of a child to be born male or female is always exactly 1/2.

*If your neighbour has 2 children which is the probability they are two sons?*

__With the approximation above, is of course 1/4 since the probability is 1/2 each time and uncorrelated.

*However, if you know that one of the children is male, which is the probability your neighbour has two sons?*

The probability of the other being his little brother is not 1/4 again, and neither 1/2 as one could be tempted to say considering the uncorrelated variables argument, but 1/3. Since you introduce information in the system the probability function is perturbed in a similar fashion than the Quantum Mechanics observation (in fact there are a bayesian and a frequentist interpretation to QM!), since probability does not represent a frequency but an information state.

This can be easily seen considering the available phase space in a **traditional probabilistic interpretation**:

In the first example the phase space was given by where B stands for Boy and G stands for Girl, and each of these cases (Two Boys, Older Boy and Younger Girl, Older Girl and Younger Boy, Two Girls) is equiprobable since they are uncorrelated events.

Since you know one child is a male, than could not be and thus the phase space reduces to and in a traditional frequetionist view of probability, since each born is uncorrelated to the previous (again in this view) you have 1/3 of probability for each combination. If gain the information that this son is also the older, the phase space reduces furthermore to the familiar 1/2.

Considering the **Bayesian interpretation of probability** the result is the same, with the advantage that can be generalized more easily, since it does not rely on the varying dimension of the phase space but always considers the ergodic, information zero, phase space:

with the probability of having two boys.

While in the case that you know that the Older child is male:

*But, after this, let’s consider the case that your neighbour comes to dinner which one of his children, a son, which you know to be randomly selected between his brother/sister to come. Which is the probability your neighbour has two sons?*

Now you may have a little hope left that things are normal: “what difference does it makes how do I meet the male son? It should be similar to the previous case!”

Wrong indeed! Since you have now an additional information: the fact that the son has been selected at random implies an additional step, thus a different weight and a different probability if he has a brother or a sister.

This would be very difficoult to come up with the solution using the frequentist approach, since the variables start to be correlated and the calculation of the phase space start to be not trivial.

The Bayesian frequency is easily done: we define the event that the randomly selected child at dinner is a boy.

considering that the probability of event for the case of two sons is 1, for one boy and one girl is 1/2, for 2 girls is obviously 0.

Now let’s consider another trivia: *If you know your neighbour has a son born on Tuesday, which is the probability your neighbour has two sons?*

This classic trivia proposed by Martin Gardner in 1959 on Scientific American, that can surprise your dinner guests but you have by now understood what’s the drill. That can be solved both by considering the phase space, for which you need a good drawing board and time to count dots in such a nice article by Science News (https://www.sciencenews.org/article/when-intuition-and-math-probably-look-wrong), can be more swiftly solved used Bayesian probability. If we consider the event that One child is male and Born on Tuesday,

Now making use of the same definition of conditional probability and commutative property of operator we can deduce

is much easier to calculate than the opposite. Giving they are two males the probability of one to be born in Tuesday is could be, this time more easily, calculated with the frequentist approach (phase space is a square of 7 days, Tuesdays column and line filled with the case under consideration).

*13/27 is the final answer.* To be noted that an apparently a very small information introduced in the system (day of the week born), can skew the probability a lot. 13/27 is very close to 1/2 respect to 1/3, which is the probability when a “big” information has been introduced (e.g. the boy is the oldest/youngest).

https://en.wikipedia.org/wiki/Boy_or_Girl_paradox