Consider one random variable X from the Bernoulli distribution with parameter θ. Let p, the prior density, be equal to 6θ(1 − θ), for θ ∈ (0, 1).
Under squared error loss, L(t, θ) = (t − θ)$^2$, the Bayes estimator is equal to the expectation of the posterior distribution:
$$p_{\theta|x}(\theta) = \frac{f(x|\theta)p(\theta)}{\int_0^1f(x|\theta)p(\theta)d\theta} = \frac{\theta^x(1-\theta)^x\cdot6\theta(1-\theta)}{\int_0^1\theta^x\cdot6\theta(1-\theta)d\theta} $$
How to find the expectation of this distribution?
The conditional distribution given $\theta$ of $X$ is $P(X=1/\theta)=\theta$ and $P(X=0/\theta) = 1-\theta$ Then we have $$ P(X= 1) = \int P(X=1/\theta)f(\theta)d\theta = .5 $$ and $P(X=0) = .5$.
$$ f_{\theta/X = 0}= \frac{f(X=0/\theta)f(\theta)}{P(X=0)} = 12\theta(1-\theta)^2 $$ and $$ f_{\theta/X =1} = 12\theta^2(1-\theta) $$
From that the $E[\theta/X = 0] = 12/30$ and $E[\theta/X = 1] = 12/20$.