Calculating the risk of an estimator using zero-one loss 
Consider two observations where
  $$P_\theta(x=\theta+1)=P_\theta(x=\theta-1)=0.5,\ \ 
  \theta\in\mathbb{R}$$Let $\mathbb{D}=\Theta=\mathbb{R}$ the decision
  space. Suppose that the associated loss is
  $$L(\theta,\delta)=1-\mathbb{I}_\theta(\delta)$$ where $\mathbb{I}_\theta(\theta)=1$ and $\mathbb{I}_\theta(\delta)=0$ otherwise. Consider the
  following decision rules $$\delta_0(x_1,x_2)=\frac{x_1+x_2}{2}$$
  $$\delta_1(x_1,x_2)=x_1+1$$ and show that
  $$R(\theta,\delta_0)=R(\theta,\delta_1)=0.5$$ where
  $\forall\delta\in \mathbb{D},
 R(\theta,\delta)=\mathbb{E}_\theta(L(\theta,\delta))$.

I'm really lost in this exercise, I know that $$R(\theta,\delta)=\int x L(\theta,\delta(x))f(x|\delta(x))dx$$
I'm completely caught in this exercise, can someone give me a litle help?
 A: Your remark that

$$R(\theta,\delta)=\int x L(\theta,\delta(x))f(x|\delta(x))\text{d}x$$

is doubly incorrect. It should be$$R(\theta,\delta)=\int \overbrace{L(\theta,\delta(x))}^{\text{no }x}\underbrace{f(x|\theta)}_{\theta\text{ not }\delta(x)}\text{d}x$$
In this special case of yours $X$ has a finite support $\{\theta-1,\theta+1\}$, the integral is thus a sum and the risks are given by
$$\begin{align*}
R(\theta,\delta_0)&=\sum_{x_1,x_2} L(\theta,\delta_0(x_1,x_2))\mathbb{P}(X_1=x_1,X_2=x_2)\\
&=L(\theta,\delta_0(\theta+1,\theta+1))\mathbb{P}(X_1=\theta+1,X_2=\theta+1)\\
&\ +L(\theta,\delta_0(\theta+1,\theta-1))\mathbb{P}(X_1=\theta+1,X_2=\theta-1)\\
&\ +L(\theta,\delta_0(\theta-1,\theta1))\mathbb{P}(X_1=\theta-1,X_2=\theta+1)\\
&\ +L(\theta,\delta_0(\theta-1,\theta-1))\mathbb{P}(X_1=\theta-1,X_2=\theta-1)\\
&=L(\theta,\theta+1))\mathbb{P}(X_1=\theta+1,X_2=\theta+1)\\
&\ +L(\theta,\theta)\mathbb{P}(X_1=\theta+1,X_2=\theta-1)\\
&\ +L(\theta,\theta))\mathbb{P}(X_1=\theta-1,X_2=\theta+1)\\
&\ +L(\theta,\theta-1)\mathbb{P}(X_1=\theta11,X_2=\theta-1)\\
&=.25\{\mathbb{I}_{\theta\ne\theta+1}+\mathbb{I}_{\theta\ne\theta}+\mathbb{I}_{\theta\ne\theta}+\mathbb{I}_{\theta\ne\theta-1}\}\\
&=.5
\end{align*}$$
and
$$\begin{align*}
R(\theta,\delta_1)&=L(\theta,\delta_1(\theta+1))\mathbb{P}(X=\theta+1)+L(\theta,\delta_1(\theta-1))\mathbb{P}(X=\theta-1)\\
&=.5\{L(\theta,\delta_1(\theta+1))+L(\theta,\delta_1(\theta-1))\}
\\&=.5\{\mathbb{I}_{\theta\ne\delta_1(\theta+1)}+\mathbb{I}_{\theta\ne\delta_1(\theta+1)}\}\\
&=.5\{\mathbb{I}_{\theta\ne\theta+2}+\mathbb{I}_{\theta\ne\theta}\}\\
&=.5
\end{align*}$$
In conclusion, both estimators are sharing the same risk. 

There exists another estimator $\delta_2(X_1,X_2)$ that achieves a risk of $0.25$, can you find it?

A: Here $L(\theta, \delta)$ is called the zero-one loss function because the loss is zero when you estimate $\theta$ exactly, otherwise the loss is one.  As the problem states the risk is just the expected value of this function taken with respect to the distribution of our estimator which for zero-one loss simplifies nicely to a probability
\begin{align}
R(\theta, \delta) &= \text{E}_\delta[L(\theta, \delta)] \\
&= P(\delta \neq \theta) .
\end{align}
So all you need to show is that $\delta_1$ and $\delta_0$ are right half the time based on the two observations $X_1$ and $X_2$.  For $\delta_0$ notice that this estimator will equal $\theta$ if and only if $X_1 \neq X_2$ which you can verify will happen half the time.  $\delta_1$ will equal $\theta$ if only if $X_1 < \theta$ which again happens half the time, and you are done.
