Student[Statistics]
Moment
compute moments
Calling Sequence
Parameters
Description
Computation
Examples
References
Compatibility
Moment(A, n, numeric_option, origin_option)
Moment(M, nn, numeric_option, origin_option)
Moment(X, n, numeric_option, origin_option, inert_option)
A
-
data sample
M
Matrix data sample
X
algebraic; random variable
n
algebraic; order
nn
algebraic, list or Vector of algebraic constants; order, or sequence of orders
numeric_option
(optional) equation of the form numeric=value where value is true or false
origin_option
(optional) equation of the form origin=algebraic where algebraic is a algebraic expression or a list or Vector of algebraic expressions.
inert_option
(optional) equation of the form inert=value where value is true or false
The Moment function computes the moment of order n of the specified random variable or data sample.
The first parameter can be a data sample (e.g., a Vector), a Matrix data sample, a random variable, or an algebraic expression involving random variables (see Student[Statistics][RandomVariable]).
The second parameter can be any algebraic expression.
origin=algebraic -- By default, the moment is computed about 0. If this option is present, the moment will be calculated about the specified point. If A is a Matrix data sample, then you can specify several origins instead, one for each column of the Matrix. This is accomplished by passing a list or Vector as the value of the origin option.
If the option inert is not included or is specified to be inert=false, then the function will return the actual value of the result. If inert or inert=true is specified, then the function will return the formula of evaluating the actual value.
By default, all computations involving random variables are performed symbolically (see option numeric).
If there are floating point values or the option numeric is included, then the computation is done in floating point. Otherwise the computation is exact.
By default, the moment is computed according to the rules mentioned above. To always compute the moment numerically, specify the numeric or numeric = true option.
with⁡StudentStatistics:
Compute the fourth moment of the beta distribution with parameters 4 and 7.
Moment⁡BetaRandomVariable⁡4,7,4
5143
Moment⁡BetaRandomVariable⁡4,7,4,numeric
0.03496503497
Moment⁡BetaRandomVariable⁡4,7,2,origin=12
5132
Moment⁡BetaRandomVariable⁡4,7,2,origin=12,numeric
0.03787878788
Use named value for second parameter or origin option.
Moment⁡BetaRandomVariable⁡4,7,a,origin=1
5040⁢−1aa+7⁢8+a⁢9+a⁢a+10
Moment⁡BetaRandomVariable⁡4,7,2,origin=b
533−811⁢b+b2
Use the inert option.
Moment⁡BetaRandomVariable⁡4,7,2,origin=12,inert
∫01840⁢_t1−122⁢_t13⁢1−_t16ⅆ_t1
evalf⁡Moment⁡BetaRandomVariable⁡4,7,2,origin=12,inert
Create a exponential-distributed random variable X and compute the third moment of 1X+2.
X≔ExponentialRandomVariable⁡2:
Moment⁡1X+2,3,numeric
0.03727171015
Compute the second moment of the following data, and set the origin to be 3.
A≔0,2,3,5,2,π,2,−4,ln⁡2
A≔02352π2−4ln⁡2
Moment⁡A,2,origin=3
659+π−329+ln⁡2−329
Consider the following Matrix data sample.
M≔Matrix⁡3,π,114,5.0,3,−12,ln⁡4,ln⁡5,88,2,5,54,4.2,23,17
M≔3π1145.03−122⁢ln⁡2ln⁡58825544.22317
Compute the second moment of each of the columns.
Moment⁡M,2
11.512362415635+π25+ln⁡525240895
Compute the second moment of each column with origin 3.
Moment⁡M,2,origin=3
1.8088091784045+π−325+ln⁡5−325225685
Compute the moment of each column with corresponding order and origin.
Moment⁡M,2,3,1,origin=3,100,85
1.808809178−22265815+π−10035+ln⁡5−10035−1645
Stuart, Alan, and Ord, Keith. Kendall's Advanced Theory of Statistics. 6th ed. London: Edward Arnold, 1998. Vol. 1: Distribution Theory.
The Student[Statistics][Moment] command was introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
See Also
Statistics[Moment]
Student
Student[Statistics][RandomVariable]
Download Help Document