# Finding $E\left(\frac{X_1 + X_2}{2}\mid X_1+\cdots+X_n=y_1\right)$ where $X_i$'s are i.i.d Binomial$(1,\theta)$

Let $$X_1,X_2,\ldots,X_n\,, n > 2$$ be a random sample from the binomial distribution $$b(1, \theta)$$.

I have shown $$Y_1 = X_1 + X_2 + \cdots + X_n$$ is a complete sufficient statistic for $$\theta$$ and $$Y_2 = \frac{X_1 + X_2}{2}$$ is unbiased estimator of $$\theta$$.

The question ask also to find $$E(Y_2\mid Y_1 = y_1)$$

So I am thinking to find the conditional distribution then find the expectation.

\begin{align} P(Y_2=y_2\mid Y_1=y_1)&=\frac{P(Y_2=y_2,Y_1=y_1)}{P(Y_1=y_1)} \\\\&=\frac{P(Y_2=y_2)P(Y_1-Y_2=y_1-y_2)}{P(Y_1=y_1)} \end{align}

But I do not know the distribution of $$Y_2 = (X_1 + X_2)/2$$.

The question from Introduction to Mathematical Statistics Hogg 7ed page 401 problem 11.

• Please learn some basic MathJax here for typsetting math on this site. – StubbornAtom Sep 29 '18 at 7:14

You do not need the distribution of $$Y_2$$ to find the conditional expectation.

Since $$\sum_{i=1}^n X_i\sim b(n,\theta)$$ , and $$X_1$$ and $$\sum_{i=2}^n X_i$$ are independently distributed, we directly get

\begin{align} E(X_1\mid Y_1=y_1)&=P(X_1=1\mid Y_1=y_1) \\\\&=\frac{P(X_1=1)P\left(\sum_{i=2}^n X_i=y_1-1\right)}{P\left(\sum_{i=1}^n X_i=y_1\right)} \\\\&=\frac{\theta\binom{n-1}{y_1-1}\theta^{y_1-1}(1-\theta)^{n-y_1}}{\binom{n}{y_1}\theta^{y_1}(1-\theta)^{n-y_1}} \\\\&=\frac{\binom{n-1}{y_1-1}}{\binom{n}{y_1}}\\\\&=\frac{y_1}{n}=\bar x \end{align}

So, once again,

\begin{align} E\left(\frac{X_1+X_2}{2}\mid Y_1=y_1\right)&=\frac{1}{2}\left(E(X_1\mid Y_1=y_1)+E(X_2\mid Y_1=y_1)\right) \\&=\frac{1}{2}(\bar x+\bar x)=\bar x \end{align}

• Of course, symmetry arguments (more precisely, exchangeability) give instantly the result (as explained several times on the site). – Did Sep 29 '18 at 18:08

$$P(Y_2 = y_2) = P(X_1 + X_2 = 2 y_2) = \binom{2}{2y_2} \theta^{2 y_2} (1-\theta)^{2 - 2y_2}$$ for $$y_2 \in \{0, 1/2, 1\}$$.

You do not need the biniomal knowledge. In general, if the $$X_i$$ are i.i.d. with any distribution with finite expectation, then clearly $$E\left[X_1+\cdots+X_n \mid X_1+\cdots+X_n=y\right] = y$$, so by symmetry and exchangeability

$$E\left[X_i \mid X_1+\cdots+X_n=y\right] = \frac1ny$$

and thus with $$n \ge 2$$ $$E\left[\tfrac{X_1+X_2}{2} \mid X_1+\cdots+X_n=y\right] = \frac1ny$$ too