scipy.stats.rv_continuous.expect¶
- rv_continuous.expect(func=None, args=(), loc=0, scale=1, lb=None, ub=None, conditional=False, **kwds)[source]¶
Calculate expected value of a function with respect to the distribution
Location and scale only tested on a few examples.
Parameters : func : callable, optional
Function for which integral is calculated. Takes only one argument. The default is the identity mapping f(x) = x.
args : tuple, optional
Argument (parameters) of the distribution.
lb, ub : scalar, optional
Lower and upper bound for integration. default is set to the support of the distribution.
conditional : bool, optional
If True, the integral is corrected by the conditional probability of the integration interval. The return value is the expectation of the function, conditional on being in the given interval. Default is False.
Additional keyword arguments are passed to the integration routine. :
Returns : expected value : float
Notes
This function has not been checked for it’s behavior when the integral is not finite. The integration behavior is inherited from integrate.quad.
