Moment
Moment[list,r]
gives the r sample moment of the elements in list.
Moment[dist,r]
gives the r moment of the distribution dist.
Moment[…,{r1,r2,…}]
gives the {r1,r2,…} multivariate moment.
Moment[r]
represents the r formal moment.
Details

- Moment is also known as a raw moment.
- Moment handles both numerical and symbolic data.
- For the list {x1,x2,…,xn}, the r
moment is given by
.
- Moment[{{x1,y1,…},…,{xn,yn,…}},{rx,ry,…}] gives
.
- Moment works with SparseArray objects.
- For a distribution dist, the r
moment is given by Expectation[xr,xdist].
- For a multivariate distribution dist, the {r1,r2,…}
moment is given by Expectation[x1r1x2r2…,{x1,x2,…}dist].
- Moment[r] can be used in functions such as MomentConvert and MomentEvaluate, etc.
Examples
open allclose allBasic Examples (2)
Scope (18)
Data Moments (9)
Exact input yields exact output:
Approximate input yields approximate output:
Moment for a matrix gives columnwise means:
Moment for a tensor gives columnwise means at the first level:
SparseArray data can be used just like dense arrays:
Find moments of WeightedData:
Find a moment of EventData:
Find a moment of TimeSeries:
Distribution and Process Moments (5)
Find the moments for univariate distributions:
Compute a moment for a symbolic order r:
A moment may only evaluate for specific orders:
A moment may only evaluate numerically:
Moments for derived distributions:
Moment function for a random process:
Find a moment of TemporalData at some time t=0.5:
Find the corresponding moment function together with all the simulations:
Formal Moments (4)
TraditionalForm formatting for formal moments:
Convert combinations of formal moments to an expression involving Moment:
Evaluate an expression involving formal moments μ2+μ3 for a distribution:
Find a sample estimator for an expression involving Moment:
Applications (10)
Moments for Data and Time Series (3)
The law of large numbers states that a sample moment approaches a population moment as the sample size increases. Use Histogram to show probability distribution of a second sample moment of uniform random variates for different sample sizes:
Visualize the convergence process:
Compute a moving moment for some data:
Compute moments for slices of a collection of paths of a random process:
Method of Moments (3)
Estimate parameters of a distribution using the method of moments:
Compare data and estimated parametric distribution:
Find normal approximation to GammaDistribution using the method of moments:
Compare original and approximated distribution:
Moments of PearsonDistribution satisfy a three-term recurrence equation implied by the defining differential equation for the density function :
Use the recurrence equation to express parameters of PearsonDistribution in terms of its moments:

Fit PearsonDistribution to data:
Check that moments of the resulting distribution are equal to moments of data:
PDF Approximations from Moments (3)
Expectation Approximation from Moments (1)
Find quadrature rule for approximating the expectation of a function of a random variable:
Find lowest-order orthogonal polynomials:
Find quadrature weights, requiring rule to be exact on polynomials of order up to :
Compute approximation to expectation of :
Check with NExpectation:
Properties & Relations (7)
Moment is equivalent to Expectation of an integer power of a random variable:
A multivariate moment is equivalent to Expectation of a multivariate monomial:
Moment of order one is the Mean for univariate distributions:
Mean of a multivariate distribution is a list of moments of its univariate marginal distributions:
Alternatively, use Moment with orders given by unit vectors:
Moment of order is the same as
when both exist:
Use Moment directly:
Find the moment-generating function by using GeneratingFunction:
Compare with direct evaluation of MomentGeneratingFunction:
Moment can be expressed through Cumulant, FactorialMoment, or CentralMoment:
Sample moments are unbiased estimators of population moments:
Hence the sampling distribution expectation of the estimator equals the estimated moment:
Verify this on a sample of fixed size; evaluate the estimator on the sample:
Find its expectation assuming independent identically distributed random variables and
:
Possible Issues (2)
Neat Examples (2)
Find an unbiased estimator for a product of moments:
Check unbiasedness for a special case of on a GammaDistribution:
The distribution of Moment estimates for 20, 100, and 300 samples:
Text
Wolfram Research (2010), Moment, Wolfram Language function, https://reference.wolfram.com/language/ref/Moment.html.
CMS
Wolfram Language. 2010. "Moment." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Moment.html.
APA
Wolfram Language. (2010). Moment. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Moment.html