10.3: The Quantile Function (2024)

  • Page ID
    10878
  • \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}}}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{#1}}} \)

    \( \newcommand{\id}{\mathrm{id}}\) \( \newcommand{\Span}{\mathrm{span}}\)

    ( \newcommand{\kernel}{\mathrm{null}\,}\) \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\) \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\) \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\id}{\mathrm{id}}\)

    \( \newcommand{\Span}{\mathrm{span}}\)

    \( \newcommand{\kernel}{\mathrm{null}\,}\)

    \( \newcommand{\range}{\mathrm{range}\,}\)

    \( \newcommand{\RealPart}{\mathrm{Re}}\)

    \( \newcommand{\ImaginaryPart}{\mathrm{Im}}\)

    \( \newcommand{\Argument}{\mathrm{Arg}}\)

    \( \newcommand{\norm}[1]{\| #1 \|}\)

    \( \newcommand{\inner}[2]{\langle #1, #2 \rangle}\)

    \( \newcommand{\Span}{\mathrm{span}}\) \( \newcommand{\AA}{\unicode[.8,0]{x212B}}\)

    \( \newcommand{\vectorA}[1]{\vec{#1}} % arrow\)

    \( \newcommand{\vectorAt}[1]{\vec{\text{#1}}} % arrow\)

    \( \newcommand{\vectorB}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}}}\)

    \( \newcommand{\vectorC}[1]{\textbf{#1}}\)

    \( \newcommand{\vectorD}[1]{\overrightarrow{#1}}\)

    \( \newcommand{\vectorDt}[1]{\overrightarrow{\text{#1}}}\)

    \( \newcommand{\vectE}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{\mathbf {#1}}}} \)

    \( \newcommand{\vecs}[1]{\overset { \scriptstyle \rightharpoonup} {\mathbf{#1}}}\)

    \( \newcommand{\vecd}[1]{\overset{-\!-\!\rightharpoonup}{\vphantom{a}\smash{#1}}} \)

    \(\newcommand{\avec}{\mathbf a}\) \(\newcommand{\bvec}{\mathbf b}\) \(\newcommand{\cvec}{\mathbf c}\) \(\newcommand{\dvec}{\mathbf d}\) \(\newcommand{\dtil}{\widetilde{\mathbf d}}\) \(\newcommand{\evec}{\mathbf e}\) \(\newcommand{\fvec}{\mathbf f}\) \(\newcommand{\nvec}{\mathbf n}\) \(\newcommand{\pvec}{\mathbf p}\) \(\newcommand{\qvec}{\mathbf q}\) \(\newcommand{\svec}{\mathbf s}\) \(\newcommand{\tvec}{\mathbf t}\) \(\newcommand{\uvec}{\mathbf u}\) \(\newcommand{\vvec}{\mathbf v}\) \(\newcommand{\wvec}{\mathbf w}\) \(\newcommand{\xvec}{\mathbf x}\) \(\newcommand{\yvec}{\mathbf y}\) \(\newcommand{\zvec}{\mathbf z}\) \(\newcommand{\rvec}{\mathbf r}\) \(\newcommand{\mvec}{\mathbf m}\) \(\newcommand{\zerovec}{\mathbf 0}\) \(\newcommand{\onevec}{\mathbf 1}\) \(\newcommand{\real}{\mathbb R}\) \(\newcommand{\twovec}[2]{\left[\begin{array}{r}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\ctwovec}[2]{\left[\begin{array}{c}#1 \\ #2 \end{array}\right]}\) \(\newcommand{\threevec}[3]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\cthreevec}[3]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \end{array}\right]}\) \(\newcommand{\fourvec}[4]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\cfourvec}[4]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \end{array}\right]}\) \(\newcommand{\fivevec}[5]{\left[\begin{array}{r}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\cfivevec}[5]{\left[\begin{array}{c}#1 \\ #2 \\ #3 \\ #4 \\ #5 \\ \end{array}\right]}\) \(\newcommand{\mattwo}[4]{\left[\begin{array}{rr}#1 \amp #2 \\ #3 \amp #4 \\ \end{array}\right]}\) \(\newcommand{\laspan}[1]{\text{Span}\{#1\}}\) \(\newcommand{\bcal}{\cal B}\) \(\newcommand{\ccal}{\cal C}\) \(\newcommand{\scal}{\cal S}\) \(\newcommand{\wcal}{\cal W}\) \(\newcommand{\ecal}{\cal E}\) \(\newcommand{\coords}[2]{\left\{#1\right\}_{#2}}\) \(\newcommand{\gray}[1]{\color{gray}{#1}}\) \(\newcommand{\lgray}[1]{\color{lightgray}{#1}}\) \(\newcommand{\rank}{\operatorname{rank}}\) \(\newcommand{\row}{\text{Row}}\) \(\newcommand{\col}{\text{Col}}\) \(\renewcommand{\row}{\text{Row}}\) \(\newcommand{\nul}{\text{Nul}}\) \(\newcommand{\var}{\text{Var}}\) \(\newcommand{\corr}{\text{corr}}\) \(\newcommand{\len}[1]{\left|#1\right|}\) \(\newcommand{\bbar}{\overline{\bvec}}\) \(\newcommand{\bhat}{\widehat{\bvec}}\) \(\newcommand{\bperp}{\bvec^\perp}\) \(\newcommand{\xhat}{\widehat{\xvec}}\) \(\newcommand{\vhat}{\widehat{\vvec}}\) \(\newcommand{\uhat}{\widehat{\uvec}}\) \(\newcommand{\what}{\widehat{\wvec}}\) \(\newcommand{\Sighat}{\widehat{\Sigma}}\) \(\newcommand{\lt}{<}\) \(\newcommand{\gt}{>}\) \(\newcommand{\amp}{&}\) \(\definecolor{fillinmathshade}{gray}{0.9}\)

    The quantile function for a probability distribution has many uses in both the theory and application of probability. If \(F\) is a probability distribution function, the quantile function may be used to “construct” a random variable having \(F\) as its distributions function. This fact serves as the basis of a method of simulating the “sampling” from an arbitrary distribution with the aid of a random number generator. Also, given any finite class

    \(\{X_i: 1 \le i \le n\}\) of random variables, an independent class \(\{Y_i: 1 \le i \le n\}\) may be constructed, with each \(X_i\) and associated \(Y_i\) having the same (marginal) distribution. Quantile functions for simple random variables may be used to obtain an important Poisson approximation theorem (which we do not develop in this work). The quantile function is used to derive a number of useful special forms for mathematical expectation.

    General concept—properties, and examples

    If \(F\) is a probability distribution function, the associated quantile function \(Q\) is essentially an inverse of \(F\). The quantile function is defined on the unit interval (0, 1). For \(F\) continuous and strictly increasing at \(t\), then \(Q(u) = t\) iff \(F(t) = u\). Thus, if \(u\) is a probability value, \(t = Q(u)\) is the value of \(t\) for which \(P(X \le t) = u\).

    Example 10.3.28:The Weibull distribution (3, 2, 0)

    \(u = F(t) = 1 - e^{-3t^2}\) \(t \ge 0\) \(\Rightarrow\) \(t = Q(u) = \sqrt{-\text{ln } (1 - u)/3}\)

    Example 10.3.29:The Normal Distribution

    The m-function norminv, based on the MATLAB function erfinv (inverse error function), calculates values of \(Q\) for the normal distribution.

    The restriction to the continuous case is not essential. We consider a general definition which applies to any probability distribution function.

    Definition: If \(F\) is a function having the properties of a probability distribution function, then the quantile function for \(F\) is given by

    \(Q(u) = \text{inf } \{t: F(t) \ge u\}\) \(\forall u \in (0, 1)\)

    We note

    • If \(F(t^{*}) \ge u^{*}\), then \(t^{*} \ge \text{inf } \{t: F(t) \ge u^{*}\} = Q(u^{*})\)
    • If \(F(t^{*}) < u^{*}\), then \(t^{*} < \text{inf } \{t: F(t) \ge u^{*}\} = Q(u^{*})\)

    Hence, we have the important property:

    (Q1) \(Q(u) \le t\) iff \(u \le F(t)\) \(\forall u \in (0, 1)\)

    The property (Q1) implies the following important property:

    (Q2)If \(U\)~ uniform (0, 1), then \(X = Q(U)\) has distribution function \(F_X = F\). To see this, note that \(F_X(t) = P(Q(U) \le t] = P[U \le F(t)] = F(t)\).

    Property (Q2) implies that if \(F\) is any distribution function, with quantile function \(Q\), then the random variable \(X = Q(U)\), with \(U\) uniformly distributed on (0, 1), has distribution function \(F\).

    Example 10.3.30:Independent classes with prescribed distributions

    Suppose \(\{X_i: 1 \le i \le n\}\) is an arbitrary class of random variables with corresponding distribution functions \(\{F_i : 1 \le i \le n\}\). Let \(\{Q_i: 1 \le i \le n\}\) be the respective quantile functions. There is always an independent class \(\{U_i: 1 \le i \le n\}\) iid uniform (0, 1) (marginals for the joint uniform distribution on the unit hypercube with sides (0, 1)). Then the random variables \(Y_i = Q_i (U_i)\), \(1 \le i \le n\), form an independent class with the same marginals as the \(X_i\).

    Several other important properties of the quantile function may be established.

    10.3: The Quantile Function (2)

    Figure 10.3.9. Graph of quantile function from graph of distribution function,

    \(Q\) is left-continuous, whereas \(F\) is right-continuous.

    If jumps are represented by vertical line segments, construction of the graph of \(u = Q(t)\) may be obtained by the following two step procedure:

    • Invert the entire figure (including axes), then
    • Rotate the resulting figure 90 degrees counterclockwise

    This is illustrated in Figure 10.3.9. If jumps are represented by vertical line segments, then jumps go into flat segments and flat segments go into vertical segments.

    If \(X\) is discrete with probability \(p_i\) at \(t_i\), \(1 \le i \le n\), then \(F\) has jumps in the amount \(p_i\) at each \(t_i\) and is constant between. The quantile function is a left-continuous step function having value \(t_i\) on the interval \((b_{i - 1}, b_i]\), where \(b_0 = 0\) and \(b_i = \sum_{j = 1}^{i} p_j\). This may be stated

    If \(F(t_i) = b_i\), then \(Q(u) = t_i\) for \(F(t_{i - 1}) < u \le F(t_i)\)

    Example 10.2.31:Quantile function for a simple random variable

    Suppose simple random variable \(X\) has distribution

    \(X =\) [-2 0 1 3] \(PX = [0.2 0.1 0.3 0.4]

    Figure 1 shows a plot of the distribution function \(F_X\). It is reflected in the horizontal axis then rotated counterclockwise to give the graph of \(Q(u\) versus \(u\).

    10.3: The Quantile Function (3)

    Figure 10.3.10. Distribution and quantile functions for Example 10.3.31.

    We use the analytic characterization above in developing a number of m-functions and m-procedures.

    m-procedures for a simple random variable

    The basis for quantile function calculations for a simple random variable is the formula above. This is implemented in the m-function dquant, which is used as an element of several simulation procedures. To plot the quantile function, we use dquanplot which employs the stairs function and plots \(X\) vs the distribution function \(FX\). The procedure dsample employs dquant to obtain a “sample” from a population with simple distribution and to calculate relative frequencies of the various values.

    Example 10.3.32:Simple Random Variable

    X = [-2.3 -1.1 3.3 5.4 7.1 9.8];PX = 0.01*[18 15 23 19 13 12];dquanplotEnter VALUES for X XEnter PROBABILITIES for X PX % See Figure 10.3.11 for plot of resultsrand('seed',0) % Reset random number generator for referencedsampleEnter row matrix of values XEnter row matrix of probabilities PXSample size n 10000
     Value Prob Rel freq -2.3000 0.1800 0.1805 -1.1000 0.1500 0.1466 3.3000 0.2300 0.2320 5.4000 0.1900 0.1875 7.1000 0.1300 0.1333 9.8000 0.1200 0.1201Sample average ex = 3.325Population mean E[X] = 3.305Sample variance = 16.32Population variance Var[X] = 16.33

    10.3: The Quantile Function (4)

    Figure 10.3.11. Quantile function for Example 10.3.32.

    Sometimes it is desirable to know how many trials are required to reach a certain value, or one of a set of values. A pair of m-procedures are available for simulation of that problem. The first is called targetset. It calls for the population distribution and then for the designation of a “target set” of possible values. The second procedure, targetrun, calls for the number of repetitions of the experiment, and asks for the number of members of the target set to be reached. After the runs are made, various statistics on the runs are calculated and displayed.

    Example 10.3.33
    X = [-1.3 0.2 3.7 5.5 7.3]; % Population valuesPX = [0.2 0.1 0.3 0.3 0.1]; % Population probabilitiesE = [-1.3 3.7]; % Set of target statestargetsetEnter population VALUES XEnter population PROBABILITIES PXThe set of population values is -1.3000 0.2000 3.7000 5.5000 7.3000Enter the set of target values ECall for targetrun
    rand('seed',0) % Seed set for possible comparisontargetrunEnter the number of repetitions 1000The target set is -1.3000 3.7000Enter the number of target values to visit 2The average completion time is 6.32The standard deviation is 4.089The minimum completion time is 2The maximum completion time is 30To view a detailed count, call for D.The first column shows the various completion times;the second column shows the numbers of trials yielding those times% Figure 10.6.4 shows the fraction of runs requiring t steps or less

    10.3: The Quantile Function (5)

    Figure 10.3.12. Fraction of runs requiring \(t\) steps or less.

    m-procedures for distribution functions

    A procedure dfsetup utilizes the distribution function to set up an approximate simple distribution. The m-procedure quanplot is used to plot the quantile function. This procedure is essentially the same as dquanplot, except the ordinary plot function is used in the continuous case whereas the plotting function stairs is used in the discrete case. The m-procedure qsample is used to obtain a sample from the population. Since there are so many possible values, these are not displayed as in the discrete case.

    Example 10.3.34:Quantile function associated with a distribution function

    F = '0.4*(t + 1).*(t < 0) + (0.6 + 0.4*t).*(t >= 0)'; % StringdfsetupDistribution function F is entered as a stringvariable, either defined previously or upon callEnter matrix [a b] of X-range endpoints [-1 1]Enter number of X approximation points 1000Enter distribution function F as function of t FDistribution is in row matrices X and PXquanplotEnter row matrix of values XEnter row matrix of probabilities PXProbability increment h 0.01 % See Figure 10.3.13 for plotqsampleEnter row matrix of X values XEnter row matrix of X probabilities PXSample size n 1000Sample average ex = -0.004146Approximate population mean E(X) = -0.0004002 % Theoretical = 0Sample variance vx = 0.25Approximate population variance V(X) = 0.2664

    10.3: The Quantile Function (6)

    Figure 10.3.13. Quantile function for Example 10.3.34.

    m-procedures for density functions

    An m- procedure acsetup is used to obtain the simple approximate distribution. This is essentially the same as the procedure tuappr, except that the density function is entered as a string variable. Then the procedures quanplot and qsample are used as in the case of distribution functions.

    Example 10.3.35:Quantile function associated with a density function

    acsetupDensity f is entered as a string variable.either defined previously or upon call.Enter matrix [a b] of x-range endpoints [0 3]Enter number of x approximation points 1000Enter density as a function of t '(t.^2).*(t<1) + (1- t/3).*(1<=t)'Distribution is in row matrices X and PXquanplotEnter row matrix of values XEnter row matrix of probabilities PXProbability increment h 0.01 % See Figure 10.3.14 for plotrand('seed',0)qsampleEnter row matrix of values XEnter row matrix of probabilities PXSample size n 1000Sample average ex = 1.352Approximate population mean E(X) = 1.361 % Theoretical = 49/36 = 1.3622Sample variance vx = 0.3242Approximate population variance V(X) = 0.3474 % Theoretical = 0.3474

    10.3: The Quantile Function (7)

    Figure 10.3.14. Quantile function for Example 10.3.35.

    10.3: The Quantile Function (2024)

    FAQs

    What does 10 quantile mean? ›

    Quartiles are also quantiles; they divide the distribution into four equal parts. Percentiles are quantiles that divide a distribution into 100 equal parts and deciles are quantiles that divide a distribution into 10 equal parts.

    What is the normal quantile function? ›

    The quantile function of a normal distribution is equal to the inverse of the distribution function since the latter is continuous and strictly increasing. However, as we explained in the lecture on normal distribution values, the distribution function of a normal variable has no simple analytical expression.

    How do you solve for quantile? ›

    How to find quantiles
    1. Calculate n * (3 / 5).
    2. If n * (3 / 5) is an integer, then the third 5-quantile is the mean of the numbers at positions n * (3 / 5) and n * (3 / 5) + 1.
    3. If n * (3 / 5) is not an integer, then round it up. The number at this position is the third 5-quantile.
    May 20, 2022

    What is the formula for the quantile function? ›

    Therefore, the quantile function is QX(p)=−log(1−p) Q X ( p ) = − log ⁡ ( 1 − p ) for 0<p<1 0 < p < 1 . X=QX(U) X = Q X ( U ) . The Uniform(0, 1) spinner lands uniformly on values between 0 and 1.

    What is a good quantile score? ›

    For example, a student's Quantile measure should be at 1350Q by high school graduation to handle the math needed in college and most careers. A student Quantile measure helps you to know: Which skills and concepts students are ready to learn.

    What is the average quantile score for a 11th grader? ›

    Reporting Quantile Student Measures for Students and Materials
    GradeQuantile
    91475Q
    101500Q
    111575Q
    121650Q
    10 more rows

    What does the quantile function tell us? ›

    In probability and statistics, the quantile function outputs the value of a random variable such that its probability is less than or equal to an input probability value.

    What is the 90% quantile? ›

    Quartiles are essentially ranking mechanisms. The 90th percentile is that position in a data set which has 90% of data points below it, and 10% above it. The upper quartile is that position in the data set which has 75% of values below it and 25% above it.

    What is the 95% quantile? ›

    A quantile is called a percentile when it is based on a 0-100 scale. The 0.95-quantile is equivalent to the 95-percentile and is such that 95 % of the sample is below its value and 5 % is above.

    What is quantile function for dummies? ›

    Quantiles are specific points in a distribution that divide the data into equal parts, while the quantile function enables one to find these points for continuous distributions. If you are using the quantile function to find the median of a set of data, you are looking for the 50th percentile.

    What is quantile in math? ›

    Quantile measures are expressed as numbers followed by a “Q” (for example, 850Q) and range from emerging mathematician (below 0Q) to above 1600Q. The Quantile Framework spans the developmental continuum from the content typically taught in kindergarten to Algebra II, Geometry, Trigonometry and Pre-calculus.

    What is the formula for quantile method? ›

    Calculating Quartiles Manually

    Using the following formulas, you calculate each quartile: First Quartile (Q1) = (n + 1) x 1/4. Second Quartile (Q2), or the median = (n + 1) x 2/4. Third Quartile (Q3) = (n + 1) x 3/4.

    What is 20% quantile? ›

    A quintile is one of five values that divide a range of data into five equal parts, each being 1/5th (20 percent) of the range. A population split into three equal parts is divided into tertiles, while one split into fourths is divided into quartiles.

    What does 75% quantile mean? ›

    75th Percentile - Also known as the third, or upper, quartile. The 75th percentile is the value at which 25% of the answers lie above that value and 75% of the answers lie below that value.

    What is 0.3 quantile? ›

    By a quantile, we mean the fraction (or percent) of points below the given value. That is, the 0.3 (or 30%) quantile is the point at which 30% percent of the data fall below and 70% fall above that value.

    What grade level is 1200 quantile? ›

    Quantile measure
    GradeStar Math Cap
    61200Q
    71325Q
    81450Q
    91475Q
    9 more rows
    Jun 10, 2024

    What is the 95% quantile of standard normal? ›

    So the 95th percentile is 1.645. In other words, there is a 95% probability that a standard normal will be less than 1.645. Eg: z-scores on an IQ test have a standard normal distribution.

    What does quantile mean for schools? ›

    Quintile 1 is the group of schools in each province catering for the poorest 20% of learners. Quintile 2 schools cater for the next poorest 20% of schools, and so on. Quintile 5 schools are those schools that cater for the least poor 20% of learners. Poorer quintiles have higher targets than the less poor quintiles.

    What is quantile in class rank? ›

    Each quartile represents 25% of the students in the class, based on their cumulative GPA or other criteria used by a high school for ranking students. Here's a brief breakdown of the quartiles: 1. First Quartile (top 25%): These students have the highest GPAs and are in the top quarter of their class.

    References

    Top Articles
    Latest Posts
    Article information

    Author: Lakeisha Bayer VM

    Last Updated:

    Views: 6654

    Rating: 4.9 / 5 (49 voted)

    Reviews: 80% of readers found this page helpful

    Author information

    Name: Lakeisha Bayer VM

    Birthday: 1997-10-17

    Address: Suite 835 34136 Adrian Mountains, Floydton, UT 81036

    Phone: +3571527672278

    Job: Manufacturing Agent

    Hobby: Skimboarding, Photography, Roller skating, Knife making, Paintball, Embroidery, Gunsmithing

    Introduction: My name is Lakeisha Bayer VM, I am a brainy, kind, enchanting, healthy, lovely, clean, witty person who loves writing and wants to share my knowledge and understanding with you.