# expectation value of the sum of random variables with conditions.

Let $X_1, X_2, \cdots, X_n$ be independent and identically distributed Poisson random variables and define the partial sums $S_n = X_1 + X_2 + \cdots + X_n$.

I would like to calculate the expectation value $E(S_n)$ where I count only $X_i > A$ (A = const) and skip $k=2$ next random variables in the sum after the event $X_i > A$ occurs (no matter they are greater or smaller than A).

Assume $n\geq 2$. Let $p=P(X_i\leq A) = \sum_{j=0}^{A}{\dfrac{\lambda^j}{j!}e^{-\lambda}},\;$ and let $q = \sum_{j=A+1}^{\infty}{\dfrac{\lambda^j}{(j-1)!}e^{-\lambda}}$.
For each $j$, if $X_j$ "counts" then it contributes amount $q$ to the required expectation.
\begin{eqnarray*} X_1 && \text{ counts if $X_1\gt A$} \\ X_2 && \text{ counts if $X_1\leq A$ and $X_2 \gt A$} \\ X_j && \text{ counts if $X_{j-2}\leq A$ and $X_{j-1}\leq A$ and $X_j \gt A$, for $j\geq 3$.} \\ \end{eqnarray*}
• Thank you very much for your reply! One maybe a bit stupid question: It is not clear for me how do you pass from expectation to probability. I mean that you have only probabilities from the right side (p) and expectation from the left (E($S_n$)). Should it be E($X_i$|$X_i>A$) somewhere in the right side? – poisson_fish Apr 16 '15 at 12:08
• @poisson_fish Sorry, you are right about that. I've revised my answer accordingly. I don't think there is any simple expression for variables $p$ or $q$ unfortunately. – Mick A Apr 16 '15 at 13:02