We show how to use computer algebra for computing exact distributions on nonparametric statistics. We give several examples of nonparametric statistics with explicit probability generating functions that can be handled this way. In particular, we give a new table of critical values of the Jonckheere-Terpstra test that extends tables known in the literature