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.
"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.