Genes that influence people's health also shape how effectively they think, according to a new study which suggests that those with better overall health are likely to have higher levels of intelligence.

Researchers analysed data from around 100,000 people which could help them discover why some people develop particular diseases and others do not.

To test the findings, researchers gathered data from previous genetic studies of other mental and physical health factors - such as Alzheimer's disease, schizophrenia and autism.

When they compared each person's mental test data with their genome, they found that some traits linked to disease and thinking skills shared the same genetic influences.

"In addition to there being shared genetic influences between cognitive skills and some physical and mental health states, the study also found that cognitive skills share genetic influences with brain size, body shape and educational attainments," said Ian Deary from the University of Edinburgh in the UK, one of the researchers.

"The study supports an existing theory which says that those with better overall health are likely to have higher levels of intelligence," said Saskia Hagenaars from University of Edinburgh.

"The research highlights the importance of investigating biological pathways that influence both cognitive function and health related traits," added Sarah Harris from University of Edinburgh.