A coin has probability p of landing heads up (H), where p is unknown. We can think of p as a random variable P and summarise our prior knowledge of its value with the Beta distribution T (P) = P(P = p) = pa-1 (1-p)³-1 B(a, B) which has mean a/(a + 3). Here B(a, B) is the Beta function which normalizes the distribution. In Bayesian inference we combine prior beliefs with data (₁,...,n) to obtain a posterior distribution T(p) x L(P)T(P) where L(p) = II, f(xp), and f(xp) is the probability function of X given pa- rameter p. (a) In our coin toss example, define the random variable 1 if H x-{ X = = 0 if T Write down the PMF of X. (b) Derive the likelihood function of a series of n tosses in terms of 72 S = ΣX₁. i=1 (c) Derive the posterior distribution for general a, 3. Is the prior conjugate to the model? (d) Given the sequence H,H,H,H,H,T predict p using a prior with a = 3 = 2.