Thomas Peter / Reuters

Most parents have no say in whether they have a boy or a girl, and yet many of them root for one or the other anyway at an ultrasound appointment or when the baby is born.

All parents-to-be have their own imagined ideal for their child, but there are discernible patterns in what American parents hope for, as well as what happens when they get—or don’t get—what they want.

For a long time, American parents on the whole (like many others around the world) had a strong preference for boys, as reflected in the fact that having a daughter instead of a son made parents more likely to keep having kids, presumably in the hopes of having a boy. But this appears to have changed recently: A paper published last fall, examining data from 2008 to 2013, found that parents who already had a girl were less likely to keep having kids—evidence, perhaps, of a new preference for daughters. (Even as an overall inclination toward girls seems to have arisen, though, both American moms and dads express a desire for a child of their own sex—and dads have on average a much stronger desire for sons than moms do for daughters.)

The historical bias toward boys—which persists in many parts of the world—likely has to do with parents’ expectations that boys would grow up to be more productive economically. But several theories suggest why this favoritism may have faded.

For one thing, women these days are more likely to graduate from college than men are, and despite still facing countless disadvantages, girls might seem to parents to be a better fit for the modern world and its labor market. At the same time, disaffected, aggressive young men making news with acts of violence might be a bad advertisement for their sex. Also, research indicates that parents tend to want their kids to partake in the same hobbies as they do—and the cultural stereotypes around what’s acceptable for girls has expanded in a way that might win over dads imagining the activities they’ll be able to participate in with their daughters, while the stereotypes around what hobbies are appropriate for boys are more rigid.

A slightly more niche branch of research follows not just parents’ preferred sex for a child, but also their preference for the overall mix of their brood—as in, the combination of boys and girls they have. Here, Americans have wavered much less: Going back to the 1970s, researchers have determined that parents who have more than one child prefer to have at least one boy and one girl; Europe-focused studies have found similar results. The evidence is similar to the evidence for parents’ boy- and girl-specific preferences—with parents of two or more same-sex children more likely to continue having kids—and it lines up with surveys finding that fewer than 10 percent of Americans prefer to have all-male or all-female children.

Researchers have come up with all sorts of possible explanations for why parents tend to prefer variety among their children. Maybe they view boys and girls as having their own characteristics, thus presenting distinct child-rearing projects. Maybe they want to be involved in a wider range of activities—extracurriculars, sports, and the like—than what they’d expect if they had only boys or only girls. Maybe each parent feels better equipped to raise a child of his or her own sex, and so heterosexual couples aim for one of each. Or maybe parents think that, when they’re older and need help from their kids, male and female children will be able to provide different, complementary types of care.

What happens when parents’ vision for their children isn’t realized? There are widespread accounts of “gender disappointment”—when a parent wants a girl but gets a boy, or vice versa—online and in the media, and Parents magazine even has a guide for how to cope with it. Research indicates that this isn’t just a passing letdown or a media construct, as it’s associated with a higher risk of postpartum depression among mothers in the weeks and months after giving birth.

There is no corresponding data on the short-term well-being of mothers who said it was important to them to have at least one boy and one girl and then didn’t, but, according to unpublished data shared with me by the researcher Colleen Nugent, those mothers seem to fare just fine in the long run. Nugent wrote her doctoral dissertation in sociology at Rutgers in 2012 on parents’ preferences for the mix of sexes their children have. She looked at data from the late ’80s and early ’90s that tracked more than 400 women’s parenting desires and psychological well-being over the course of several years, as they had children whose sex either fulfilled those desires or didn’t. “I found that those who wanted a mixed-sex composition but did not obtain it are no less happy than anyone else,” Nugent says.

She went on, in an email: “This is not to say that these effects don’t exist … Maybe people actually are unhappy in the three outcomes I measured (depressive symptoms, satisfaction in life overall, and satisfaction with family life), but they get over it quickly and so the survey doesn’t pick it up.” (Her analysis didn’t include fathers, and most studies on gender disappointment focus on mothers.)

Whatever the long-term outcome, parents have, for quite some time, not had much say over the sex of their child. As Nugent grimly put it in her dissertation, “Historically, infanticide and neglect have been the only available methods of sex selection, typically practiced against females.” And in the past few decades, in countries such as India and China, a preference for boys has led many parents to abort pregnancies after learning they’d have a daughter.

But today, there are nontraditional (and nonviolent) ways of having children that grant parents more agency. One is in vitro fertilization, an expensive process typically used by couples who are having trouble conceiving. As part of the IVF process, embryos are tested (usually for genetic diseases) before they are implanted into the womb, and that test can determine the sex of the child-to-be. Parents can opt to implant only embryos of the desired sex, and it’s not uncommon for couples without any fertility problems to seek out such “family balancing” services to achieve their desired mix of boys and girls.

Another route is adoption, and a paper published last month in the Journal of Marriage and Family found evidence that some parents use it “to fulfill their preference for a specific sex composition among their children.”

“Children who had same-sex preceding siblings were more likely to [have been] adopted, as opposed to biologically related to their parents, than children who had mixed-sex preceding siblings,” the researchers wrote. “Furthermore, adopted children were more likely to be of the missing sex.” That is, if an adopted child is a girl, she’s more likely to have been preceded only by brothers than only by sisters.

Most parents, though, aren’t picking the sex of their child, even though they may wish for one sex or the other. These preferences probably deserve a more critical eye, since they are—and there’s really no way around this—a widely accepted form of gender discrimination. That’s not to say parents think boys or girls are inherently worse or better, but rather that they are different, which accurately captures the fact that boys and girls get treated differently. And so the visions many parents have for the sex of their children, in a sense, are a collective reflection of all the expectations, fair or not, that parents know the world to have for boys and for girls.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.