We now know that the interarrival times $\left(\begin{array}{c}X_{1}\\ X_{2}\\ \end{array}\right)$ form a sequence of independent random variables, each having the exponential probability density function:

$$f(t)=re^{-(rt)}\text{,\hspace{1em}}t\ge 0$$The $(k)$ arrival time is simply the sum of the first $k$ interarrival times:

$$T_{k}=\sum_{i=1}^{k} X_{i}$$Therefore, the $(k)$ arrival time has a continuous distribution and its probability density function is the convolution power of $f$ of order $k$.

Show that the probability density function of the $(k)$ arrival time is

$$(f, k)(t)=r^{k}\frac{t^{(k-1)}}{(k-1)!}e^{-(rt)}\text{,\hspace{1em}}t\ge 0$$This distribution is the gamma distribution with shape parameter $k$ and rate parameter $r$. Again, $\frac{1}{r}$ is knows as the scale parameter. A more general version of the gamma distribution, allowing non-integer shape parameters, is studied in the chapter on Special Distributions.

Note that since the arrival times are continuous, the probability of an arrival at any given instant of time is 0. Thus, we can also interpret $N_{t}$ as the number of arrivals in $\left(0 , t\right)$.

In the gamma experiment, vary $r$ and $k$ with the scroll bars and watch how the shape of the probability density function changes. Now set $r=2$ and $k=3$, run the experiment 1000 times with an update frequency of 10, and watch the apparent convergence of the empirical density function to the true density function.

Sketch the graph of the probability density function in Exercise 1. Show that the density function at first increases and then decreases, reaching its maximum value at the mode $\frac{k-1}{r}$.

Suppose that customers arrive at a service station according to the Poisson model, at a rate of $r=3$ per hour. Relative to a given starting time, find the probability that the second customer arrives sometime after 1 hour.

Defects in a type of wire follow the Poisson model, with rate 1 per 100 meter. Find the probability that the $(5)$ defect is located between 450 and 550 meters.

The mean, variance, and moment generating function of $T_{k}$ can be found using basic properties and the corresponding results for the exponential distribution

Show that $(T_{k})=\frac{k}{r}$.

Show that $\sigma(T_{k})^2=\frac{k}{r^{2}}$.

In the gamma experiment, vary $r$ and $k$ with the scroll bars and watch how the size and location of the mean/standard deviation bar changes. Now set $r=2$ and $k=3$, run the experiment 1000 times with an update frequency of 10, and watch the apparent convergence of the empirical moments to the true moments.

Show that $(e^{uT_{k}})=\left(\frac{r}{r-u}\right)^{k}$ for $u< r$.

Suppose that requests to a web server follow the Poisson model with rate $r=5$. Relative to a given starting time, compute the mean and standard deviation of the time of the $(10)$ request.

Suppose that $Y$ has a gamma distribution with mean 40 and standard deviation 20. Find the shape parameter $k$ and the rate parameter $r$.

Suppose that $V$ has the gamma distribution with shape parameter $j$ and rate parameter $r$, that $W$ has the gamma distribution with shape parameter $k$ and rate parameter $r$, and that $V$ and $W$ are independent. Show that $V+W$ has the gamma distribution with shape parameter $j+k$ and rate parameter $r$.

- Give an analytic proof, using moment generating functions.
- Give an analytic proof, using probability density functions.
- give a probabilistic proof, based on the Poisson process.

In the gamma experiment, vary $r$ and $k$ with the scroll bars and watch how the shape of the density function changes. Now set $r=3$ and $k=5$ run the experiment 1000 times with an update frequency of 10, and watch the apparent convergence of the empirical density function to the true density function.

Even though you are restricted to small values of $k$ in the applet, note that the probability density function of the $(k)$ arrival time becomes more bell shaped as $k$ increases (for $r$ fixed). This is yet another application of the central limit theorem, since the $(k)$ arrival time is the sum of $k$ independent, identically distributed random variables (the interarrival times).

Use the central limit theorem to show that the distribution of the standardized variable below converges to the standard normal distribution as $k\to \infty $:

$$Z_{k}=\frac{rT_{k}-k}{\sqrt{k}}$$In the gamma experiment, set $k=5$ and $r=2$. Run the experiment 1000 times, updating after every run. Compute and compare the following:

- $(1.5\le T_{5}\le 3)$.
- The relative frequency of the event $\{1.5\le T_{5}\le 3\}$.
- The normal approximation to $(1.5\le T_{5}\le 3)$ .

Suppose that accidents at an intersection occur according to the Poisson model, at a rate of 8 per year. Compute the normal approximation to the event that the $(10)$ accident (relative to a given starting time) occurs within 2 years.

In many practical situations, the rate $r$ of the process in unknown and must be estimated based on observing the arrival times.

Show that $(\frac{T_{k}}{k})=\frac{1}{r}$ and hence $\frac{T_{k}}{k}$ is an unbiased estimator of $\frac{1}{r}$.

Since the estimator is unbiased, the variance measures the mean square error of the estimator.

Show that $\sigma(\frac{T_{k}}{k})^2=\frac{1}{kr^{2}}$ and hence $\sigma(\frac{T_{k}}{k})^2\to 0$ as $k\to \infty $. This means that $\frac{T_{k}}{k}$ is a consistent estimator of $\frac{1}{r}$.

Note that

$$\frac{T_{k}}{k}=\frac{1}{k}\sum_{i=1}^{k} X_{i}$$where $X_{i}$ is the $(i)$ interarrival time. Hence our estimator of $\frac{1}{r}$ can be interpreted as the sample mean of the interarrival times. In particular, by the law of large numbers, $\frac{T_{k}}{k}\to \frac{1}{r}$ as $k\to \infty $ with probability 1. A natural estimator of the rate itself is $\frac{k}{T_{k}}$. However, this estimator tends to overestimate $r$.

Use Jensen's inequality to show that $(\frac{k}{T_{k}})\ge r$.