There was some research showing that female teachers' math insecurities are passed on to girls but not to boys due to gender role modeling. There's the interesting double-edged sword here in that boys and men are often inaccurately overconfident (girls and women being the opposite, but I think their estimates are closer to their actual ability). I am not a fan of blind overconfidence--I think it does much evil in the world--but OTOH, I am obviously not a fan of underconfidence, either.