Statistical tests of proportions for Prolog