# Poisson Distribution: Estimating rate parameter and the interval length

Here is the motivation for my question. I have a sensor that reports data to me. The occurrence of the reports from the sensor follows a Poisson process (so, obviously, the inter-event times are exponential). I assume a constant event rate $\lambda$.

The device, however, can fail. Let $T_F$ be the failure time. After failure, the event occurrences are not reported. So what I observe are event times $t_1,t_2,\ldots,t_n$ that have occurred on some interval $(0,T_F)$. I do not have prior information.

So this is just a standard Poisson "set-up" except that I don't know the length of the interval over which the events can be observed. I want to estimate both the rate $\lambda$ and the interval length $T_F$.

I have tried writing down the equations for the maximum likelihood estimates for $\lambda$ and $T_F$, but I am finding that they have no solution. (Maybe I have made a mistake.)

It seems that this should be a simple enough standard problem. I have not been able to find an answer (in part because searches that involve the term "interval" return large numbers of pages/answers about confidence intervals). Any help or pointers to references would be greatly appreciated.

• What exactly is your question? Eg, I don't see a question mark anywhere. – gung - Reinstate Monica Aug 7 '16 at 16:11
• I guess that "I want to estimate both the rate $\lambda$ and the interval length $T_F$." is not sufficiently clear. So I will rephrase: How do you estimate both the rate $\lambda$ and the interval length $T_F$ at the same time (without using prior information)? – StatsStudent Aug 7 '16 at 16:16
• Are you able/willing to specify some distribution for the failure times? – Björn Aug 7 '16 at 20:50
• Thanks for your question and your consideration of this problem. I would rather not specify any distribution for the failure time. This would essentially be prior information about the interval length $T_F$. In this particular problem, we really do not have any information about the interval length. – StatsStudent Aug 7 '16 at 22:15
• Just to clarify a bit more - we don't observe the failure time $T_F$ of the device, but we still "observe" the device for some other amount of time $T_{obs}$? – probabilityislogic Aug 8 '16 at 18:03

Let $t=T_F$. Conditional on the number of occurences $N=n$, the arrival times $t_1,t_2,\dots,t_N$ are known to have the same distribution as the order statstics of $n$ iid unif$(0,t)$ random variables. Hence, the likelihood becomes \begin{align} L(\lambda,t) &= P(N=n) f(t_1,t_2,\dots,t_N|N=n) \\ &= \frac{e^{-\lambda t}(\lambda t)^n}{n!}\frac{n!}{t^n} \\ &= e^{-\lambda t}\lambda^n. \end{align} for $t\ge t_n$ and zero elsewhere. This is maximised for $\hat t=t_n$ and $\hat\lambda=n/t_n$. These MLEs don't exist if there are no occurrences $N=0$, however. Conditional on $N=n$, again using the fact that $t_n$ can be viewed as an order statistic (the maximum) of $n$ iid unif$(0,t)$ random variables, $E(t_N|N=n)=\frac n{n+1} t$. Hence, the estimator $t^*=\frac {n+1}n t_n$ is unbiased for $t$ conditional on $N=n$ and hence also conditional on $N\ge 1$. A reasonable frequentist estimator of $\lambda$ might be $\lambda^* = n/t^* = \frac{n^2}{(n+1)t_n}$ but this does not have finite expectation when $N=1$ so assessing its bias is even more troublesome.
Bayesian inference using independent, non-informative scale priors on $\lambda$ and $t$ on the other hand leads to a posterior $$f(\lambda,t|t_1,\dots,t_N) \propto e^{-\lambda t}\lambda^{n-1}t^{-1}.$$ for $t>t_n,\lambda>0$. Integrating out $\lambda$, the marginal posterior of $t$ becomes $$f(t|t_1,\dots,t_N) = \frac{n t_n^n}{t^{n+1}}, t>t_n,$$ and the posterior mean $E(t|t_1,\dots,t_N)=\frac n{n-1} t_n$. A $(1-\alpha)$-credible interval for $t$ is given by $\left(\frac{t_n}{(1-\alpha/2)^{1/n}}, \frac{t_n}{(\alpha/2)^{1/n}}\right)$.
The marginal posterior of $\lambda$, \begin{align} f(\lambda|t_1,\dots,t_N) &\propto \int_{t_\text{max}}^\infty e^{-\lambda t}\lambda^{n-1}t^{-1} dt \\ &= \lambda^{n-1}\Gamma(0,\lambda t_n) \end{align} where $\Gamma$ is the incomplete gamma function.
• The times are not uniformly taken from (0,t) - we obviously have at least $t_{j+1}>t_{j}$ (i.e. jth failure must happen before (j+1)st failure) – probabilityislogic Aug 8 '16 at 12:16
• Yes, but conditional on $N=n$, $t_1,t_2,\dots,t_N$ have the same distribution as the order statistics of $n$ iid $\operatorname{unif}(0,t)$ random variables so this should still hold. – Jarle Tufto Aug 8 '16 at 12:35