LOS ANGELES — Your mom always told you hanging out with the wrong kids would get you into trouble. Dolphin mothers should probably warn their daughters, too.

Social factors, not just genes, influence the reproductive fitness of dolphin females, according to a study based on more than 20 years of observations of a wild Australian bottlenose dolphin colony.

Social factors – who a dolphin associates with, and how closely – appear to be more important than genes in determining a female’s likelihood of raising a calf to three years, an age where it has a good chance of surviving on its own.

“Females who do well hang out with other females who do well,” said Celine Frere, a postdoctoral fellow at the University of Queensland in Brisbane, Australia, and lead author of the study, published Monday in the Proceedings of the National Academy of Sciences. “If you hang out with a bad crowd, your kids won’t be in as good shape. When you go out to forage, there’s a higher chance your calf gets eaten by a shark.”

Such warnings about choosing your friends wisely might seem obvious to protective human parents, but Frere’s research, conducted while she was a doctoral student at the University of New South Wales, marks a breakthrough. Making use of new statistical methods, the work is the first to analyze in tandem the effects of genetics and socialization in animals in the wild.

That’s hard to do, Frere said, because it’s far more difficult to construct a family tree for wild animals than for groups of captive animals where the kin relationships are well known. In the wild, Frere said, “we don’t know the father, and we don’t know who’s related to whom … the problem becomes a lot more complex.”

To tackle the problem, Frere studied genetic markers – DNA differences between individual animals – among bottlenose dolphins living in the eastern gulf of Shark Bay, in Western Australia.

The Shark Bay bottlenose dolphins are among the closest-studied in the world. Since the mid-1980s, scientists have tracked 600 dolphins in the area.

They have taken thousands of photographs from research boats, identifying individual dolphins by the distinctive shapes and markings of their dorsal fins. They have charted when the dolphins feed and where they roam, who has given birth and when, who spends time with whom and more.

They have also collected genetic information by shooting a special dart into a site below the dolphins’ dorsal fins to extract a small amount of skin and blubber for biopsy.

Analyzing data on 52 females in the colony, Frere recorded how many calves each dolphin had successfully raised, with whom she associated and with whom she shared genes.

Combining the data, she showed that good mothers tended to spend time with other good mothers. Less successful mothers were less discriminating about their companions.

Genetically related dolphins did not always prefer to associate with each other, and relatives that did hang out together did not always have better outcomes raising calves.

All in all, social ties were more important than genes. “It’s speculation, but probably females with calves help each other out,” Frere said.

Scientists said the new methodology might help them understand evolution in the wild – in dolphins and in other animals.

Frere said she planned to apply the technique to the Eastern Water Dragon, an Australian lizard that is “socially complicated” like dolphins but easier to study because it doesn’t live underwater.