Consider a sequence of $n$ Bernoulli trials with $P(\text{success})=p$. Let $X_i$ and $X_j$ be indicator variables of the number of "success" in $i$th and $j$th runs. Given the total number of success was $m$, $m<n$. I am asked to compute the correlation coefficient for $X_i$ and $X_j$.
Now I know the formula for correlation coefficient, but to compute the co-variance I will need to find $E(X_i)$ and $E(X_j)$ first. By definition does $E(X_i)=p_i$ and $E(X_j)=p_j$? I feel this seems a bit too easy but I can't see whats wrong with it.
Yes, you are correct. For a discrete random variable $X$ the expected value is equal to $$ \sum_{k \in \mathbf{Z}} k \Pr(X=k), $$ which is simply $\Pr(X=1):= p$ for the Bernoulli case.