aleatory.processes.RandomWalk#
- class aleatory.processes.RandomWalk(rng=None)[source]#
Simple Random Walk#
Notes#
Let \(\{Z_i, i \geq 1\}\) be a sequence of real-valued independent an identically distributed (i.i.d.) random variables defined on a probability space \((\Omega, \mathcal{F}, \mathbb{P})\), such that
\[\mathbb{P}(Z_1 = 1) = p,\]and
\[\mathbb{P}(Z_1 = -1) = 1-p,\]Then, the stochastic process \(\{X_n , n\geq 0\}\), defined as \(X_0 =0\), and
\[X_n = \sum_{i=1}^n Z_i, \qquad \forall n\geq 1,\]is called a Simple Random Walk.
Constructor, Methods, and Attributes#
- __init__(rng=None)[source]#
- Parameters:
rng (numpy.random.Generator) – a custom random number generator
Methods
__init__([rng])- parameter numpy.random.Generator rng:
a custom random number generator
draw(n, N[, marginal, envelope, mode, ...])Simulates and plots paths/trajectories from the instanced stochastic process.
estimate_covariances([times])estimate_expectations()estimate_quantiles(q)estimate_stds()estimate_variances()marginal_expectation([times])marginal_variance(times)plot(*args, n, N[, title, suptitle])Simulates and plots paths/trajectories from the instanced stochastic process.
process_covariance([times])process_expectation()process_stds()process_variance()sample(n)simulate(n, N[, T])Simulate paths/trajectories from the instanced stochastic process.
Attributes
TEnd time of the process.
rng