# Simulating Nonhomogeneous Poisson Process - Conditional distribution of arrival times

For a Poisson process having rate $$\lambda$$. Given the number of events by time $$T$$ the set of event times are iid Uniform $$(0,T)$$ random variables. Suppose that each event are independently counted with probability $$\lambda(t)/\lambda$$. The times of these counted event have a common distribution, $$F(s)$$, where

$$F(s) = P\{time \leq s | counted \} =\frac{\int P(time \leq s, counted,time=x)dx}{P(counted)} =\frac{\int P(time \leq s, counted|time=x)P(time=x)dx }{P(counted)} = \frac{\int_0^T P\{time \leq s, counted |time=x \}dx/T }{P\{counted\} } = \frac{\int_0^s \lambda(x) dx}{\int_0^T \lambda(x)dx }$$.

How does 1/T get cancelled out in the last equality?

• The integrand $$P\{time \leq s, counted |time=x \} = \lambda(t)/\lambda$$ ?
• $$P\{counted\} = \int_0^T \lambda(x)/ \lambda dx$$ ?
• In your first edit, you somehow lost the division by T in the numerator. Just revert back to your original question.(it should even earn you a new badge doing so ;-))
– Ute
Commented Jul 17, 2023 at 9:03
• You are computing the conditional event $$P(time \leq s, time = x|counted)$$ what does that mean? Commented Jul 18, 2023 at 8:15
• @SextusEmpiricus, OP is trying to follow an argument in a textbook that uses that informal notation. (Some extra confusion got introduced in an edit of the OP, therefore I asked to revert. I can't see the very formula you quote in the post, though. )I added a clip from the textbook to my answer
– Ute
Commented Jul 18, 2023 at 8:27
• @Ute $$\frac{\int P(time \leq s, counted,time=x)dx}{P(counted)}= \int\frac{ P(time \leq s, counted,time=x)}{P(counted)} dx = \int P(time \leq s, time=x|counted) dx$$ Commented Jul 18, 2023 at 12:23
• @SextusEmpiricus, that was not the original line of argumentation. You are continuing on the two extra equations that the author added in their first edit (I suggested to revert that edit because these lines messed up). The original post only quoted the textbook, which is basically correct.
– Ute
Commented Jul 18, 2023 at 12:58

### 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.

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:

• I am not seeing how the numerator and denominator winds up to the last equation. You will still have the factor $\frac{1}{T} = p(time)$ left . please check out the edit on the question @ute Commented Jul 16, 2023 at 21:19
• This is some quite informal notation you are using - what is the source of these formulae? Would it help you to do it more formally? In the last equation, you need to divide Numerator by denominator. Both are integrals with a factor $1/T$ in front. This one cancels out. In your own calculation, the factor 1/T is missing in the denominator.
– Ute
Commented Jul 16, 2023 at 21:23
• @J.doe, I have edited my question, hope it helps. I started out with the original formulation, because it seems you have introduced something in your edit that leads to your comment question "$\frac{1}{T} = p(time)$" - hope it helps!
– Ute
Commented Jul 16, 2023 at 21:52
• Sorry,There might be something missing in my understanding but In your answer, the second equality: $F(s) =P(time \leq s|counted) = \frac{\int P(time \leq s, counted|time=x)dx }{P(counted)}$ you are missing that it should be $F(s) =P(time \leq s|counted) = \frac{\int P(time \leq s, counted|time=x)dx/\textbf{T} }{P(counted)}$. Check whatever is in bold (T) @ute . You can find the derivation in "sheldon ross introduction to probability models" page 675 Commented Jul 17, 2023 at 4:18
• ah, thanks, overlooked it when copying from your question, sorry. it is fixed - is the rest understandable?
– Ute
Commented Jul 17, 2023 at 7:13