A homogeneous Poisson process with rate λ can be built in two ways that look nothing alike: add independent exponential gaps of mean 1/λ until time T is passed, or draw the number of events N ~ Poisson(λT) first and then scatter N points uniformly on [0, T]. The two give the same process, which is the content of Theorem 23.35 and of the order-statistics property. Colouring each point independently with probability p splits it into two independent Poisson processes; merging two independent processes gives one. Because the points of a homogeneous process are uniform given their number, equal bins should catch equal numbers of points: that is the test of Example 23.36, here applied to every simulated replicate and to the simulated web hits of Figure 23.3.
Gaps: one exponential draw −log(U)/λ per event. Count, then uniform: N by inversion of the Poisson cdf (in pieces of mean at most 20), then N sorted uniform times. Inhomogeneous: points of rate λ(1 + a) kept with probability λ(t)/(λ(1 + a)) (thinning). Web hits: the simulated stand-in for Figure 23.3 (1035 hits in 1300 s); its replicates come from the fitted homogeneous model, so their rejection rate shows the test's size. Test: Pearson's statistic Σ(O − E)2/E with E = N/k, referred to χ2 with k − 1 degrees of freedom; G2 = 2ΣO log(O/E) is its likelihood ratio version. Time unit: 1 (seconds for the web hits). Random numbers are seeded.
code/ch23_stochastic_processes.py (hpp_gaps, hpp_uniform, ipp_thinning, chisq_homogeneity, demo_pp); data: data/ch23-hits.json.