One generalization of the Bernoulli trials hierarchy is to allow the probability of success probability to vary across trials. Let (Xi,Pi), i = 1,...,n be independent random vectors with
Xi|Pi ~ Bernoulli(Pi),i=,1...,n Pi~ Beta(a,3)
Consider a random variable of interest Y = En-1 X, the total of number of successes.
(a) Show that E(Y)=na/(a+3).
(b) Show that Var(Y) = na/(a + 3)2, and hence Y has the same mean and variance as a binomial(n,/( + )) random variable. What is the distribution of Y?