y is the number of successes in n trials, with a binomial(n, pi) distribution
the prior distribution for pi is Beta(1,1)
the Bayesian estimator for pi is the posterior mean, pi[b]
pi[b] = a' / (a' + b')
where a' and b' are the coefficients of the posterior distribution for pi, which is Beta(a', b') = Beta(a+y, b+n-y) = Beta[1+y, 1+n-y)
therefore pi[b] = (1+y) / (n+2)
the mean pi[b] over an infinite number of random samples is therefore (1+n*pi) / (n+2)
so the bias of the Bayesian estimator pi[b] is equal to ((1+n*pi) / (n+2)) - pi
where I get stuck is calculating the variance of pi[b]
the answer is ((1/n+2)^2)*n*pi*(1-pi)
I've got no idea how to get there, though I recognize n*pi*(1-pi) as the variance of y given the binomial (n, pi)