Suppose customers arrive at a system as a Poisson process with rate $\lambda$, given a specific time interval $[0,t]$, what is the expected wait times for those customers who arrive in this interval?

To clarify, let the number of customers arriving in $[0,t]$ be $N$, and their arrival times are $T_1, T_2, \cdots, T_N$ respectively where $0\le T_1, T_2, \cdots, T_N\le t< T_{N+1}$. For each of them, the wait time within the interval $[0,t]$ is $t-T_i$. The average wait time is, $$\bar{W}=\frac{\sum^N_1{t-T_i}}{N}$$

Since $N$ is an r.v., so is $\bar{W}$. The expectation of $\bar{W}$ is $$E[\bar{W}]=\sum^\infty_1 \bar{W}(N,t)\cdot p(N)$$

However $T_i$'s are r.v.'s too, it turns out to be kind of complicated for me. Could someone help me out? thanks.

  • $\begingroup$ It is not clear to me what you mean by wait times. Usually “waiting times” in a Poisson process refer to the inter-arrival times $T_{i+1}-T_i$ which are exponentially distributed with mean $1/\lambda$ but you seem to be asking about the time from arrival of customer $i$, $T_i$, until the end of the observed time $t$: $Y_i:=t-T_i$. Do I have that right? Just wanted to clarify. $\endgroup$ – Nap D. Lover Jan 23 at 18:28
  • 1
    $\begingroup$ Symmetry suggests $\frac{t}2$ as the expected waiting time until $t$ $\endgroup$ – Henry Jan 23 at 18:33
  • $\begingroup$ @LoveTooNap29 yes, your clarification is correct, thanks for that. $\endgroup$ – Guoyang Qin Jan 23 at 19:10
  • 1
    $\begingroup$ @Henry Symmetry is a point of view. But can we derive it analytically? $\endgroup$ – Guoyang Qin Jan 23 at 19:12
  • $\begingroup$ So, conditional on $n$ customers, $Y_1+\dotsc +Y_n=nt-(T_1+\dotsc +T_n)$ hence the sample mean is $\bar{Y}_n=t-\frac{1}{n}(T_1+\dotsc +T_n)$ which has (conditional) expectation $\mathbb{E}(\bar{Y}_n | N_t=n)=t-\frac{n+1}{2\lambda}$. The unconditional mean is then given by the LTE and is $$\mathbb{E}(\bar{Y}_{N_t})=\mathbb{E}\mathbb{E}(\bar{Y}_n | N_t=n)=\frac12 \left(t-\frac{1}{\lambda}\right).$$ I am commenting this rather than answering because I am little worried that you get a negative time whenever you observe time intervals smaller than the mean waiting time, so maybe I made a mistake... $\endgroup$ – Nap D. Lover Jan 23 at 20:45

EDIT Here is an updated version which matches the result from symmetry in the comment on the OP:

Let $N_t \sim Pois(\lambda t)$ and condition on the event of $n$ arrivals in time $(0,t]$, i.e. $N_t=n$. Then it is relatively well known that the arrival times, $T_i$, are distributed like the order statistics of $n$ uniformly distributed RVs on $(0,t]$. That is $T_i \sim U_{(i)}$ where $U_{(i)}$ is the $i$-th order statistics of $n$ IID $\mathcal{U}(0,t)$ RVs, $U_1,\dotsc, U_n$ (e.g. $U_{(1)}:=\min\{U_1,\dotsc, U_n\}$, $U_{(n)}:=\max\{U_1,\dotsc, U_n\}$ and $U_{(i)}$ is the $i$-th smallest number of $\{U_1,\dotsc, U_n\}$).

Thus, we have $\mathbb{E}(T_i | N_t=n)=\mathbb{E}(U_{(i)})$, so it remains to compute these means in order to compute the expectation of $\bar{Y}_n=t-\frac{1}{n}(T_1+\dotsc +T_n).$ I will write out the full computation of $\mathbb{E}(U_{(1)})$ since by your comment these order statistics are unfamiliar but I will leave the rest for you to go through yourself.

So, simply by the definition of minimum we have the following set equality, $$\{U_{(1)} \geq u\}=\{U_1 \geq u, \dotsc, U_n \geq u\},$$ hence, by the fact that all the $U_i$ are IID, $$\mathbb{P}(U_{(1)}\geq u)=\mathbb{P}(U_1 \geq u)^n=(1-u/t)^n.$$

Now we use the wonderful fact that for every non-negative random variable $X$, we may compute the expected value in an alternate fashion, as $\mathbb{E}(X)=\int \mathbb{P}(X\geq x) \mathrm{d}x,$ (omitting limits of integration for brevity), so that in this case, $$\mathbb{E}(U_{(1)})=\int_0^t (1-u/t)^n \mathrm{d}u=\frac{t}{n+1}.$$

