Poisson Arrival time and Gamma distribution I have a question on poisson arrival times / gamma distribution that I just cannot understand as of now.
Question: The times when goals are scored in a 60 minute match are modeled as a Poisson process. For such a process, assumed that the average time between goals are 15 minutes ($\lambda$= 1/15).
Assume that at least three goals are scored in a game. What is the mean time of the third goal?
Here is the answer given in the book I have (Introduction to Stochastic Processes with R):

I expected something on the form of E[$S_n$] = n / $\lambda$ but got something very different.. can someone explain the answer and why it is correct?
Thanks.
 A: It is the condition that at least $3$ goals are scored that makes things more complicated. You are asked to find conditional expectation $\mathbb E[S_3|S_3\leq60]$ (not $\mathbb ES_3$).
The solution works like this:
In general we have the rule:$$\mathbb E[X|X\in A]=\frac{\mathbb EX1_{X\in A}}{P(X\in A)}$$and we can apply that here in order to find $\mathbb E[S_3|S_3\leq60]$.
Note that: $$P(S_3\leq60)=P(N(60)\geq3)=1-P(N(60)=0)-P(N(60)=1)-P(N(60)=2)$$where $N(60)$ has Poisson distribution with parameter $60\lambda=4$. This way we can find the denominator.
If $f(t)$ denotes the PDF of $S_3$ then the numerator will be:$$\int_0^{60}tf(t)dt$$
We can find the PDF by taking the derivative of CDF: $$P(S_3\leq t)=P(N(t)\geq3)=1-P(N(t)=0)-P(N(t)=1)-P(N(t)=2)$$where $N(t)$ has Poisson distribution $\lambda t=\frac{t}{15}$.

Edit:
Let me add that in this situation $S_k$ has Erlang distribution with parameters $k$ and $\lambda$ or in other terminology the Gamma distribution with parameters $\alpha=k$ and $\beta=\lambda$. Its PDF is:$$e^{-\lambda}\frac{\lambda^kx^{k-1}}{(k-1)!}$$
A nice way to prove that is (again) taking the derivative of the CDF of $S_k$.
A: One can also rely on known properties :

*

*Interarrival times $T_1,T_2,... $ in a Poisson process are independent and exponentially distributed ;

*The sum of $n$ independent and exponentially distributed r.v. follows a $\Gamma(n,\lambda)$ distribution (https://en.wikipedia.org/wiki/Relationships_among_probability_distributions) and you can look on Wikipedia at the analytical form of this distribution, which is exactly the one used in the formula reported.

Now if you know that $S_3=T_1+T_2+T_3$ has distribution $f(s)$ than $E[S_3|S_3<a]$ is equal to:
$E[S_3|S_3<a]=\frac{\int_0^a xf(x)dx}{\int_0^a f(x)dx}$,
which is your expression. As @Henry observed, this can be either numerically or analitically evaluated. For the analytical part, I would rely on Mathematica or Wolfram Alpha to make things quicker...
