Mean - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Online Help

All Products    Maple    MapleSim


Student[Statistics]

  

Mean

  

compute the arithmetic mean

  

ExpectedValue

  

compute the arithmetic mean

 

Calling Sequence

Parameters

Description

Computation

Examples

References

Compatibility

Calling Sequence

Mean(A, numeric_option, output_option)

Mean(M, numeric_option, output_option)

Mean(X, numeric_option, output_option, inert_option)

Parameters

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

Description

• 

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.

Computation

• 

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.

Examples

withStudentStatistics:

Compute the mean of data containing floating point values. This leads to a floating point result.

Mean2,4,4.0

3.333333333

(1)

MeanVectorcolumnsqrt14.0,π,33

13.29441668

(2)

Compute the mean of data not containing any floating point values. This leads to an exact result.

Mean2,4,4

103

(3)

Mean100,20,π

40+π3

(4)

MeanVectorrowsqrt2,3,π

1+23+π3

(5)

Compute the mean of the beta distribution with parameters p and q.

MeanBetaRandomVariablep,q

pp+q

(6)

Use numeric parameters.

MeanBetaRandomVariable3,5

38

(7)

MeanBetaRandomVariable3,5,numeric

0.3750000000

(8)

Use the inert option.

MeanBetaRandomVariable3,5,inert

01105_t31_t4ⅆ_t

(9)

evalfMeanBetaRandomVariable3,5,inert

0.3750000000

(10)

If the output=plot option is included, then a plot will be returned.

MeanBetaRandomVariable3,5,output=plot

Compute the mean of x, y, z.

Meanx,y,z

x3+y3+z3

(11)

Consider the following Matrix data sample with entries that have floating point values.

MMatrix2.0,7.5,10,18,3,5ln2,1,π,4,2,7,4

M2.07.5101835ln21π4274

(12)

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.)

MeanM

3.0000000004.3219119686223+π3

(13)

Using the command ExpectedValue will give the same result.

ExpectedValueM

3.0000000004.3219119686223+π3

(14)

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.

Mean1,2,3,4,numeric

2.50000000000000

(15)

If the output=both option is included, then both the value of the mean and its plot will be returned.

mean,graphMean1,2,3,4,numeric,output=both

mean,graph2.50000000000000,PLOT...

(16)

mean

2.50000000000000

(17)

graph

References

  

Stuart, Alan, and Ord, Keith. Kendall's Advanced Theory of Statistics. 6th ed. London: Edward Arnold, 1998. Vol. 1: Distribution Theory.

Compatibility

• 

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

Student[Statistics]