In: Math
Now let's use Bayes' theorem and the binomial distribution to address a Bayesian inference question. You toss a bent coin N times, obtaining a sequence of heads and tails. The coin has an unknown bias f of coming up heads. (a) If NH heads have occurred in N tosses, what is the probability distribution of f? Assume a uniform prior P(f) = 1 and make use of the following result: integral 0 to 1 f^a (1 - f)^b df = a!b! / (a + b + 1)! (b) Sketch (or plot) the shape of the probability distribution of f for N = 5 and NH = 2. (c) Now derive a formula for the most probable value of f (the most probable value of f, denoted f ', is the value of f that maximizes the probability distribution in (a)). What is f ' for N = 5 and NH = 2. Hint: maximize log P(f | NH, N) rather than P(f | NH, N).