JuliaStats/Distributions.jl — pull request #112 by johnmyleswhite (2013-07-22 17:09:22+00:00)
Title: [WIP] Interface for Bayesian updating w/ conjugate priors

This is the start of work on an interface for Bayesian updating w/ conjugate priors. This implements the simplest cases involving Beta and Dirichlet priors. The general interface looks like:

posterior(LikelihoodAsType, PriorAsDistribution, DataAsArray)

For example, this gives:

posterior(Bernoulli, Beta(1, 1), [0, 0, 1, 1, 1, 0, 0, 0])