Homepage › Solution manuals › Kevin P. Murphy › Machine Learning: a Probabilistic Perspective › Exercise 3.2 - Marginal likelihood for the Beta-Bernoulli model
Exercise 3.2 - Marginal likelihood for the Beta-Bernoulli model
Answers
This exercise continues the discussion of the toy coin-toss experiment, so we borrow all symbols from the exercise above. The likelihood takes the form:
The prior distribution of takes the form:
where we adopt in the hope of eliminating the ambiguity of using , which, although simplifies the symbolization, results in countless errors.
The posterior distribution takes the form:
The first step is the straightforward Bayesian rule, the second is the Markov property. In the last step, we adopt the equations before. Since should be normalized w.r.t. , it has to be a Beta distribution with hyperparameters . We can now derive the evidence of w.r.t. and explicitly. The normalization of indicates that:
so:
where is the normalization factor for the Beta distribution. This is enough for deriving (3.80) by recalling the normalization of Beta distribution. The value of can help us select proper hyperparametes.
As for prediction:
The first step is the Bayesian rule, the second is Markov property. The rest is straightforward algebra.
Concretely, we calcualte where :
Rename the variables , we have (3.83). To derive (3.80), we make use of: