Student[Statistics]
Mean
compute the arithmetic mean
ExpectedValue
Calling Sequence
Parameters
Description
Computation
Examples
References
Compatibility
Mean(A, numeric_option, output_option)
Mean(M, numeric_option, output_option)
Mean(X, numeric_option, output_option, inert_option)
A
-
data sample
M
Matrix data sample
X
algebraic; random variable
numeric_option
(optional) equation of the form numeric=value where value is true or false
output_option
(optional) equation of the form output=x where x is value, plot, or both
inert_option
(optional) equation of the form inert=value where value is true or false
The Mean function computes and/or plots the arithmetic mean of the specified random variable or data set. This is the same as the expected value of the random variable. The same command can be obtained as ExpectedValue.
The first parameter can be a data sample (e.g., a Vector), a Matrix data set, a random variable, or an algebraic expression involving random variables (see Student[Statistics][RandomVariable]).
If the option output is not included or is specified to be output=value, then the function will return the value of the mean. If output=plot is specified, then the function will return a plot of the input data set and its mean. If output=both is specified, then both the value and the plot of the mean will be returned.
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 below).
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 mean is computed according to the rules mentioned above. To always compute the mean numerically, specify the numeric or numeric = true option.
with⁡StudentStatistics:
Compute the mean of data containing floating point values. This leads to a floating point result.
Mean⁡2,4,4.0
3.333333333
Mean⁡Vectorcolumn⁡sqrt⁡14.0,π,33
13.29441668
Compute the mean of data not containing any floating point values. This leads to an exact result.
Mean⁡2,4,4
103
Mean⁡100,20,π
40+π3
Mean⁡Vectorrow⁡sqrt⁡2,3,π
1+23+π3
Compute the mean of the beta distribution with parameters p and q.
Mean⁡BetaRandomVariable⁡p,q
pp+q
Use numeric parameters.
Mean⁡BetaRandomVariable⁡3,5
38
Mean⁡BetaRandomVariable⁡3,5,numeric
0.3750000000
Use the inert option.
Mean⁡BetaRandomVariable⁡3,5,inert
∫01105⁢_t3⁢1−_t4ⅆ_t
evalf⁡Mean⁡BetaRandomVariable⁡3,5,inert
If the output=plot option is included, then a plot will be returned.
Mean⁡BetaRandomVariable⁡3,5,output=plot
Compute the mean of x, y, z.
Mean⁡x,y,z
x3+y3+z3
Consider the following Matrix data sample with entries that have floating point values.
M≔Matrix⁡2.0,7.5,10,18,3,5⁢ln⁡2,1,π,4,2,7,4
M≔2.07.5101835⁢ln⁡21π4274
We compute the mean of each column according to the computation rules. (If a column has floating point values, then a floating point value will be given for that column. Otherwise, it will result in an exact expression.)
Mean⁡M
3.0000000004.3219119686223+π3
Using the command ExpectedValue will give the same result.
ExpectedValue⁡M
If the numeric option is included, then a floating point value will be given independently of the presence of floating point numbers in the input.
Mean⁡1,2,3,4,numeric
2.50000000000000
If the output=both option is included, then both the value of the mean and its plot will be returned.
mean,graph≔Mean⁡1,2,3,4,numeric,output=both
mean,graph≔2.50000000000000,PLOT⁡...
mean
graph
Stuart, Alan, and Ord, Keith. Kendall's Advanced Theory of Statistics. 6th ed. London: Edward Arnold, 1998. Vol. 1: Distribution Theory.
The Student[Statistics][Mean] and Student[Statistics][ExpectedValue] commands were introduced in Maple 18.
For more information on Maple 18 changes, see Updates in Maple 18.
See Also
Statistics[Mean]
Student
Download Help Document