WLJS LogoWLJS Notebook

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.

Examples

Evaluate moment expression:

MomentEvaluate[Moment[1], NormalDistribution[]]
(* 0 *)

On data:

MomentEvaluate[SampleMoment[2], {1, 2, 3, 4, 5}]

Mixed evaluation:

MomentEvaluate[Moment[2] - SampleMoment[2], NormalDistribution[], data]

Please visit the official Wolfram Language Reference for more details.

On this page