Given that people arrive according to a poisson process with rate 4 per minute and stay for $X$~Unif[0,10] number of minutes independently of the arrival times. What is the mean and variance of the number of people after 15 minutes.
I'm attempting this problem. First I noticed that anything before t=5 doesnt matter because anyone would have left who arrived before that. Then the expectation of anyone who arrives in that time period would be $\lambda10 = (4)(10) = 40$ and they all stay with for expected time of 5 minutes. So I would expect that that the epectation would be 20.
I am the same sort of of shotty reasoning for variance which would just be var(possion)*var(X) = $(4^2)(\frac{100}{12}) = \frac{400}{3}$.
However I'm having alot of trouble trying to show any of this formally
Consulting this answer: Poisson process, number of people in store by time $t$
We are only interested in the distribution of $M(t)$, so we compute this from the joint distribution of $M(t)$ and $N(t)$ by summing over all possible values of $N(t)$:
\begin{align} \mathbb P(M(t)=m) &= \sum_{n=0}^\infty \mathbb P(M(t)=m, N(t)=n)\\ &= \sum _{n=0}^{\infty } \frac{e^{-\lambda t} (\lambda (1-p) t)^m (\lambda p t)^n}{m! n!}\\ &= \frac{ ((1-p)\lambda t)^m}{m!}e^{-(1-p)\lambda t}. \end{align}
More generally, let $X\sim \mathrm{Unif}(0,\theta)$, then we compute
$$ p = \int_0^t \frac u\theta\ \mathsf du = \frac t{2\theta}, $$ so that $$ \mathbb P(M(t)=m) = \frac{((1-t/2\theta)\lambda t)^m}{m!}e^{-(1-t/2\theta)\lambda t}. $$ This is a Poisson distribution with parameter $\mu:=(1-t/2\theta)\lambda t$. The mean and variance are both given by $\mu$, so plugging in $\lambda=4$, $\theta=10$, and $t=15$ we have $15$.