The range of problems for which an analytic solution is possible is limited and depends on the choice of the model (leading to a tractable likelihood function) and prior.
A simple model assumes that the data is a random sample, of size , from some distribution having density function with
If a prior is chosen from some family , say , the choice of being regarded as part of the model specification, the posterior is given by
If is also a member of , say
where the parameter is a function of only and then the family is said to be closed under sampling, with respect to the density , (Barnard, 1949). The prior is called a conjugate prior for (see Smith and Bernardo, 1994, p. 265).