Think all you have in common with your buddies is the same taste in music or food? Turns out you’re more genetically similar than you think, a new study shows.

We tend to choose friends who like the same activities and have the same mindsets we do. But a new study indicates that we’re drawn to our friends by something even more intimate: a genetic similarity.

The new genome-wide analysis, published in Proceedings of the National Academy of Sciences, found that people are as genetically similar to their friends as they are to their fourth cousins.

“We have more DNA in common with the people we pick as friends than we do with strangers in the same population,” said co-author James Fowler, a professor of medical genetics and political science at the University of California, San Diego, in a press release. “Looking across the whole genome, we find that, on average, we are genetically similar to our friends.”

Along with Dr. Nicholas Christakis, a professor of sociology, evolutionary biology, and medicine at Yale University, Fowler looked at nearly 1.5 million markers of gene variation from the Framingham Heart Study of the population of Framingham, Mass.

Read More: Moving Closer to Genetically Engineered ‘Designer Babies’ »

The researchers compared pairs of unrelated friends against pairs of unrelated strangers. They used the same people who were not related or married in both samples; their social relationships were the only thing that differed among them.

Fowler and Christakis say the results are not caused by people’s tendency to befriend others in their racial or ethnic group. All of the subjects were drawn from the same sample population, and the researchers controlled the data for ancestry.

They found that, on average, friends are as related as fourth cousins, or those who have great-great-great grandparents in common. They share about 1 percent of their genes.

“One percent may not sound like much to the layperson,” Christakis said in a press release, “but to geneticists it is a significant number. And how remarkable: Most people don’t even know who their fourth cousins are! Yet we are somehow, among a myriad of possibilities, managing to select as friends the people who resemble our kin.”

As part of the study, Fowler and Christakis came up with a “friendship score,” a genetic methodology that can be used to predict who will be friends similar to the way scientists can predict who will develop diseases such as schizophrenia or obesity. All they need are genes from a pair of people to make the prediction, Fowler said.

“A pair with a very high friendship score is about 24 percent more likely to be friends than a pair with a very low friendship score,” he said. “I was surprised that the score worked as well as it did.”

Take a Closer Look: Genomics vs. Genetics »

Fowler and Christakis also found that people who are friends have similar genes that affect their sense of smell. Perhaps if we like the smell of hot dogs and peanuts, and thus meet people at baseball games, that could explain it — though the researchers think there’s more to it.

“We and our friends may be attracted to the same environment where we happen to meet,” Fowler said. “One set of genes we share in common with our friends is in the olfactory system, which governs our sense of smell. This suggests that we literally smell things the same way that our friends do. That might be a mechanism for bringing us together if we like the same smells or keeping us apart if we do not.”

Friends differ, however, in their genes for immunity, meaning that we typically differ from our friends in our innate ability to fight diseases. Fowler and Christakis say that having connections to people who are able to withstand different bacteria or viruses reduces the threat of spreading disease.

The researchers were surprised by another finding: Genes that are more similar among friends seem to evolve faster than other genes. This could be why human evolution seems to have sped up over the past 30,000 years. They suggest that our social environment may be an evolutionary force all its own.

“On average, our friends are like family,” Fowler said. “And this tendency to choose friends who are like us appears to be speeding up the rate at which we evolve. In other words, it looks like social networks may be turbo-charging human evolution.”

Christakis said the paper supports the notion that humans are metagenomic with regards to the microbes in us and also to the people around us. Our evolutionary fitness — the capacity to survive and reproduce — depends on our own genetic makeup as well as the makeup of our friends.

“We think this is because these genes give us network advantages that require more than one person to work,” Fowler explained. “For example, a mutation that gives a person the ability to speak language will not be useful unless someone else also has that mutation. We need to surround ourselves with similar others to get the benefit.”

Related News: Are Gene-Based Diets the Key to Weight Loss? »