aleatory.processes.GeneralRandomWalk#
- class aleatory.processes.GeneralRandomWalk(step_dist=None, step_args=None, step_kwargs=None, normalised=False, rng=None)[source]#
General 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})\). 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 random walk, or more precisely one-dimensional random walked based on \(\{Z_i, i \geq 1\}\).
Constructor, Methods, and Attributes#
- __init__(step_dist=None, step_args=None, step_kwargs=None, normalised=False, rng=None)[source]#
- Parameters:
step_dist – an object representing the random variable \(Z_i\) above (e.g.scipy.stats.norm)
step_args – arguments (if any) to pass to the chosen step distribution
step_kwargs – keyword arguments (if any) to pass to the chosen step distribution
normalised (bool) – normalised or not
rng (numpy.random.Generator) – a custom random number generator
Methods
__init__([step_dist, step_args, ...])- parameter step_dist:
an object representing the random variable \(Z_i\) above (e.g.scipy.stats.norm)
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()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