Quantile - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.
Our website is currently undergoing maintenance, which may result in occasional errors while browsing. We apologize for any inconvenience this may cause and are working swiftly to restore full functionality. Thank you for your patience.

Online Help

All Products    Maple    MapleSim


Student[Statistics]

  

Quantile

  

compute quantiles

  

Quartile

  

compute quartiles

  

Percentile

  

compute percentiles

  

Decile

  

compute deciles

 

Calling Sequence

Parameters

Description

Computation

Examples

References

Compatibility

Calling Sequence

Quantile(A, qn, numeric_option, output_option)

Quantile(M, qn, numeric_option, output_option)

Quantile(X, qn, numeric_option, output_option)

Quartile(A, qr, numeric_option, output_option)

Quartile(M, qr, numeric_option, output_option)

Quartile(X, qr, numeric_option, output_option)

Decile(A, d, numeric_option, output_option)

Decile(M, d, numeric_option, output_option)

Decile(X, d, numeric_option, output_option)

Percentile(A, p, numeric_option, output_option)

Percentile(M, p, numeric_option, output_option)

Percentile(X, p, numeric_option, output_option)

Parameters

A

-

data sample

M

-

Matrix data sample

X

-

algebraic; random variable

qn

-

algebraic; probability expressed as a number between 0 and 1 (inclusive)

qr

-

algebraic; probability expressed as a number between 0 and 4 (inclusive)

d

-

algebraic; probability expressed as a number between 0 and 10 (inclusive)

p

-

algebraic; probability expressed as a percentage

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

Description

• 

The Quantile function computes the quantile corresponding to the given probability p for the specified random variable or data sample.

• 

The pth quantile of a data sample or random variable is the same as the 4pth quartile, the 10pth decile, and the 100pth percentile.

• 

For a real valued random variable X with distribution function Fx, and any p between 0 and 1, the pth quantile of X is defined as inf{y|Fyp}. For continuous random variables this is equivalent to the inverse distribution function.

• 

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 p is the probability, which has to be between 0 and 1 (inclusive) for Quantile, between 0 and 4 (inclusive) for Quartile, between 0 and 10 (inclusive) for Decile, and between 0 and 100 (inclusive) for Percentile.

• 

The number we are looking for is the jth item in the sorted data sample, where j=nqn+1. This is the same as using method=1 in Statistics[ Quantile].

Computation

• 

By default, all computations involving random variables are performed symbolically (see option numeric below).

• 

If the selected quantile, quartile, decile, or percentile is a floating point value, then the floating point value is returned. Otherwise, the value is returned as is.

• 

By default, the quantile, quartile, decile, percentile are computed according to the rules mentioned above. To always compute the quantile numerically, specify the numeric or numeric = true option.

Examples

withStudentStatistics:

Compute a quantile of the normal distribution.

QuantileNormalRandomVariable4,9,12

4

(1)

Use numeric parameters.

QuantileNormalRandomVariable4,9,0.5

4.

(2)

QuantileNormalRandomVariable4,9,12,numeric

4.

(3)

Use the output=plot option.

QuantileNormalRandomVariable4,9,13,output=plot

Create two normal random variables and compute the quantiles of their sum.

XNormalRandomVariable5,2:

YNormalRandomVariable2,5:

QuantileX+Y,13

758+58RootOf3erf_Z+15858

(4)

QuantileX+Y,13,numeric

4.68046250585916

(5)

Compute the quantile of a data sample.

Quantile1,2,45,4,2,0.9,2,4,7,276,1,1,0.92

276

(6)

Consider the following Matrix data sample.

MMatrix3,16.0,π,4.0,17,18,196,sqrt5,464,2,88,8,4,5,0

M

(7)

We compute the 37 quantile of each of the columns.

QuantileM,37

(8)

The pth quantile of a data sample or random variable is the same as the 4pth quartile, the 10pth decile, and the 100pth percentile.

QuartileM,127

(9)

DecileM,307

(10)

PercentileM,3007

(11)

Use the output=both option.

quantile,graphQuantileM,37,output=both

quantile,graph?,

(12)

quantile

(13)

graph

References

  

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

  

Hyndman, R.J., and Fan, Y. "Sample Quantiles in Statistical Packages." American Statistician, Vol. 50. (1996): 361-365.

Compatibility

• 

The Student[Statistics][Quantile] command was introduced in Maple 18.

• 

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

See Also

Statistics[Percentile]

Statistics[Quantile]

Statistics[Quartile]

Student

Student[Statistics]

Student[Statistics][RandomVariable]