Extinction chance
Survived
Mean size
This family

More information about branching processes

Branching process

Start with one individual and give it a random number of children, then give each child a random number of children of its own, generation after generation. Some families vanish in the second generation, others grow without end. Simulate up to 2,000 families with Poisson, geometric or 0, 1 or 2 children, watch one family tree grow and its dead branches turn grey, follow the population of every run on a log scale, and compare the share of families that died out with the theory: the extinction chance q, the smallest solution of q = G(q), which is 1 whenever the mean number of children is 1 or less. Every individual gets a random number of children, and the children form the next generation. Choose how the number of children is distributed and its mean m, how many generations to follow, how many individuals to start with and how many families to simulate. The tree shows one family: lines that died out turn grey, the living ones are coloured by generation. The chart shows the population of each family per generation, or the share of families extinct by each generation next to the theory. Play grows the family generation by generation, Skip shows all generations, Reset goes back to generation 0 and New run simulates new families.

How it works

  1. Choose how the number of children is distributed (Poisson, geometric, or 0, 1 or 2) and its mean m, from 0.2 to 3.
  2. Set how many generations to follow, how many individuals to start with and how many families to simulate.
  3. Press Play to grow one family generation by generation; Skip shows all generations and New run simulates new families.
  4. Read the tiles and the chart: the extinction chance in theory and in the simulation, the share that survived, the mean size against k·mⁿ and this family's fate.

Die out or explode

Everything hinges on the mean number of children m. The mean size of generation n is k·mⁿ for k starting individuals, so it shrinks when m < 1 and grows when m > 1. But a mean hides the gamble: a family with m = 1.5 still dies out with a chance of 41.7%, almost always in the first few generations, while the families that survive the start grow roughly like 1.5ⁿ and never look back. The population chart shows both at once, the grey lines of the runs that died out dropping to the bottom and the coloured lines of the survivors climbing in parallel to the dashed mean.

The extinction equation

The generating function G(s) = p₀ + p₁s + p₂s² + ... of the number of children answers the question. The chance qₙ that a line is extinct by generation n follows qₙ₊₁ = G(qₙ) from q₀ = 0, and the chance that it ever dies out is the smallest solution of q = G(q) between 0 and 1. For Poisson children G(s) = e^(m(s − 1)), for geometric children G(s) = 1/(1 + m(1 − s)) and q = 1/m, and for 0, 1 or 2 children (binomial with p = m/2) q = ((1 − p)/p)². With k individuals at the start the chance is qᵏ. Extinction by generation shows the simulated share next to qₙ and q.

Even m = 1 dies out

At exactly one child on average the mean population stays the same forever, and yet every family dies out in the end. The few that last a long time are large, and they keep the average up while all the others reach zero: with Poisson children only about 9% of families are still alive after 20 generations, and 2% after 100. This is why a nuclear chain reaction needs a multiplication factor above 1 to keep going, and why an epidemic with a reproduction number R₀ below 1 fades out.

Frequently asked questions

What is a branching process?

A model of a population in which every individual has a random number of children, independently of the others and always with the same distribution, and the children form the next generation. The simplest version is the Galton–Watson process, which Francis Galton and Henry Watson studied in 1873–74 to explain why surnames die out, and which Irénée-Jules Bienaymé had already solved in 1845.

When does a family die out for certain?

When the mean number of children m is 1 or less, even at exactly m = 1 (unless every individual has exactly one child). Above 1 a family survives with a positive chance, and the Extinction chance tile shows the chance that it dies out anyway.

How is the extinction chance calculated?

As the smallest solution of q = G(q) between 0 and 1, where G is the generating function of the number of children. For Poisson children with mean 1.5 that gives q ≈ 0.417; for geometric children it is simply 1/m. With k individuals at the start every one of the k lines has to die out, so the chance is qᵏ. The app iterates q ← G(q) from 0, which also gives the chance qₙ of being extinct by each generation.

Why does the distribution of children matter?

Because at the same mean, more variation means more individuals with no children at all. With a mean of 1.5, a family dies out with chance 41.7% for Poisson children, 66.7% for geometric children and only 11.1% when each individual has 0, 1 or 2 children. Epidemics with superspreaders behave like the geometric case: many chains of infection fizzle out by chance.

What happens to the families that explode?

They grow roughly like mⁿ, and with m well above 1 a family of a few dozen members practically never dies out. A population above a million counts as exploded, and from about 60 individuals on the app draws a whole generation's children at once from the normal approximation, so even 3⁴⁰ individuals take no time. The family tree samples a generation that is too wide to draw and writes its size beside it.

Can I use the picture?

Yes. Save gives a PNG, and the pencil opens it in the PictorX photo editor with the family links, the individuals, the chart's axes, each series of the chart and the labels on layers of their own. Everything is simulated in your browser; nothing is sent to a server.

Branching Process: how do I record a video?

Press the red Record button in the playback bar: it films what the stage shows. Press it again to stop, and the video is saved to your device. Recording is free; you only need to sign in. Without a subscription the video carries a small PictorX logo in a corner. The button beside Record opens the video options: the shape (as shown, square, story 9:16 or wide 16:9), the length (until you stop, or 5, 10, 15 or 30 seconds for social media) and the file: MP4, WebM or an animated GIF. You can add one of three music tracks: calm, bright or beat.

Ready to try it?

Open PictorX in your browser — no install, no credit card required to start.

Go to Editor