Variance - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Mozilla Firefox.

Online Help

All Products    Maple    MapleSim


Student[Statistics]

  

Variance

  

compute the variance

 

Calling Sequence

Parameters

Description

Computation

Examples

References

Compatibility

Calling Sequence

Variance(A, numeric_options)

Variance(M, numeric_options)

Variance(X, numeric_options, 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

inert_option

-

(optional) equation of the form inert=value where value is true or false

Description

• 

The Variance function computes the sample variance of the specified data sample or random variable. In the data sample case the following (unbiased) estimate for the variance is used:

∑i=1N⁡Ai−Mean⁡A2N−1

  

where N is the number of elements per data set A.

• 

The first parameter can be a data set, a random variable, or an algebraic expression involving random variables (see Student[Statistics][RandomVariable]).

• 

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 variance is computed according to the rules mentioned above. To always compute the mean numerically, specify the numeric or numeric = true option.

Examples

> 

with⁡StudentStatistics:

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

> 

Variance⁡BetaRandomVariable⁡p,q

p⁢qp+q2⁢p+q+1

(1)

Use numeric parameters.

> 

Variance⁡BetaRandomVariable⁡3,5

5192

(2)
> 

Variance⁡BetaRandomVariable⁡3,5,numeric

0.02604166667

(3)

Use the inert option.

> 

Variance⁡BetaRandomVariable⁡3,5,inert

∫01105⁢_t0−∫01105⁢_t3⁢1−_t4ⅆ_t2⁢_t02⁢1−_t04ⅆ_t0

(4)
> 

evalf⁡Variance⁡BetaRandomVariable⁡3,5,inert

0.02604166667

(5)
> 

Variance⁡x,y,z

2⁢x3−y3−z322+2⁢y3−x3−z322+2⁢z3−x3−y322

(6)

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

> 

Variance⁡1,4,4.0,0.1,sqrt⁡3

3.13583376511232

(7)

Consider the following Matrix data sample.

> 

M≔Matrix⁡4,110,π,undefined,4.9,0,4,995,a

M≔4110πundefined4.904995a

(8)

Compute the variance of each of the columns.

> 

Variance⁡M

undefined295761.5033333332⁢π3−a322+−π3−a322+2⁢a3−π322

(9)

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][Variance] command was introduced in Maple 18.

• 

For more information on Maple 18 changes, see Updates in Maple 18.

See Also

Statistics[Variance]

Student

Student[Statistics]

Student[Statistics][RandomVariable]