Inhomogeneity by independent thinning of a homogeneous (Poisson) point process
Your question concerns a method to generate an inhomogeneous point process with intensity function $\lambda(x)$ from a homogeneous one with intensity $\lambda$, by independent thinning, that is by counting points in $x$ with probability $\lambda(x)/\lambda$. The original point process need not necessarily be a Poisson point process, it would work with any other point process, too, and also the formulae hold.
Let us look at denominator and numerator in the second last fraction,
$$\frac{\int_0^T P\{\text{time}\leq s, \text{counted}\mid\text{time}=x\} d x\,/T}{P\{\text{counted\}}}
$$
Denominator:
$P\{\text{counted}\}$ denotes the mean probability of a randomly chosen event in the base interval $[0,T]$ to be counted. So, no,
- $P\{counted\} = \int_0^T \lambda(x)/ \lambda dx$
is not totally right. You would need to calculate the integral average of the $\lambda(x)/\lambda$, which is
$$
\begin{aligned}
P\{\text{counted}\} &= \frac{1}{T}\int_0^T P\{\text{counted}\mid\text{time}=x\} d x
\\&=\frac{1}{T}\int_0^T \lambda(x)/\lambda\ dx
\\&=\frac{1}{\lambda T}\int_0^T \lambda(x)\ dx .
\end{aligned}
$$
Numerator:
the integrand $P\{time \leq s, counted |time=x \} = \lambda(t)/\lambda$ ?
Well, the numerator stands for the mean probability that a randomly chosen event lies in the shorter interval $[0,s]$ and is counted,
$$\begin{aligned}
P(\text{time}\leq s \wedge \text{counted}) &=
\frac{1}{T}\int_0^T P\{\text{time}\leq s, \text{counted}\mid\text{time}=x\} d x
\\&=\frac{1}{T}\int_0^T \mathbf{1}_{[0,s]}(x) \lambda(x)/\lambda\ dx
\\&=\frac{1}{T}\int_0^s \lambda(x)/\lambda\ dx.
\\&=\frac{1}{\lambda T}\int_0^s \lambda(x)\ dx.
\end{aligned}
$$
Final (and now easy) step:
When taking the quotient of this numerator and denominator, the factor $1/(\lambda T)$ cancels out.
Additional remark:
You get the formula for the denominator as a special case of the formula for the numerator, by setting $s=T$.
From the comments: The source is an argument in Sheldon Ross, "Introduction to Probability Models" page 675. The informal notation is taken from there, here is the original:
