To make sure that the babies were not just more attracted by the colour yellow in some trials, the researchers also used green, red balls.
Even babies can estimate the probability of an event, say scientists who suggest that our ability to analyse risks and benefits of any action begins to develop when we are just six months old.
Scientists at the Max Planck Institute for Human Cognitive and Brain Sciences (MPI CBS) in Germany and the University of Uppsala in Sweden showed that six-month-old babies can estimate probabilities.
The babies already succeed in determining which colour makes up the majority of the balls and therefore which one is more likely to be drawn.
"Six months seems to be the minimum age at which infants start to deal with probability information. One previous study showed that babies at just four months old were not able to perform this task and therefore seemed to not yet be sensitive to this information," said Ezgi Kayhan, neuroscientist at MPI CBS.
"We suppose that from early on in life, our brains represent statistics of the environment. Within the first six months of life, babies are able to extract information about which events follow on from each other, or how likely one event is compared to another," said Kayhan.
The neuroscientists investigated these relations by presenting animated film clips to 75 babies aged six, twelve and 18 months.
These short movies featured a machine filled with balls, most were blue, some yellow, which in a second sequence ejected lots of the mainly available blue balls into one basket, and into another container mainly yellow balls.
In this context it was 625 times less likely that the machine chose yellow balls instead of blue.
Therefore, the basket being filled with mainly yellow balls was a very unlikely event.
While the babies watched the movies the scientists observed them using the so-called eyetracking method to see which of the two baskets they looked at for longer - the likely or the unlikely option.
"We noticed that the infants stared longer at the unlikely option independently from the tested age group to which they belonged - presumably because they were surprised that it was just made up of the rare yellow balls and that it was therefore a very improbable event," said Kayhan.
To make sure that the babies were not just more attracted by the colour yellow in some of the trials, the researchers also used green and red balls.