Want to improve your girl’s test skills in math? A new study suggests she might do better if she walks to school.

Girls, but not boys, who walk or bike to school instead of getting a ride, perform better in tests of verbal and math skills, according to a new study of teens living in Spanish cities. And the longer the commute, the higher the test scores, regardless of how much exercise girls got outside of school. Still, it's unclear whether the commute itself matters, or if exercise in general or some other factor is at play, said Dr. Francois Trudeau of the Université du Québec à Trois-Rivières, who was not involved in the study. "Would basketball in the morning do as much as an active commute?" he wondered.

Current guidelines suggest that children and teenagers get at least an hour of moderate or vigorous exercise every day — equivalent to a brisk walk or jog, respectively. But less than half of U.S. children, and even fewer teenagers, manage to work this much exercise into their routines.

The teen brain undergoes important changes in structure and function, and many researchers believe physical activity may have a positive effect. It increases blood flow to the brain, for instance, and appears to improve concentration, memory, and other key factors associated with learning.

Even kids who play sports don't exercise enough

Earlier this year, a large study of urban teens in Spain suggested those who exercise more outside of school do better on cognitive tests. To test whether the same might be true for an active commute to school, David Martínez-Gómez of the Spanish National Research Council in Madrid and his colleagues looked at test scores from 1,700 urban Spanish teens, and asked them how they got to school. Roughly 65 percent of teens said they either rode a bike or walked to school.

The authors found that girls with an active commute scored an average of 53 points in tests of cognitive function, while those who got a ride scored nearly four points less. And girls whose active commute lasted longer than 15 minutes did better on the tests than girls who walked or biked for less than 15 minutes on their way to school — a sign the  relationship between active commutes and test performance is real, Trudeau said. Indeed, the effect persisted even after the researchers accounted for age, body weight, social and economic status, and activities outside school.

It's not clear why there was no link between active commutes and cognitive performance with boys. Another study among Swedish teens found the same thing, the Spanish  researchers write in the Archives of Pediatrics & Adolescent Medicine, and it's possible that if boys are more active than girls overall, a bit of extra exercise during their commute wouldn't make much of a difference. Alternatively, brain differences between girls and boys might cause them to respond differently to exercise, the authors suggest. Trudeau added that walking or biking to school often takes longer than a car or bus ride, which may provide time to reflect and mentally prepare for the day, giving them an edge. "It may be a good period to start thinking about the school day."

He cautioned, however, that not all commutes are equal — a walk through European cities, with their cafes and shops, can be much more stimulating than a walk through a typical North American suburb, which could impact the benefits teens get from it. Plus, not every commute is safe, if kids have to navigate dangerous neighborhoods or busy roads. "Walking in the streets of Spain may be different than walking in the suburbs of Montreal or Los Angeles," Trudeau noted.