Non-homogeneous Poisson process first occurrence distribution I am trying to do the following problem in order to prepare for my Stochastic Processes exam:
Problem statement:
Consider $N(t)$ to be a non homogeneous Poisson process with rate $\lambda(t)$ over the interval [0, a].
Let $T_{1}$ denote the time for the first event to occur. Find the distribution of $T_{1}$ given that $N(a) = 1$. Here, $N(t)$ denotes the number of occurrences up until time t.
->What have i tried so far? I started by investigating the following: $$P(T_{1} > t) = P(N(T_{1})=0)$$
Which, since we have a non homogeneous Poisson process, turns out to be:
$$\frac{\left[\int_{0}^{T_{1}} \lambda(s) d s)\right]^{0}e^{-\int_{0}^{T_{1}} \lambda(s)ds}}{0 {\displaystyle !\,}} = e^{-\int_{0}^{T_{1}} \lambda(s)ds}$$
Finally: $$P\left(N\left(T_{1}\right)=0\right) = e^{-\int_{0}^{T_{1}} \lambda(s) d s}$$
Now, i tried to use the remaining information to finish the problem. However, i got stuck. I don't know how to proceed in regards to conditioning the variables (I dont know if that is indeed the path to solve the problem). I tried doing:
$$P\left(N\left(T_{1}\right)=0 \mid N(a)=1\right) = \frac{P\left(N\left(T_{1}\right)=0, N(a)=1\right)}{P(N(a)=1)}$$
Now, i tried a few things, but i dont know if that is indeed correct. Knowing that $N(T) = 0$ and $N(a) = 1$, one can infer that $T \le a$, otherwise $N(T)$ would not equal zero, as one event would have ocurred. This information can be translated into: $$P(N(a)=1) = e^{-\int_{a}^{T_{1}} \lambda(s) d s}$$
Now, if i could expand the below term: $$P\left(N\left(T_{1}\right)=0, N(a)=1\right)$$ into something useful, i could start manipulating some terms. What do you guys think of my approach? Any help is appreciated.
Thanks in advance!
 A: On your approach
You have done all the right things initially. $P(N(T_1) = 0) = e^{-\int_0^{T_1} \lambda(s)ds}$ is correct. The conditional formula $P(N(T_1) = 0 | N(a) = 1) = \frac{P(N(T_1) = 0, N(a) = 1)}{P(N(a) = 1)}$ is correct (because the denominator of RHS is not zero). Furthermore, this is the way to solve the problem, so you are going in the right direction.
Now, $P(N(a) = 1)$ is incorrectly written. Note that $N(a)$ is a Poisson random variable with parameter $\int_0^a \lambda(s)ds$. Therefore, we have :
$$
P(N(a) = 1) = \frac{\left(\int_0^a \lambda(s)ds\right)^1e^{-\int_0^a \lambda(s)ds}}{1!} =  \left(e^{-\int_0^a \lambda(s)ds}\right)\int_0^a \lambda(s)ds
$$

Answer
Now, how do we handle the numerator? Recall the independence of increments of the Poisson process. This means, in particular, that $N(T_1)$ and $N(a) - N(T_1)$ are independent for any $T_1$.
Now, it is easy to see that $$P(N(T_1) =0, N(a)= 1) = P(N(T_1) = 0,N(a) - N(T_1) =1) = P(N(T_1)= 0)P(N(a) - N(T_1) = 1)$$
thanks to independence of the two random variables. Finally, each of these involves a Poisson random variable, so we should be through here. One part you've already done :
$$
P(N(T_1) = 0) = e^{-\int_0^{T_1} \lambda(s)ds}
$$
The other part is easy as well :
$$
P(N(a) - N(T_1) = 1) = \frac{\left(\int_{T_1}^a \lambda(s)ds\right)^1e^{-\int_{T_1}^a \lambda(s)ds}}{1!} = \left(\int_{T_1}^a \lambda(s)ds\right)e^{-\int_{T_1}^a \lambda(s)ds}
$$
Multiplying these two, and combining the integrals sitting on top of the exponentials (basically, $\int_a^c f + \int_c^b f = \int_a^b f$ for any $a,b,c$ and function $f$), gives us :
$$
P(N(T_1) = 0 , N(a) = 1) = \left(\int_{T_1}^a \lambda(s)ds\right)e^{-\int_{0}^a \lambda(s)ds}
$$
Dividing by $P(N(a) = 1)$ and doing some change of variables to get back to our original situation, gives an answer that feels right, in addition to being right of course!
$$\bbox[yellow, 2pt, border:2px solid red]{
P(T_1 > t | N(a) = 1) = \frac{\int_{t}^a \lambda(s)ds}{\int_{0}^a \lambda(s)ds}}
$$
