[Math] Poisson, Gamma distribution example.

probabilityprobability distributionsprobability theory

Can someone explain me answer for these questions?

Suppose customers arrive at a store as a Poisson process with λ = 10 customers per hour. The Poisson process of X ∼ Poisson(λ) the time until k arrivals is Γ(k, 1/λ), with parameters α = k and β = 1/λ.

a. What is the distribution of the time until the second customer arrives ?

b. Find the probability that one has to wait at least half an hour until the second customer arrives.

Example R code:
t <- seq(0,1,0.01)
ft <- 100*t*exp(-10*t)
plot(t,ft,type="l", xlab="T", ylab="f(t)")
title(main=expression(paste("Probability density function of ", Gamma(2,frac(1,10)))))

Can you please explain me how to interpret this graph?

Thanks,
Kamal.

Best Answer

Let $X_t$ be the number of customers arriving before time $t$.
(Capital $X$, lower-case $t$.)

Let $T_x$ be the time of arrival of the $x$th customer.
(Capital $T$, lower-case $x$.)

Then $X_t< x$ if and only if $T_x\ge t$.

So $T_2\ge t$ if and only if $X_t<2$. Therefore $$ \Pr(T_2\ge t) = \Pr(X_t <2) = \Pr(X_t=0)+\Pr(X_t=1) = e^{-10t} + 10t e^{-10t}. $$ The density of the time till the arrival of the second customer is therefore $$ \frac{d}{dt}\Big(1-\left(e^{-10t}+10te^{-10t}\right)\Big) = 10e^{-10t}+\left(100te^{-10t}-10e^{-10t}\right) = 100te^{-10t}. $$ (So we have a gamma distribution.)

Finally, $$ \Pr(T_2>1/2) = \int_{1/2}^\infty 100 te^{-10t}\,dt = 1 - \int_0^{1/2} 100 te^{-10t}\,dt. $$

PS: Perhaps it is useful to think of the measure as $$ \Big(10t\Big) e^{-10t}\Big(10\,dt\Big) = u e^{-u}\,du. $$