When it comes to your health, seeing the glass as half-full or half-empty makes a big difference, according to a study published today in the journal Neurology. Researchers from the University of Eastern Finland found that cynical people are at a much higher risk of developing dementia later in life – meaning Monty Python’s mantra of always looking on the bright side may have been sage advice after all.

The researchers asked 622 people ages 65 to 79 to complete a questionnaire to determine how cynical they were and then administered two tests for dementia over eight years. The participants answered questions such as "It is safer to trust nobody" and "I think most people would lie to get ahead." Those who responded positively to such questions were three times more likely to develop dementia – a condition characterized by memory loss, personality changes and impaired judgment – than those who did not.

"Expectations color everything," says Hilary Tindle, an assistant professor of medicine at the University of Pittsburgh and author of "Up: How Positive Outlook Can Transform Our Health and Aging." "If you are someone who is walking around with those notions in mind, you are living a very different life from someone who isn’t. You’re going to behave differently. You may lean on smoking and other substances more, you may become depressed easier or you may push people away – all of which can raise your risk for dementia."

But even after adjusting for unhealthy behaviors, the dementia risk was still high, which Alan Lerner, director of the Brain Health and Memory Center at University Hospitals Case Medical Center in Ohio, says may be due to inflammation in the brain. "There’s a theory that Alzheimer’s disease and dementia are inflammatory diseases of the brain," he says. "And there’s evidence that people with cynical and pessimistic viewpoints have more inflammation in their bodies."

However, Lerner – who was not involved in the study – points out that the research doesn’t show an exact cause between dementia and cynicism. "The links between these things are quite complicated," he says. "Personality traits might predispose someone to dementia, and it may be exacerbated or reduced by other lifestyle choices."

Besides potentially warding off dementia, there are several reasons to be an optimist. One 2009 study by Tindle and published in the journal Circulation found that when compared to optimistic women, pessimistic women were 30 percent more likely to die of heart disease over the eight-year study period. Another study, published in the journal Science Translational Medicine in 2011, found that a pessimistic attitude toward pain medication could stop a painkiller from providing pain relief.​ "We’re starting to understand now that these personality traits can really affect your health," Tindle says.

For example, getting in shape and eating healthier is much more difficult if you have a pessimistic attitude. "If you’re trying to make a change in your diet, you need to be positive about it," Tindle says. "If you think that you can’t do it, it’s a recipe for failure."

So how do you turn yourself into an optimist? It starts by forcing yourself to look at the positives of any situation, Tindle says. Instead of focusing on the waiter getting your order wrong at lunch, for instance, understand that he didn't do it on purpose and will likely gladly correct the mistake. "Negative attitudes can be overwhelming," she says. "You need to learn to view the same situation in a different light."

But that’s not to say you can’t ever be upset. "This doesn’t imply that being a Pollyanna would lower your risk of dementia," Lerner says. "It’s just important that people with negative or depressive personalities understand that these attitudes may have profound health effects, and that they do what they can to mitigate these feelings."

It’s also important to seek out the type of people whose behavior you want to emulate, Tindle says. "Find the healthy folks, and spend more of your time and energy with them. Try to gravitate toward optimistic people."

However changing your personality is an inexact science, Tindle says, especially when it comes to cynicism. "We don’t have randomized clinical trials saying how to make the change," she says. "There’s no 12-step program. Cynicism is tougher to change than pessimism, because there may be good reasons for being cynical, since these attitudes are often based on past experiences."