The Smiths have four children, all girls. Their fifth child is a boy. Why did this change occur?

Luck of the draw!

I agree, probably because of the genes , as you know it is a different development in the stage of pregnancy. Better off the doctor should know!

The change occurred because the Smiths had another child and this time it was a boy. The gender of a child is determined by the combination of chromosomes from the parents. In humans, males have one X and one Y chromosome, while females have two X chromosomes. When a mother, Mrs. Smith, contributes an X chromosome and a father, Mr. Smith, contributes either an X or a Y chromosome, the resulting combination determines the gender of the child.

Since the Smiths had four girls, it can be inferred that the father, Mr. Smith, consistently contributed an X chromosome to each child, while the mother, Mrs. Smith, consistently contributed an X chromosome as well. However, during the conception of their fifth child, Mr. Smith contributed a Y chromosome instead of another X chromosome. The combination of Mrs. Smith's X chromosome and Mr. Smith's Y chromosome resulted in the birth of a boy.

It's worth noting that the probability of having a boy or a girl is generally equal (50% each) for each pregnancy, regardless of the gender of previous children. So, in this case, it was a matter of chance that the fifth child happened to be a boy after having four girls.