MomentEvaluate[mexpr,dist]
evaluates formal moments in the moment expression mexpr on the distribution dist.
MomentEvaluate[mexpr,list]
evaluates formal moments and formal sample moments in mexpr on the data list.
MomentEvaluate[mexpr,dist,list]
evaluates formal moments on the distribution dist and formal sample moments on the data list.
MomentEvaluate
MomentEvaluate[mexpr,dist]
evaluates formal moments in the moment expression mexpr on the distribution dist.
MomentEvaluate[mexpr,list]
evaluates formal moments and formal sample moments in mexpr on the data list.
MomentEvaluate[mexpr,dist,list]
evaluates formal moments on the distribution dist and formal sample moments on the data list.
Details
- A moment expression is an expression involving formal moments and formal sample moments.
- A formal moment is an expression of the form:
-
Moment[r] formal r
momentCentralMoment[r] formal r
central momentFactorialMoment[r] formal r
factorial momentCumulant[r] formal r
cumulant - A formal sample moment is an expression of the form:
-
PowerSymmetricPolynomial[r] formal r
power symmetric polynomialAugmentedSymmetricPolynomial[{r1,r2,…}] formal {r1,r2,…} augmented symmetric polynomial - For a sample moment expression PowerSymmetricPolynomial[0] is taken to be the length of the list of data.
- MomentEvaluate[mexpr,…,n] assumes that n is taken to be the length of the list of data.
Examples
open all close allBasic Examples (3)
Evaluate formal moments for a univariate distribution:
MomentEvaluate[Moment[1], NormalDistribution[μ, σ]]MomentEvaluate[Moment[2], NormalDistribution[μ, σ]]Evaluate formal moments for a multivariate distribution:
MomentEvaluate[Moment[{1, 0}], BinormalDistribution[{Subscript[μ, 1], Subscript[μ, 2]}, {Subscript[σ, 1], Subscript[σ, 2]}, ρ]]MomentEvaluate[Moment[{1, 1}], BinormalDistribution[{Subscript[μ, 1], Subscript[μ, 2]}, {Subscript[σ, 1], Subscript[σ, 2]}, ρ]]Evaluate sample formal moments for data:
MomentEvaluate[PowerSymmetricPolynomial[2], {a, b, c}]MomentEvaluate[AugmentedSymmetricPolynomial[{2, 1}], {a, b, c}]Evaluate formal moments for data:
MomentEvaluate[Cumulant[3], {a, b, c}]Scope (6)
Evaluate mixed univariate formal moment polynomial for a distribution:
MomentEvaluate[Cumulant[2] + Moment[1] ^ 2, BinomialDistribution[n, p]]Evaluate mixed multivariate formal moment polynomial for a distribution:
MomentEvaluate[Moment[{2, 2}] ^ 2 + Moment[{3, 1}], BinormalDistribution[ρ]]Evaluate polynomial in formal moments for data:
data = RandomVariate[BetaDistribution[2, 3], 10];MomentEvaluate[Cumulant[4] + Moment[2] ^ 2, data]Compare with direct evaluation:
Cumulant[data, 4] + Moment[data, 2] ^ 2Evaluate formal sample polynomial for data:
MomentEvaluate[PowerSymmetricPolynomial[3], {a, b, c}]MomentEvaluate[AugmentedSymmetricPolynomial[{2, 1}], {a, b, c}]MomentEvaluate[PowerSymmetricPolynomial[{2, 3}], {{Subscript[x, 1], Subscript[x, 2]}, {Subscript[y, 1], Subscript[y, 2]}, {Subscript[z, 1], Subscript[z, 2]}}]MomentEvaluate[AugmentedSymmetricPolynomial[{{1, 2}, {3, 4}}], {{Subscript[x, 1], Subscript[x, 2]}, {Subscript[y, 1], Subscript[y, 2]}, {Subscript[z, 1], Subscript[z, 2]}}]Evaluate formal sample polynomial for data with n being the sample size:
MomentEvaluate[(PowerSymmetricPolynomial[4]/n), {Subscript[x, 1], Subscript[x, 2], Subscript[x, 3]}, n]Evaluate an expression containing both formal moments and formal sample moments:
se = MomentConvert[Moment[2], "SampleEstimator"] - Moment[2]data = RandomVariate[ExponentialDistribution[1], 10 ^ 5];MomentEvaluate[se, ExponentialDistribution[1], data]Moment[data, 2] - Moment[ExponentialDistribution[1], 2]Generalizations & Extensions (1)
Compute mean, variance, skewness, and excess kurtosis expressed in terms of Cumulant:
MomentEvaluate[{Cumulant[1], Cumulant[2], (Cumulant[3]/Cumulant[2]^3 / 2), 3 + (Cumulant[4]/Cumulant[2]^2)}, BinomialDistribution[n, p]]Compare with direct evaluation:
Table[f[BinomialDistribution[n, p]], {f, {Mean, Variance, Skewness, Kurtosis}}]% == %%//SimplifyApplications (2)
Find expectation of estimator
on a sample from Bernoulli distribution:
sampleEst = (PowerSymmetricPolynomial[1]/PowerSymmetricPolynomial[0])(1 - (PowerSymmetricPolynomial[1]/PowerSymmetricPolynomial[0]));Express the expectation of the estimator in terms of formal moments:
formalExp = MomentConvert[sampleEst, {Moment, n}]Expectation of the estimator for a sample from Bernoulli distribution:
estMean = MomentEvaluate[formalExp, BernoulliDistribution[p]]//FactorVariance of the sample estimator:
estVar = MomentEvaluate[MomentConvert[(sampleEst - estMean) ^ 2, {Moment, n}], BernoulliDistribution[p]]//FactorConstruct sample and unbiased estimators for
:
(se = MomentConvert[Cumulant[4], "SampleEstimator"])//TraditionalForm(ue = MomentConvert[Cumulant[4], "UnbiasedEstimator", "PowerSymmetricPolynomial"])//TraditionalFormAccumulate statistics of these estimators on the same data:
dist = ErlangDistribution[2, 3];data = RandomVariate[dist, {2500, 10 ^ 2}];ses = Table[MomentEvaluate[se, li], {li, data}];ues = Table[MomentEvaluate[ue, li], {li, data}];PairedHistogram[ses, ues, {0, 1, 0.05}, "PDF", ChartLabels -> {"Biased", "Unbiased"}]Compare the means of these statistics with population cumulant:
{Mean[ses], Mean[ues], Cumulant[dist, 4]}//NFind sampling population expectation of estimators for distribution dist:
sem = MomentEvaluate[MomentConvert[se, {Cumulant, n}], dist]uem = MomentEvaluate[MomentConvert[ue, {Cumulant, n}], dist]Find sampling population variance of estimators for distribution dist:
sev = MomentEvaluate[MomentConvert[(se - sem) ^ 2, {Cumulant, n}], dist]uev = MomentEvaluate[MomentConvert[(ue - uem) ^ 2, {Cumulant, n}], dist]Numerically evaluate expected variances for sample sizes used:
{sev, uev} /. n -> Last[Dimensions[data]]//N{Variance[ses], Variance[ues]}Properties & Relations (1)
MomentEvaluate effectively evaluates a moment expression by evaluating its constituents:
dist = BinomialDistribution[n, p];MomentEvaluate[Moment[2] + Moment[1] ^ 2, dist]Moment[dist, 2] + Moment[dist, 1] ^ 2% == %%//SimplifyRelated Guides
History
Text
Wolfram Research (2010), MomentEvaluate, Wolfram Language function, https://reference.wolfram.com/language/ref/MomentEvaluate.html.
CMS
Wolfram Language. 2010. "MomentEvaluate." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/MomentEvaluate.html.
APA
Wolfram Language. (2010). MomentEvaluate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/MomentEvaluate.html
BibTeX
@misc{reference.wolfram_2026_momentevaluate, author="Wolfram Research", title="{MomentEvaluate}", year="2010", howpublished="\url{https://reference.wolfram.com/language/ref/MomentEvaluate.html}", note=[Accessed: 12-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_momentevaluate, organization={Wolfram Research}, title={MomentEvaluate}, year={2010}, url={https://reference.wolfram.com/language/ref/MomentEvaluate.html}, note=[Accessed: 12-June-2026]}