# Pivotal quantity inference statistics of Exponential distribution?

Bus waiting times are distributed like this (they are independent)

I know the average time is 8 minutes. I need to find the pivotal quantity of Theta parameter and after it of P. (P is the probability that waiting time will take more than 5 minutes )

I don't know How to treat each of them separately ? (P and $$\theta$$) ?

If $$T_1, T_2, \dots, T_n$$ are exponentially distributed with mean $$\theta,$$ then one can show (e.g., using moment generating functions( that the sample mean $$\bar T$$ has $$\frac{\bar T}{\theta} \sim \mathsf{Gamma}(\mathrm{shape}=n, \mathrm{rate}=n).$$

Then one can find values $$L$$ and $$U$$ that cut probability $$0.025,$$ respectively, from the lower and upper tails of $$\mathsf{Gamma}(n,n):$$

$$0.95 = P\left(L \le \frac{\bar T}{\theta} \le U\right) = P\left(\frac{\bar T}{U} \le \theta \le \frac{\bar T}{L}\right),$$ so that a 95% confidence interval for $$\theta$$ is of the form $$\left(\frac{\bar T}{U},\;\frac{\bar T}{L}\right).$$

Here is an example in R with thirty observations from an exponential distribution with rate $$\lambda = 1/8$$ and mean $$\theta = 8.$$

The resulting 95% CI is $$(5.52, 11.35),$$ which does cover the population mean $$8,$$ as should happen for 95% of such datasets. [In R, probability functions for exponential distribution use the rate $$\lambda = 1/\theta$$ as the parameter.]

set.seed(101)
t = rexp(30, 1/8)   # data: 30 0bservations
summary(t)

Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
0.373   2.631   4.737   7.660  10.455  30.051

ci = mean(t)/qgamma(c(.975,.025), 30, 30);  ci
[1]  5.517638 11.353423


Finally, $$P(T_i > 5) = e^{-5/\theta} = e^{-5/8} = 0.5353.$$

1 - pexp(5, 1/8)
[1] 0.5352614


Then the CI for the probability is $$(0.4040, 0.6438).$$

exp(-5/ci)
[1] 0.4040628 0.6437815


Note: If you are not familiar with gamma distributions or computations in R, then you can look at information on the gamma and chi-squared distributions (perhaps in your text or the relevant Wikipedia pages) to see how to use printed tables of the chi-squared distribution to get the 95% CI for $$\theta.$$

• I can't use R, and I know Gamma. I need to use Pivotal Quantities, and to get an numeric answer for theta and for P. but I dont succeed undertsand in which Pivotal Quantities I need to use with my data Jan 2, 2021 at 10:14
• The pivotal quantity is $\bar T/\theta.$ The 'pivot' takes place at the last member of my displayed equation. Jan 2, 2021 at 10:36
• ok and if I have a chi-square with 60 df, how can I find it in the table? the table ends in 30 Jan 2, 2021 at 11:51
• Get a different table, use a statistical calculator, learn to use R (if only for probability look-up), or google for chi-square tables online (of which one example is from NIST).) Jan 2, 2021 at 18:26
• You are correct that $\mathsf{Chisq}(\nu=k)\equiv\mathsf{Gamma}(\mathrm{shape}=k/2,\mathrm{rate}=1/2),$ so in R: qchisq(.975,60) and qgamma(.975,30,1/2) both return $83.29767.$ Note that qchisq and qgamma are quantile functions (inverse CDFs) of chi-squared and gamma distributions, respectively. Jan 2, 2021 at 18:36