expec
Syntax
expec(expression, variable)
Description
Calculates the expected value of the continuous probability distribution, expression.
If the signed area between the distribution and the horizontal axis is not 1, the function
will correct this by dividing the function by its area.
If you want to find the expected value of a discrete probability distribution use the built-in mean function instead.
If you want to find the expected value of a discrete probability distribution use the built-in mean function instead.
Warning
This function does not work for all possible inputs. In particular it won't work for the normal distribution.
Parameters
expression
A function that defines the distribution. It could be one with a restricted domain
such as
or a composite function
or a composite function
variable
The variable the distribution is defined over.
Return Value
The expected value of the given distribution.