(CNN) -- The next time you see a motorist obliviously straddling two lanes, don't fault bad driving, but genetics.

In a study published recently in the journal Cerebral Cortex, researcher Steven Cramer found that people with a certain gene variant performed more than 30 percent worse on a driving test than people without it.

The study by Cramer, a neurology professor at the University of California Irvine, might also help explain why there are so many bad drivers on U.S. highways: About 30 percent of Americans have the variant.

Ordinarily, when a person performs a task, a protein called brain-derived neurotrophic factor (BDNF) is secreted to the area of the brain that is associated with that activity.

The protein helps facilitate communication among brain cells and helps retain memory.

However in people who have the gene variation that Cramer studied, BDNF secretion is limited.

"These people make more errors from the get-go, and they forget more of what they learned after time away," Cramer said in a statement.

Cramer and his team of researchers set out to find how the variant affected driving.

They recruited 29 people to drive 15 laps on a simulated course with difficult curves and turns. Twenty-two of the participants did not have the gene variant; seven did.

The researchers wanted to see how effectively the participants learned to navigate the twists and turns in each subsequent lap.

Four days later, they repeated the test. The participants with the variant did worse both times. They also retained less the second go-round.

"I'd be curious to know the genetics of people who get into car crashes," Cramer said. "I wonder if the accident rate is higher for drivers with the variant."

Unfortunately, a test to determine whether someone has the gene variant is not commercially available.