A Poisson process counts random events arriving independently over continuous time at rate λ. The number of arrivals in an interval of length t follows a Poisson distribution:
P(N(t) = k) = (λt)^k · e^(-λt) / k!
E[N(t)] = λt, Var[N(t)] = λt
Equivalently, the gaps between consecutive events (interarrival times) are independent and exponentially distributed with mean 1/λ — the process is memoryless: however long you've already waited, the expected remaining wait is always 1/λ. The bottom panel builds a live histogram of those observed gaps and overlays the theoretical density f(x) = λ·e^(-λx).
T_gap ~ Exponential(λ)
P(T_gap > s) = e^(-λs)
Time-varying λ(t) mode drives the rate as λ(t) = λ₀·(1 + 0.6·sin(0.4t)) and samples arrivals with the thinning (Lewis–Shedler) algorithm: draw candidate gaps from the fastest possible rate λ_max = 1.6·λ₀ (the true supremum of λ(t) over all t, since the sine term maxes at 1), then keep each candidate only with probability λ(t)/λ_max, discarding the rest. What survives is distributed exactly as a Poisson process with the time-varying rate — the top panel's background shading traces λ(t) itself so you can see accepted events cluster where the shading is brightest.
The middle panel is the counting function N(t) — it jumps by exactly 1 at every accepted event and is flat everywhere else. The estimated rate λ̂ = N(t)/t drifts toward the true λ as t grows, by the law of large numbers. Drag anywhere on the canvas to scrub back through the recorded timeline; the histogram keeps accumulating from the full history regardless of scrub position.