Maths is useful for everyone, not just humans. To be successful in your hunting and foraging, and to keep track of your family members and predators, you need to be able to gauge quantities, which is why numerical ability developed early on in evolution. Many animals, including some fish and insects, use some sort of understanding of quantities to navigate their lives.
A capuchin monkey.
That's a very basic type of maths, but what about something a little more sophisticated, such as, for example, probabilities? A recent study with capuchin monkeys addressed this question, and seems to suggest that, at least some of them, have an intuitive grasp of chances.
To understand probabilities it's not enough to understand absolute quantities. Suppose I show you a jar containing 100 peanuts and 100 pebbles, and another jar containing 7 peanuts and 3 pebbles. If all you understood were absolute quantities, and I gave you the chance to pick one item from one of the jars, you'd go for the first jar: many more peanuts in that one. However, the chance of picking a peanut is much higher for the second jar, and that's the one you should have chosen. What's important here are proportions (eg 100 out of 200 versus 7 out of 10) and understanding how they link to the act of randomly picking an item from a bigger collection.
Such an understanding seems a lot harder than basic counting, and scientists used to think that children don't develop it until they are about seven. Recent studies have shown, however, that even 12-month-old babies have basic probabilistic abilities. The same goes for all four species of great apes: orangutans, gorillas, bonobos and chimpanzees.
Monkeys are the obvious next step when it comes to seeing whether probabilistic abilites are shared by animals further removed from humans. Capuchin monkeys are particularly interesting because, being new world monkeys, their genetic lineage split off from that of humans over 30 million years ago. If a genetic trait that's shared by humans and capuchins comes from a common ancestor, then it must be very, very old.
A monkey making its choice. (The monkeys that took part in the study did't have to live in these little cubicles, they only came into them for the chance of a treat.) Video from Springer, Animal Cognition, Intuitive Probabilistic Inference in Capuchin Monkeys, 2016, Tecwyn, E.C., Denison, S., Messer, E.J.E. et al., with permission of Springer.
To test the monkeys' probabilistic finesse, the researcher set up a peanut lottery similar to the example above. Monkeys were shown two glass jars containing a mixture of peanuts, which they like a lot, and monkey pellets, which they don't like as much. A researcher then shook each jar and pretended to pick one item from each (in fact she already had an item concealed in each hand but the monkeys didn't know that). To convice the monkeys that the choice was random, she closed her eyes and tilted her head upwards while she was doing the picking. She then held her closed fists out for the monkey to pick one. Some of the time she crossed her arms over first, to check if the monkeys were really picking a hand, rather than just the side that corresponded to their preferred jar.
Some of the monkeys clearly didn't bother with thinking about probabilities: they always picked the the same side, no matter what. Among the others, however, the researchers claim to have detected a trend to go for the hand with the better chance of a peanut. This, they say, is evidence that at least some capuchin monkeys intuitively understand proportions and what they mean for the chance of getting a peanut.
This is the first time that a "capacity for rudimentary intuitive statistics" appears to have been found in monkeys. If the capuchin monkeys really do possess it, then this might mean that the ancestor they share with humans did too, which would mean that the trait is ancient. It could of course be that the two lineages developed the capacity independently. More studies will be needed to find out.