chaospy.approximate_moment¶
- chaospy.approximate_moment(distribution, k_loc, order=100000, rule='clenshaw_curtis', **kwargs)[source]¶
Approximation method for estimation of raw statistical moments.
Uses quadrature integration to estimate the values.
- Args:
- distribution (Distribution):
Distribution domain with dim=len(distribution)
- k_loc (Sequence[int, …]):
The exponents of the moments of interest with
shape == (dim,)
.- order (int):
The quadrature order used in approximation.
- rule (str):
Quadrature rule for integrating moments.
- kwargs:
Extra args passed to
chaospy.generate_quadrature()
.
- Examples:
>>> distribution = chaospy.Uniform(1, 4) >>> round(chaospy.approximate_moment(distribution, (1,)), 4) 2.5 >>> round(chaospy.approximate_moment(distribution, (2,)), 4) 7.0