Happy medical residents are all alike. Every unhappy resident would take a long time to count.

It’s no secret that medical training is grueling: long hours, little sleep, rigid hierarchies, steep learning curves. It’s unfortunate but not surprising, then, that nearly one-third of residents experience symptoms of depression, and more than 10 percent of medical students report having suicidal thoughts. But is it worse for women than men?

A new study in JAMA Internal Medicine suggests yes. Dr. Constance Guille and colleagues analyzed the mental health of more than 3,100 newly minted doctors at 44 hospitals across the country. Before starting residency, men and women had similar levels of depressive symptoms. After six months on the job, both genders experienced a sharp rise in depression scores — but the effect was much more pronounced for women. A major reason: work-family conflict, which accounted for more than a third of the disparity.