Evolution can help explain when and why we gamble, according to new research.
Academics at the University of Bristol have developed a model to try and understand a puzzling form of behaviour - why on occasions humans love to gamble but at other times avoid it.
The study used a computer model to calculate how taking risks would affect the evolutionary success of an animal living in a world where conditions fluctuate over time.
It turned out that in some situations the best thing to do was to take a gamble, whereas in others it was better to play it safe.
The researchers argue that humans may treat risk in a similar way when making financial decisions.
Lead researcher Dave Mallpress, a PhD student in the university's School of Biological Sciences, said: "The fact that our risk preferences are inconsistent seems irrational but, in fact, this may have been a sensible way to behave in the changing, unpredictable environments our ancestors lived in.
"When our wealth is increasing quickly we can protect our interests best by not taking risks, whereas when we are in serious financial difficulty, taking risks is essential if we ever want a chance to break free from spiralling debt.
"However, when earnings or debts are more modest, taking risks can give us the opportunity for wealth, and avoiding risks with insurance can keep us from serious problems."
This strategy, known as the four-fold pattern of risk preferences, is a characteristic feature of human decision-making and has widely been viewed as demonstrating the irrationality of behaviour.
The new model provides a possible explanation and the effects stem from knowing that current net income often predicts conditions in the near future.
Unfortunately, according to the researchers, the model will not tell you how to win at roulette because in that type of game the past or present tells you nothing about the future - as every spin is independent of the last.
The study, Risk Attitudes In A Changing Environment: An Evolutionary Model Of The Fourfold Pattern Of Risk Preferences, is published in the journal Psychological Review.