Twenty-five is the "golden age" for making random decisions, according to a new study by French boffins.
Scientists believe creative ability could be linked to age and at their peak, humans "outcompete" many computer algorithms in generating seemingly random patterns.
The authors are now using a similar approach to study potential connections between the ability to behave randomly and such things as cognitive decline and neurodegenerative diseases.
The unusual research looked at people aged 4 to 91 years old, and asked them to perform a series of online tasks, such as coin flips and picking cards from a deck. The study found that the ability to behave randomly peaked at age 25, on average, and from that point on, their ability declined.
Published in PLOS Computational Biology, the European study saw Nicolas Gauvrit and colleagues at the Algorithmic Nature Group, LABORES for the Natural and Digital Sciences, Paris, assess more than 3400 people.
Each participant performed a series of online tasks that assessed their ability to behave randomly.
Five tasks included listing the hypothetical results of a series of 12 coin flips so that they would "look random to somebody else", guessing which card would appear when selected from a randomly shuffled deck, and listing the hypothetical results of 10 rolls of a dice.
"This experiment is a kind of reverse Turing test for random behaviour, a test of strength between algorithms and humans," Hector Zenil, study co-author said.
Dr Gauvrit said "25 is, on average, the golden age when humans best outsmart computers".
The scientists analysed participants' choices according to their algorithmic randomness, based on the idea that patterns that are more random are harder to summarise mathematically.
After controlling for characteristics such as gender, language and education, they found that age was the only factor that affected the ability to behave randomly.
The study also demonstrated that a relatively short list of choices, such as 10 hypothetical coin flips, can be used to reliably gauge randomness of human behaviour.