A friend will help you move, goes an old saying, while a good friend will help you move a body. And why not? Moral qualms aside, that good friend would likely agree the victim was an intolerable jerk who had it coming and, jeez, you shouldn’t have done this but where do you keep the shovel?

Researchers have long known that people choose friends who are much like themselves in a wide array of characteristics: of a similar age, race, religion, socioeconomic status, educational level, political leaning, pulchritude rating, even handgrip strength. The impulse toward homophily, toward bonding with others who are the least other possible, is found among traditional hunter-gatherer groups and advanced capitalist societies alike.

New research suggests the roots of friendship extend even deeper than previously suspected. Scientists have found that the brains of close friends respond in remarkably similar ways as they view a series of short videos: the same ebbs and swells of attention and distraction, the same peaking of reward processing here, boredom alerts there.

The neural response patterns evoked by the videos — on subjects as diverse as the dangers of college football, the behavior of water in outer space, and Liam Neeson trying his hand at improv comedy — proved so congruent among friends, compared to patterns seen among people who were not friends, that the researchers could predict the strength of two people’s social bond based on their brain scans alone.