This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Moment

Moment
gives the r^(th) sample moment of the elements in list.
Moment
gives the r^(th) moment of the symbolic distribution dist.
Moment
gives the ^(th) multivariate moment.
Moment[r]
represents the r^(th) formal moment.
  • Moment handles both numerical and symbolic data.
  • For the list , the r^(th) moment is given by .
  • For a symbolic distribution dist, the r^(th) moment is given by Expectation.
  • For a multivariate symbolic distribution dist, the ^(th) moment is given by Expectation.
Compute moments from data:
Use symbolic data:
Compute the second moment of a continuous univariate distribution:
The moment for a discrete univariate distribution:
The moment for a multivariate distribution:
Convert a formal moment to central moments:
Evaluate for a particular distribution:
Compute moments from data:
In[1]:=
Click for copyable input
Out[1]=
Use symbolic data:
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
 
Compute the second moment of a continuous univariate distribution:
In[1]:=
Click for copyable input
Out[1]=
 
The moment for a discrete univariate distribution:
In[1]:=
Click for copyable input
Out[1]=
 
The moment for a multivariate distribution:
In[1]:=
Click for copyable input
Out[1]=
 
Convert a formal moment to central moments:
In[1]:=
Click for copyable input
Out[1]=
Evaluate for a particular distribution:
In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
Compute moment of univariate distributions:
Compute a moment of specific order:
Evaluate a moment of specific order numerically:
Compute moments of multivariate distributions:
Compute moment of a truncated distribution:
Find moment of a user-defined distribution:
Evaluate moment of a function of a random variable:
Compute moments of distributions derived from data:
Compute moment for a set of 5 independent identically distributed samples of size 1000:
TraditionalForm formatting:
Compute a list of univariate moments along the outermost dimension:
Equivalently:
Compute a multivariate moment for the same data:
Find multivariate moment from sparse data:
Compare with a population moment:
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:
Show how and depend on and :
Compare original and approximated distribution:
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:
Build type A Gram-Charlier expansion of order 6:
A monotone PDF with a positive domain is bounded by :
Prove the identity for exponential distribution for the first few orders:
Moments of PearsonDistribution satisfy a three-term recurrence equation implied by the defining differential equation for the density function :
Verify the moment equations:
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:
Find quadrature rule for approximating the expectation of a function of a random variable:
Find lowest-order orthogonal polynomials:
Check their orthonormality:
Find quadrature points:
Find quadrature weights, requiring rule to be exact on polynomials of order up to :
Compute approximation to expectation of :
Check with NExpectation:
Moment is equivalent to Expectation of a 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 :
Heavy-tailed distributions may only have a few moments defined:
Some heavy-tailed distributions have no moments defined:
Often quantiles can be used to characterize distributions:
Find an unbiased estimator for a product of moments:
Two different distributions can have the same sequence of moments:
Compare their densities on log-scale:
Compute their moments:
Prove them equal:
New in 8