# Number of events in Poisson process, nondisjoint time intervals

Let X,Y be the number of 'successes' in a poisson process with parameter $\lambda$ in the time intervals $I_1,I_2$. Compute the expectation $E(XY)$.

If $I_1, I_2$ are disjoint then it is simply $E(X)E(Y)=\lambda |I_1|\lambda|I_2|$.

But in general X,Y are not independent, so we invoke the direct formula $E(XY)=\sum_{x,y} xyP(X=x,Y=y)$, but then how should I find the mutual distribution? The definition only regards disjoint intervals, and I'm not sure how splitting would work.

Outline: Let $J$ be the intersection of the intervals $I_1$ and $I_2$. Let $J_l=I_1\setminus J$ and $J_2=I_2\setminus J$.
Then $X=S_1+S$ where $S_1$ is the number of successes in $J_1$ and $S$ is the number of successes in $J$. Similarly, $Y=S_2+S$.
Expand the product $(S_1+S)(S_2+S)$. The expectations of three of the terms can be computed by independence, while the expectation of $S^2$ is a standard Poisson distribution fact.