Skip to content
Tutorials Center
My learning

Topics

Lesson 22 of 36 · Poisson Processes

Nonhomogeneous and Compound Poisson Processes

Handle rates that change over time with the thinning algorithm, and add random sizes to events with a compound Poisson process. Includes runnable simulations.

Real streams rarely keep a constant rate. Traffic peaks at rush hour, shop visits rise at lunchtime, website hits follow the day. And events often carry a size: an insurance claim has an amount, a customer buys some number of items. This lesson extends the Poisson process in two directions: a rate that depends on time, and random marks attached to each event.

The nonhomogeneous Poisson process

Replace the constant λ by a rate function λ(t) ≥ 0. The process keeps independent increments, but the count in a window (s, t] is now

Text
N(t) - N(s) ~ Poisson( ∫ from s to t of λ(u) du )

Define the mean function m(t) = ∫ from 0 to t of λ(u) du. Then N(t) ~ Poisson(m(t)), and the count in (s, t] has mean m(t) - m(s).

Example: λ(t) = 2 + 3t per hour for 0 ≤ t ≤ 4. Then m(t) = 2t + 1.5t², so over 4 hours the mean count is 8 + 24 = 32. Over the window (2, 4] it is m(4) - m(2) = 32 - (4 + 6) = 22.

When λ(t) is not constant, interarrival times are no longer identically distributed or exponential. The simple "add exponential gaps" method fails, but thinning works.

Simulation by thinning (Lewis-Shedler)

Idea: find a constant λmax with λ(t) ≤ λmax on the whole window.

  1. Simulate a homogeneous Poisson process with rate λmax.
  2. Keep an event at time t with probability λ(t) / λmax, independently.

By the thinning rule, the kept events have exactly the intensity λ(t). The cost is a few wasted candidate points.

Python Thinning algorithm for a time-varying rate

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The simulated means match the integral of the rate, and the variances match the means, confirming Poisson counts.

The compound Poisson process

Now attach a random size to each event. Let N(t) be a Poisson process with rate λ and let Y₁, Y₂, … be independent, identically distributed random variables, independent of N. The compound Poisson process is

Text
S(t) = Y₁ + Y₂ + … + Y_N(t)

with S(t) = 0 when N(t) = 0. Think of S(t) as total claims paid by an insurer, total rainfall over storms, or total items sold.

Using the laws of total expectation and variance, with μ_Y = E[Y] and E[Y²] the second moment:

Text
E[S(t)]   = λ t · E[Y]
Var[S(t)] = λ t · E[Y²]

Notice that the variance uses the second moment E[Y²], not the variance of Y. Randomness in the count and in the sizes both feed the variance.

Example: claims arrive at rate 5 per week with Y ~ Exponential of mean 2000. For an exponential with mean θ, E[Y²] = 2θ², so E[Y²] = 8,000,000. Over 10 weeks: E[S] = 50 × 2000 = 100,000 and Var[S] = 50 × 8,000,000 = 4 × 10⁸, a standard deviation of 20,000.

Python Compound Poisson: mean and variance

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

The simulated mean and variance sit close to the formulas. The last line estimates a tail probability that has no tidy formula. Simulation is the tool for such questions.

An insurer chooses a premium above λ E[Y] per unit time (a safety loading) so that, on average, income exceeds claims. The variance formula tells how large a capital reserve is needed on top of that.

Marked processes in general

The marks need not be numbers. They may be types (thinning is a marked process with marks A and B), locations (raindrops falling on a plane), or durations (calls with lengths). The marked-Poisson idea always has the same structure: a Poisson stream of events, each with independent random attributes.

flowchart LR
  A["Poisson arrivals N(t)"] --> C["Total S(t) = sum of Y"]
  B["Independent sizes Y1, Y2, ..."] --> C

A compound Poisson process combines arrival counts with random sizes.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. A nonhomogeneous Poisson process has rate λ(t) = 4t on [0, 3]. What is the mean number of events in [0, 3]?

    m(3) = integral of 4t from 0 to 3 = 2 × 9 = 18.
  2. 2. In the thinning algorithm for a time-varying rate, what is the probability of keeping a candidate point at time t?

    Keep with probability λ(t)/λmax, which is at most 1 because λ(t) ≤ λmax.
  3. 3. For a compound Poisson process S(t), which formula is the variance?

    Var S(t) = λ t E[Y²], the second moment, not the variance of Y.
  4. 4. Claims arrive at rate 3 per day with mean size 500. What is the mean total claim amount over 4 days?

    E[S] = λ t E[Y] = 3 × 4 × 500 = 6000.

Summary

  • A nonhomogeneous Poisson process has rate function λ(t); the count in a window is Poisson with mean the integral of λ.
  • Simulate it by thinning a constant-rate process with rate λmax ≥ λ(t).
  • A compound Poisson process sums random sizes: E[S] = λ t E[Y], Var[S] = λ t E[Y²].
  • Marks can be sizes, types or locations.

Next: The Generator Matrix of a Continuous-Time Markov Chain