Your job could be protecting your aging brain. Scientists at the University of Edinburgh found the more complicated someone's job is, the more likely they are to score well on memory and cognitive thinking tests into old age.

The researchers first looked at the childhood IQ tests of around 1,000 elderly participants. They then compared those results with cognitive testing done when the participants were 70 — years after retirement for some.

Researchers defined the complexity of a job by using definitions from the Dictionary of Occupational Titles and scored jobs on level of complexity. They divided jobs into two types: jobs that require you to work with people, and those that require you to work with data.

In terms of working with people, jobs that ranked as highly complicated included lawyers or surgeons. Examples of less complicated jobs? Factory workers and painters.

Highly complicated jobs involving data included architects and civil engineers; less complicated included construction workers and telephone operators.

Researchers found the participants who had jobs that had scored high in either category also scored higher in cognitive testing — like memory tests.

So whether you're working with people or data, if your job is complicated, you're likely scoring better on cognitive tests into old age.

One thing to point out, though — researchers found many people who had higher IQs had gone into more complex fields. In fact, they found the childhood tests accounted for about 50 percent of the differences in the scores.

But the other 50 percent of the variance in scores did appear to come from the participants' time on the job — making the case that exercising the brain through work really can benefit cognitive health.

Researchers have asked study participants to return for more testing so they can discover how career choices affect the brain into more advanced ages.

This video includes images from Patrick / CC BY NC 2.0James Mutter / CC BY NC ND 2.0Seattle Municipal Archives / CC BY 2.0George Smyth / CC BY NC, Kompania Piwowarska / CC BY NC ND 2.0 and U.S. Army Corps of Engineers / CC BY 2.0 and music by Podington Bear / CC BY NC 3.0.