Ultrasound to discover the sex of the baby

Good Morning! I'm 28 weeks pregnant, but when I was 21 weeks old I had an ultrasound to discover the baby's sex. The ultrasound doctor said that the child's umbilical cord was in the middle of the legs, but you could tell it was a boy! Is there any chance he might have missed the baby's sex?
Expert answer:

When the ultrasound shows that the baby is a boy it is difficult for the doctor to be wrong because he needs to see the boy's penis to say that he is a boy. In the case of the girl there is nothing to see, so it is easier for the doctor to miss the sex. Boy the chance of error is too small and girl the chance of error is greater.