# Conditional expectation of product of Bernoulli random variables

Let $\epsilon_1,\ldots,\epsilon_m$ be Bernoulli random variables, i.e. $P(\epsilon_i=1)=P(\epsilon_i=-1)=\frac 12$.

I wanted to calculate (or at least approximate) the following conditional expectation: $$E\left(\epsilon^{n_1}_1 \cdots \epsilon^{n_m}_m |\sum_{i=1}^m \epsilon_i=0 \right)$$ Here $n_1+\cdots+n_m=n$, $n\in N$ and $n_j \in \{0,1,\ldots,n\}$.

Since we have condition that $\sum_{i=1}^m \epsilon_i=0$, then we can say that $m=2k$ is even.

Now, I rearrange random variables: $(\epsilon^{n_1}_1\cdots\epsilon^{n_k}_k) \left(\epsilon^{n_{k+1}}_{k+1}\cdots\epsilon^{n_2k}_{2k}\right)$ so that first $k$ of them are 1 and second $k$ of them are $-1$. Thus, $$E\left[\left(\epsilon^{n_1}_1\cdots\epsilon^{n_k}_k\right) \left(\epsilon^{n_{k+1}}_{k+1}\cdots \epsilon^{n_2k}_{2k}\right)\right]=E\left[(-1)^{\sum_{j=k+1}^{2k}n_j}\right].$$

And here I am stuck...

-
an $n_j$ went missing in the final summation! – user21436 Feb 7 '12 at 3:18
BTW, what is inside the expectation operator looks like a constant to me. So, expectation will be the same constant. Or, likely that I don't understand what's going on? So, let me ask you. expectations are calculated for random variables, what is the random variable in question? – user21436 Feb 7 '12 at 3:21
Thank you. Yes, expectation calculated for the Bernoulli random variables. Since I have assumption that their sum is 0, then the variables are not independent any more. So, I cannot use the fact for independent r.v. that expectation of product is the product of expectations. – David Feb 7 '12 at 3:47
@Robert Israel: I am sorry. I did my rown way. Eventually, I gess its the same as you suggested, but I did not understand your logic. Could you please show me your way. – David Feb 8 '12 at 4:34
I get pinged every time you ping Robert, I guess, it is because of the space between Robert and Israel. So, please ping him below his answer. I am sure he'll help you out if he's around! – user21436 Feb 8 '12 at 4:36

First of all, these are not really Bernoulli random variables, since those take the values $0$ and $1$, not $-1$ and $1$. Rather, it's $(\epsilon_i + 1)/2$ that are Bernoulli.
And you do need to assume that $\epsilon_i$ are independent (before you condition on the sum).
Of course $\epsilon_i^{n_i} = 1$ if $n_i$ is even and $\epsilon_i$ if $n_i$ is odd. So if $S = \{i: n_i \text{ is odd}\}$, you're asking for $E\left[\epsilon_S | \sum_{i=1}^m \epsilon_i = 0\right]$, where $\epsilon_S = \prod_{i \in S} \epsilon_i$. Let $T = \{i: \epsilon_i = -1\}$. If $\sum_{i=1}^m \epsilon_i = 0$, $T$ has cardinality $m/2$, and all $m \choose {m/2}$ subsets of that cardinality are equally likely to be $T$. Now given $T$, $\epsilon_S = 1$ if and only if $|S \cap T|$ is even, $-1$ if it is odd. Well, that should be enough hints for a homework problem.
I am sorry for smoll symbols. Here what I've got: I am using definition of conditional expectation through conditional probability. Probability $P=P\left(\epsilon^{n_1}_1...\epsilon^{n_m}_m| \sum_{i=1}^m\epsilon_i\right)={\frac{1}{2^{m/2}}}1/({{m \choose m/2}\frac{1}{2^{m/2}}})$. Now, $E\left(\epsilon^{n_1}_1...\epsilon^{n_m}_m| \sum_{i=1}^m\epsilon_i\right)=P\sum_{\{\epsilon_i,..., \epsilon_m\}: \sum_i\epsilon_i=0}\prod_{i=1}^m\epsilon^{n_i}_i=1/(2^{m/2}{m \choose m/2})\sum_{\{A \subset \{1,..,m\}, card(A)=m/2}\}(-1)^{\sum_{i\in A}n_i}$ – David Feb 8 '12 at 4:34