a question about the interchange of the expected value and infinite summation Assume $\tau_{k}$ are positive i.i.d. random variables, $\xi_{k}=\xi_{k-1}+\tau_{k}$, $\xi_{0}$ is a given real number, $\chi_{A}$ is index function, $b_{k}$ are continuous functions, and $x_{0}$ is a given positive real number. I wonder if the following formula holds and, if it does, why: $$E\left(\sum_{k=0}^{+\infty}\prod_{i=1}^{k}(1+b_{i}(\tau_{i}))\chi_{[\xi_{k},\xi_{k+1})}(x_{0})\right)=\sum_{k=0}^{+\infty}E\left(\prod_{i=1}^{k}(1+b_{i}(\tau_{i}))\chi_{[\xi_{k},\xi_{k+1})}(x_{0})\right)$$

The expectation of a sum of nonnegative random variables indexed by the integers is equal to the sum of the expectations, whether the resulting number is finite or infinite. This follows from Fubini's theorem for nonnegative functions (often called Tonelli's theorem) applied to the product measure which is the product of $P$ by the counting measure on the integers. If all your functions $1+b_i$ are nonnegative you are done and the continuity hypothesis is not useful. Otherwise you have to check the hypothesis of Fubini's theorem itself, that is, the convergence of the series of the expectations of the absolute values of the random variables involved.
