TITLE: If $X_i$ are iid, finding $E(X_1 + X_2 + \cdots + X_k \mid X_1 + X_2+ \cdots +X_n=b)$
QUESTION [5 upvotes]: I just wonder if anybody can help me to prove the following identity:

Given a series of i.i.d. non-negative random variables $X_1, X_2, ..., X_n$, then $$E(X_1+X_2+ \cdots +X_k \mid X_1+X_2+ \cdots +X_n=b)=b \cdot \frac{k}{n} .$$

REPLY [8 votes]: You can reduce yourself to the case where $k = 1$ because the expectation is a linear operator. 
Since $X_i$'s are i.i.d.,
$$
\mathbb E(X_i \, | \, X_1 + \dots + X_n = b )
$$
does not depend on $i$ (as long as $1 \le i \le n$). Thus
$$
n \, \mathbb E \left( X_i \, \left| \sum_{i=1}^n X_i = b \right. \right) 
 = \sum_{i=1}^n \, \mathbb E \left(X_i \, \left| \, \sum_{i=1}^n X_i = b \right. \right) = \mathbb E \left( \sum_{i=1}^n X_i \, \left| \, \sum_{i=1}^n X_i = b \right. \right) = b
$$
so that 
$$
\mathbb E \left( X_i \, \left| \sum_{i=1}^n X_i = b \right. \right) = \frac bn.
$$ Your case can then be solved by linearity of expectation.
Hope that helps,