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.
 A: 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.
