The Wiki article you reference in your own code explains it well. The problem is in the assumptions made by the person answering a riddle. Just because you have a child, and it's a boy, and he is born on Tuesday, it does not mean that your next child is more likely to be a girl. If you agree with that statement, then the original answer must be false.