Bayes’ theorem and its applications in animal behaviour