Continuous Distribution.Get Expectation Value Method
Definition
Namespace: Numerics.NET.Statistics.Distributions
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.9.0
Overload List
| Get | Returns the expectation value of a function. |
| Get | Returns the un-normalized expectation value of a function over the specified interval. |
GetExpectationValue(Func<Double, Double>)
Returns the expectation value of a function.
public double GetExpectationValue(
Func<double, double> function
)Parameters
Return Value
DoubleThe expectation value of function.
Exceptions
| Argument | function is null. |
GetExpectationValue(Func<Double, Double>, Double, Double)
Returns the un-normalized expectation value of a function over the specified interval.
public double GetExpectationValue(
Func<double, double> function,
double lowerBound,
double upperBound
)Parameters
- function Func<Double, Double>
- The function to evaluate.
- lowerBound Double
- The lower bound of the interval.
- upperBound Double
- The upper bound of the interval.
Return Value
DoubleThe expectation value of function between lowerBound and upperBound.
Remarks
The interval is clipped to the distribution's support. An empty
intersection returns zero without evaluating function.
Reversing the bounds negates the result.
Exceptions
| Argument | function is null. |