Adds functions for calculating likelihoods.