aleatory.processes.GaltonWatson#

class aleatory.processes.GaltonWatson(mu=1.0, rng=None)[source]#

Galton-Watson process#

../_images/galton_watson_draw.png

Notes#

A Galton–Watson process is a stochastic process \(\{X_n : n \in \mathbb{N}\}\) which evolves according to the following recurrence formula:

\[X_{0} = 1,\]
\[X_{n+1} = \sum_{j=1}^{X_n} Z_j^{(n)},\]

where \(\{Z_j^{(n)}. : n, j \in \mathbb{N}\}\) is a set of independent and identically distributed (i.i.d) natural number-valued random variables. In this case, we assume tha they follow a Poisson distribution with parameter \(\mu>0\), i.e.:

\[Z_j^{(n)} \sim Poi(\mu).\]

Constructor, Methods, and Attributes#

__init__(mu=1.0, rng=None)[source]#
Parameters:
  • mu (float) – the parameter \(\mu>0\) in the above definition

  • rng (numpy.random.Generator) – a custom random number generator

Methods

__init__([mu, rng])

parameter float mu:

the parameter \(\mu>0\) in the above definition

draw(N, n[, mode, title, style, colormap, ...])

Simulates and plots paths/trajectories from the instanced stochastic process.

estimate_covariances([times])

estimate_expectations()

estimate_quantiles(q)

estimate_stds()

estimate_variances()

marginal_expectation(generations)

marginal_variance(generations)

plot(N, n[, mode, title, suptitle, style, ...])

Simulates and plots paths/trajectories from the instanced stochastic process.

process_covariance([times])

process_expectation()

process_stds()

process_variance()

sample([n])

sample_upto([n])

simulate(N, n)

Simulate paths/trajectories from the instanced stochastic process.

simulate_upto(N[, generations])

Simulate paths/trajectories from the instanced stochastic process.

Attributes

T

End time of the process.

rng