DO FRIENDS of the opposite gender distract teenagers, hampering their academic performance? It may seem obvious, at least to paranoid parents, and yet it is hard to prove. Simple analysis of a survey of American schoolchildren conducted in 1995, for example, suggests no link between the proportion of a girl’s friends who were boys and her grades. Boys with lots of female friends actually achieved better results than those with fewer.

A new paper* by Andrew Hill of the University of South Carolina, however, digs deeper into the data, and comes to a different result. Friendship groups are not random, which makes it tricky to isolate the effect of fraternising with the opposite sex on school performance. Pushy parents, for instance, may both encourage after-school activities (hotbeds of hobnobbing across the gender divide) and help out with homework. By the same token, the sort of boys who do not find it embarrassing to join a clique composed mainly of girls may also be more studious.

Mr Hill gets around this by looking at the proportion of schoolmates of either sex living near each student. He reasons that parents do not choose where to live based on the sex of their neighbours’ children. The gender mix of near-neighbours should therefore be unrelated to the invisible factors that influence both friends and grades. But the mix of neighbours does influence friendship groups in school, since children are much more likely to befriend other children who live close by.

Mr Hill calculates the share of boys and girls among each child’s 20 closest neighbours and uses this to identify random differences in friendship groups. He can then isolate the effect of having more friends of the opposite gender on school performance. He finds that for every 10% more children of the opposite sex among a student’s friends, his or her grade-point average (GPA) declines by 0.1 (GPAs range from 0 to 4).

Below the age of 16, the effects are restricted to science and maths, but beyond 16 they spill over to English and history as well. Girls seem to be more prone to distraction, though Mr Hill cannot muster the statistical power to be certain. This tentative result is consistent with other studies that find that girls gain more from moving to single-sex schools.

Readers rushing to remove their children from co-ed schools should know, however, that Mr Hill’s results came with a twist. Having more friends of the opposite sex may be bad for grades, but it has other effects, too. Among the children from the original survey who were successfully re-interviewed 14 years later, those whose grades had been dragged down by friends of the opposite gender were more likely to be (or have been) married. Traditionalists worried about a child mooning over the heartthrob next door may comfort themselves with that.

*“The girl next door: The effect of opposite gender friends on high school achievement”, American Economic Journal: Applied Economics, July 2015.