Student[Statistics]
Quantile
compute quantiles
Quartile
compute quartiles
Percentile
compute percentiles
Decile
compute deciles
Calling Sequence
Parameters
Description
Computation
Examples
References
Compatibility
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)
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
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 4⁢pth quartile, the 10⁢pth decile, and the 100⁢pth percentile.
For a real valued random variable X with distribution function F⁡x, and any p between 0 and 1, the pth quantile of X is defined as inf⁢{y⁢|⁢Fy⁢≥⁢p}. 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=n⁢qn+1. This is the same as using method=1 in Statistics[ Quantile].
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.
with⁡StudentStatistics:
Compute a quantile of the normal distribution.
Quantile⁡NormalRandomVariable⁡4,9,12
4
Use numeric parameters.
Quantile⁡NormalRandomVariable⁡4,9,0.5
4.
Quantile⁡NormalRandomVariable⁡4,9,12,numeric
Use the output=plot option.
Quantile⁡NormalRandomVariable⁡4,9,13,output=plot
Create two normal random variables and compute the quantiles of their sum.
X≔NormalRandomVariable⁡5,2:
Y≔NormalRandomVariable⁡2,5:
Quantile⁡X+Y,13
7⁢58+58⁢RootOf⁡3⁢erf⁡_Z+1⁢5858
Quantile⁡X+Y,13,numeric
4.68046250585916
Compute the quantile of a data sample.
Quantile⁡1,2,45,4,2,0.9,2,4,7,276,1,−1,0.92
276
Consider the following Matrix data sample.
M≔Matrix⁡3,16.0,π,4.0,17,18,196,sqrt⁡5,464,2,88,−8,4,5,0
M≔
We compute the 37 quantile of each of the columns.
Quantile⁡M,37
Quartile⁡M,127
Decile⁡M,307
Percentile⁡M,3007
Use the output=both option.
quantile,graph≔Quantile⁡M,37,output=both
quantile,graph≔?,
quantile
graph
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.
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][RandomVariable]
Download Help Document