Using an analogous argument we can compute $\mathbb{E}(U_{(n)})=\frac{nt}{n+1}$. Then, further, I claim $\mathbb{E}(U_{(i)})=\frac{it}{n+1}$ for all $i=1,2,\dotsc,n$. Thus, we see that (after some algebra) $$\mathbb{E}(T_1+\dotsc+T_n |N_t=n)=\mathbb{E}(U_{(1)}+\dotsc+U_{(n)})$$ $$=\frac{nt}{2},$$ from which it immediately follows that $\mathbb{E}(\bar{Y}_n | N_t=n)=t-\frac{t}{2}=\frac{t}{2}$. Now since this is just a constant independent of $N_t=n$, we finally get by the law of total expectation, $$\mathbb{E}(\bar{Y}_{N_t})=\mathbb{E}\mathbb{E}(\bar{Y}_{N_t} | N_t)=\frac{t}2,$$ just as user @Henry claimed by symmetry.

Original answer that is incorrect

So, conditional on $N_t=n$ customers, $Y_1+\dotsc+Y_n=nt-(T_1+\dotsc+T_n)$, hence the sample mean is $\bar{Y}_n=t-\frac{1}{n}(T_1+\dotsc+T_n)$, which has conditional expectation $\mathbb{E}(\bar{Y}_n | N_t=n)=t-\frac{n+1}{2\lambda}.$ Here, we used the fact that $$\mathbb{E}(T_1+\dotsc+T_n)=\frac{1}{\lambda}+\frac{2}{\lambda}+\dotsc+\frac{n}{\lambda}=\frac{1}{\lambda}(1+2+\dotsc +n)=\frac{n(n+1)}{2\lambda}.$$ That is to say, conditional on knowing $N_t$, $\mathbb{E}(\bar{Y}_{N_t} | N_t)=t-\frac{N_t+1}{2\lambda},$ (conditional expectations are, in fact, RVs!).

Hence, upon taking the expectation with respect to $N_t$, we get, by the law of total expectation, $$\mathbb{E}(\bar{Y}_{N_t})=\mathbb{E}\mathbb{E}(\bar{Y}_{N_t} | N_t)=t-\frac{1}{2\lambda}\mathbb{E}(N_t+1)=\frac12 \left(t-\frac{1}{\lambda}\right),$$ just using $\mathbb{E}(N_t)=\lambda t$ and linearity.

  • $\begingroup$ Thanks, it is very clear. This result proves that the symmetry view which says the expectation is just half the total time interval $t/2$ doesn't hold here. Do you have any comment about why this happens? $\endgroup$ – Guoyang Qin Jan 24 at 1:17
  • 1
    $\begingroup$ @GuoyangQin Actually now that you mention it, I think I made a mistake. Conditional on $N_t=n$ the arrival times $T_i$ for $i=1,2,\dots,n$ are distributed like the order statistics of $n$ uniform RVs in $(0,t]$ and I'd bet for sure those means are different than what I wrote, which are the unconditionally $\Gamma(i,\lambda)$-distributed means, for instance $\mathbb{E}(T_1|N_t=1)=\mathbb{E}(U)=t/2$. You may want to un-accept this answer while I work this out and edit it. Sorry... $\endgroup$ – Nap D. Lover Jan 24 at 1:56
  • 1
    $\begingroup$ It's OK. As you mentioned the order statistics of $n$, it reminds me of this I read in the book Fundamentals of Queueing Theory (5ed, Donald Gross, p43) - "Theorem 2.9 Let $N(t)$ be a Poisson process. Given that $k$ events have occurred in a time interval $[0, T]$, the times $\tau_1<\tau_2<\cdots<\tau_k$ at which the events occurred are distributed as the order statistics of $k$ independent uniform random variables on $[0,T]$." However, I didn't have a good understanding of this since I didn't understand "the order statistics of $k$". Looking forward to your revision. Thanks. $\endgroup$ – Guoyang Qin Jan 24 at 2:11
  • 1
    $\begingroup$ @GuoyangQin Well it took some time but the answer is now updated and matches the other comments result given by symmetry. I am willing to elaborate a little further for small clarifications—but if you have significant questions on either the fact you quote from Donald Gross's Queueing theory used here in the new answer or on order statistics in general—I suggest it warrants an entirely new question. Thanks for your patience! $\endgroup$ – Nap D. Lover Jan 24 at 3:59
  • $\begingroup$ Really appreciate it. It has well addressed my problem. $\endgroup$ – Guoyang Qin Jan 24 at 18:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.