ExpectedValue[f,list]
gives the expected value of the pure function f with respect to the values in list.
ExpectedValue[f,list,x]
gives the expected value of the function f of x with respect to the values of list.
ExpectedValue[f,dist]
gives the expected value of the pure function f with respect to the symbolic distribution dist.
ExpectedValue[f,dist,x]
gives the expected value of the function f of x with respect to the symbolic distribution dist.
ExpectedValue
ExpectedValue[f,list]
gives the expected value of the pure function f with respect to the values in list.
ExpectedValue[f,list,x]
gives the expected value of the function f of x with respect to the values of list.
ExpectedValue[f,dist]
gives the expected value of the pure function f with respect to the symbolic distribution dist.
ExpectedValue[f,dist,x]
gives the expected value of the function f of x with respect to the symbolic distribution dist.
Details and Options
- For the list
, the expected value of f is given by
. - For a continuous distribution dist, the expected value of f is given by
where
is the probability density function of dist and the integral is taken over the domain of dist. - For a discrete distribution dist, the expected value of f is given by
where
is the probability mass function of dist and summation is over the domain of dist. - The following option can be given:
-
Assumptions $Assumptions assumptions to make about parameters
Examples
open all close allBasic Examples (3)
Scope (3)
Compute the expected value of any function:
ExpectedValue[x ^ 4 Exp[-Abs[x]], NormalDistribution[0, 1], x]Do the computation numerically:
ExpectedValue[x ^ 4 Exp[-Abs[x]], NormalDistribution[0, 1.], x]Obtain expectations with conditions:
ExpectedValue[x ^ n, CauchyDistribution[0, 1], x]ExpectedValue[x ^ n, CauchyDistribution[0, 1], x, Assumptions -> -1 < n < 1]Options (1)
Applications (2)
Obtain the raw moments of a distribution:
ExpectedValue[x ^ n, ChiSquareDistribution[ν], x, Assumptions -> n > 0]Construct a mixture density, here a Poisson‐inverse Gaussian mixture:
ExpectedValue[PDF[PoissonDistribution[μ], k], InverseGaussianDistribution[m, λ], μ, Assumptions -> k > 0]Properties & Relations (7)
ExpectedValue of a function is the integral or sum of that function times the PDF:
ExpectedValue[x ^ 3, ExponentialDistribution[λ], x]Integrate[x ^ 3 PDF[ExponentialDistribution[λ], x], {x, 0, Infinity}, Assumptions -> λ > 0]ExpectedValue[Exp[k], BinomialDistribution[n, p], k]Sum[Exp[k] PDF[BinomialDistribution[n, p], k], {k, 0, n}]ExpectedValue of
for real t is the CharacteristicFunction:
ExpectedValue[Exp[I t x], GumbelDistribution[α, β], x, Assumptions -> Element[t, Reals]]CharacteristicFunction[GumbelDistribution[α, β], t]ExpectedValue of a constant is the constant:
ExpectedValue[5, BetaDistribution[α, β], x]ExpectedValue of a random variable is the Mean:
ExpectedValue[x, ChiSquareDistribution[ν], x]Mean[ChiSquareDistribution[ν]]ExpectedValue of the squared difference from the Mean is the Variance:
ExpectedValue[(x - ν) ^ 2, ChiSquareDistribution[ν], x]Variance[ChiSquareDistribution[ν]]ExpectedValue for a list is a Mean:
ExpectedValue[f, Range[5]]Mean[Map[f, Range[5]]]CentralMoment is equivalent to an expected value:
list = Range[100];ExpectedValue[(x - Mean[list]) ^ 5, list, x] == CentralMoment[list, 5]Tech Notes
Text
Wolfram Research (2007), ExpectedValue, Wolfram Language function, https://reference.wolfram.com/language/ref/ExpectedValue.html (updated 2008).
CMS
Wolfram Language. 2007. "ExpectedValue." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2008. https://reference.wolfram.com/language/ref/ExpectedValue.html.
APA
Wolfram Language. (2007). ExpectedValue. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ExpectedValue.html
BibTeX
@misc{reference.wolfram_2026_expectedvalue, author="Wolfram Research", title="{ExpectedValue}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/ExpectedValue.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_expectedvalue, organization={Wolfram Research}, title={ExpectedValue}, year={2008}, url={https://reference.wolfram.com/language/ref/ExpectedValue.html}, note=[Accessed: 13-June-2026]}