Suppose that travelers arrive to a train station according to a Poisson process with rate $\lambda$. If a train departs at time $t$, we may find the expected sum of the waiting times of travelers arriving in the time interval $(0,t)$. In other words, we can find:
$$ E\left[\sum_{i=1}^{N(t)}(t-S_i)\right] $$
where $S_i$ is the arrival time of the $i$th traveler.
I know that the standard way to handle this is by conditioning. I am able to use the property of a Poisson Process being related to Uniform Order Statistics to obtain:
$$ E\left[\sum_{i=1}^{N(t)}(t-S_i) \mid N(t) = n\right] = \frac{nt}{2} $$
However, given this result, how can I formally show that:
$$ E\left[\sum_{i=1}^{N(t)}(t-S_i) \right] = \frac{t}{2}E[N(t)] = \lambda \frac{t^2}{2} $$?
It looks like the law of conditional expectations is at play, but I cannot obtain the right form, as it looks like taking expectations to the second equation results in:
$$ E\left[E\left[\sum_{i=1}^{N(t)}(t-S_i) \mid N(t) = n\right]\right] = E\left[\frac{nt}{2}\right] = \frac{nt}{2} $$
which is not what we want as the random variable $N(t)$ doesn't appear. How can we get the right form? Thanks!
Using $$ E\left[\sum_{i=1}^{N(t)}(t-S_i) \mid N(t) = n\right] = \frac{nt}{2}, $$ You can compute $$ E\left[\sum_{i=1}^{N(t)}(t-S_i)\right] = \sum_{n\geq 0} E\left[\sum_{i=1}^{N(t)}(t-S_i) \mid N(t) = n\right] \times P[N(t)=n], $$ using the Poisson distribution.