Suppose that Y has a binomial distribution with parameters n and p but that p varies from day to day according to a beta distribution with parameters α and β. Show that
A. E(Y)= nα/(α+β)
B. V(Y)= (nαβ(α+β+n))/((α+β)2(α+β+1)