Here is a simple illustration that conditionally independent variables are not necessarily independent variables, and independent variables are not necessarily conditionally independent.
Consider a family consisting of a child, a mother, and a father. The child is present half the time. If the child is present, at least one parent is present. If the child is not present, then at least one parent is away. The distribution of the presence of the parents is described below in both cases.
| Child present | 1/2 | ||
| Father\Mother | present | not present | |
| present | 1/2 | 1/4 | |
| not present | 1/4 | 0 | |
| Child not present | 1/2 | ||
| Father\Mother | present | not present | |
| present | 0 | 1/4 | |
| not present | 1/4 | 1/2 | |
It is apparent conditioned on the presence of the child, the distribution of the presence of the mother and father is not independent. For example, if the child is present, then the probability both parents are present is 1/2, while the probability the mother is present is 3/4 and the probability the father is present is 3/4. The distribution of the presence of the parents is independent however:
| Father\Mother | present | not present |
| present | 1/4 | 1/4 |
| not present | 1/4 | 1/4 |
Hence independent does not necessarily imply conditional independence.
Conversely, consider the following conditional distribution. Here if the child is present, the mother is always present and it is equally likely the father may or may not be present. If the child is not present, the father is always present and it is equally likely the mother may or may not be present.
| Child present | 1/2 | ||
| Father\Mother | present | not present | |
| present | 1/2 | 0 | |
| not present | 1/2 | 0 | |
| Child not present | 1/2 | ||
| Father\Mother | present | not present | |
| present | 1/2 | 1/2 | |
| not present | 0 | 0 | |
In this case, conditioning on the presence of the child, the distribution of the presence of the parents is independent. However the distribution of the prencense of the parents is not indepedent.
| Father\Mother | present | not present |
| present | 1/2 | 1/4 |
| not present | 1/4 | 0 |
Hence conditional independence does not imply independence.
