Risk and posterior expectation Bayesian Statistics 
Consider $x\sim B(n,\theta)$ with $n$ known
a)If $\pi(\theta)\sim Beta(\sqrt{n}/2,\sqrt{n}/2)$ give the associated
  posterior distribution and posterior expectation $\delta^\pi(x)$
b)Show that, when $L(\theta,\delta)=(\theta-\delta)^2$, the risk of
  $\delta^\pi$ is constant.

What I did
a) $$\pi(\theta|x)\propto f(x;\theta)\pi(\theta)$$ $$\pi(\theta|x)\propto \theta^{\sum x_i}(1-\theta)^{\sum(1-x_i)}\theta^{\frac{\sqrt{n}}{2}-1}(1-\theta)^{\frac{\sqrt{n}}{2}-1}$$
$$\pi(\theta|x)\propto \theta^{\sum x_i+\frac{\sqrt{n}}{2}-1}(1-\theta)^{\sum x_i+\frac{\sqrt{n}}{2}-1}$$ $$\pi(\theta|x)\sim Beta(a=\sum x_i+\frac{\sqrt{n}}{2},B=\sum (1-x_i)+\frac{\sqrt{n}}{2})$$
$$E[\pi(\theta|x)]=\frac{a}{a+B}=\frac{\sum x_i+\frac{\sqrt{n}}{2}}{n+\sqrt{n}}$$
b)$$R(\theta,\delta)=E_\theta[L(\theta,\delta(x)]$$
the expectation of quadratic loss is not the same what I found above? Since $n$ is know that would be constant.
 A: To establish (b), you need to express
$$R(\theta,\delta)=\mathbb{E}_\theta[L(\theta,\delta(x)]=\mathbb{E}_\theta[(\theta-\delta(x))^2]$$which amounts to
$$R(\theta,\delta)=\mathbb{E}_\theta[(\theta-\mathbb{E}_\theta[\delta(x)])^2]+\mathbb{E}_\theta[(\mathbb{E}_\theta[\delta(x)]-\delta(x))^2]$$by the well-known decomposition of
$$\text{squared error}=\text{bias}^2+\text{variance}$$
and
$$\begin{align*}\mathbb{E}_\theta[(\theta-\mathbb{E}_\theta[\delta(x)])^2]&=
\mathbb{E}_\theta\left[\left(\theta-\mathbb{E}_\theta\left[\frac{\sum x_i+\sqrt{n}/2}{n+\sqrt{n}}\right]\right)^2\right]\\
&=\frac{\mathbb{E}_\theta\left[\left((n+\sqrt{n})\theta-\mathbb{E}_\theta\left[\sum x_i+\sqrt{n}/2\right]\right)^2\right]}{(n+\sqrt{n})^2}\\
&=\frac{\left(\sqrt{n}\theta-\sqrt{n}/2\right)^2}{(n+\sqrt{n})^2}\\
&=\frac{n(\theta-1/2)^2}{(n+\sqrt{n})^2}\\
&=\frac{(\theta-1/2)^2}{(1+\sqrt{n})^2}
\end{align*}$$
while
$$\begin{align*}\text{var}(\delta(X))&=\frac{\text{var}(\sum x_i)}{(n+\sqrt{n})^2}\\
&=\frac{n\theta(1-\theta)}{(n+\sqrt{n})^2}\\
&=\frac{\theta(1-\theta)}{(1+\sqrt{n})^2}
\end{align*}$$
Hence
$$\begin{align*}R(\theta,\delta)&=\frac{(\theta-1/2)^2+\theta(1-\theta)}{(1+\sqrt{n})^2}\\
&=\frac{\theta^2-\theta+1/4+\theta-\theta^2}{(1+\sqrt{n})^2}\\
&=\frac{1/4}{(1+\sqrt{n})^2}\end{align*}$$
which indeed is constant in $\theta$.
