Statistics - Maple Programming Help

Home : Support : Online Help : Statistics and Data Analysis : Statistics Package : Quantities : Statistics/Quartile

Statistics

 Quartile
 compute quartiles

 Calling Sequence Quartile(A, q, ds_options) Quartile(X, q, rv_options)

Parameters

 A - X - algebraic; random variable or distribution q - algebraic; quartile ds_options - (optional) equation(s) of the form option=value where option is one of ignore, method, or weights; specify options for computing the quartile of a data set rv_options - (optional) equation of the form numeric=value; specifies options for computing the quartile of a random variable

Description

 • The Quartile function computes the specified quartile of the specified random variable or data set.
 • The first parameter can be a data set (e.g., a Vector), a Matrix data set, a distribution (see Statistics[Distribution]), a random variable, or an algebraic expression involving random variables (see Statistics[RandomVariable]).
 • The second parameter q is the quartile.

Options

 For a description of the available options, see the Statistics[Quantile] help page. Calling Quartile with quartile $q$ is equivalent to calling Quantile with probability $0.25q$.

Examples

 > $\mathrm{with}\left(\mathrm{Statistics}\right):$

Compute the quartile of the Weibull distribution with parameters a and b.

 > $\mathrm{Quartile}\left(\mathrm{Weibull}\left(a,b\right),3\right)$
 ${a}{}{\left({2}{}{\mathrm{ln}}{}\left({2}\right)\right)}^{\frac{{1}}{{b}}}$ (1)

Use numeric parameters.

 > $\mathrm{Quartile}\left(\mathrm{Weibull}\left(3,5\right),3\right)$
 ${3}{}{{2}}^{{1}}{{5}}}{}{{\mathrm{ln}}{}\left({2}\right)}^{{1}}{{5}}}$ (2)
 > $\mathrm{Quartile}\left(\mathrm{Weibull}\left(3,5\right),3,\mathrm{numeric}\right)$
 ${3.20252365335208}$ (3)

Generate a random sample of size 100000 drawn from the above distribution and compute the sample quartile.

 > $A≔\mathrm{Sample}\left(\mathrm{Weibull}\left(3,5\right),{10}^{5}\right):$
 > $\mathrm{Quartile}\left(A,3\right)$
 ${3.20250412161250}$ (4)

Consider the following Matrix data set.

 > $M≔\mathrm{Matrix}\left(\left[\left[3,1130,114694\right],\left[4,1527,127368\right],\left[3,907,88464\right],\left[2,878,96484\right],\left[4,995,128007\right]\right]\right)$
 ${M}{≔}\left[\begin{array}{ccc}{3}& {1130}& {114694}\\ {4}& {1527}& {127368}\\ {3}& {907}& {88464}\\ {2}& {878}& {96484}\\ {4}& {995}& {128007}\end{array}\right]$ (5)

We compute the third quartile of each of the columns.

 > $\mathrm{Quartile}\left(M,3\right)$
 $\left[\begin{array}{ccc}{4.}& {1262.33333333333}& {127581.}\end{array}\right]$ (6)

References

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

Compatibility

 • The A parameter was updated in Maple 16.