13  Percentiles: Cumulative Distribution Functions and Quantile Functions

Example 13.1 Explain what the percentiles mean in the following statements.






Example 13.2 Recall Example 12.1 and Example 12.2 where office arrival times, measured in minutes after 8am, followed this pdf \[ f_X(x) = \begin{cases} (2/3600)x, & 0<x<60,\\ 0 & \text{otherwise.} \end{cases} \]

  1. Compute \(\text{P}(X < 15)\) and phrase the result in terms of a percentile.




  2. Compute \(\text{P}(X < 45)\) and phrase the result in terms of a percentile.




  3. Find an expression for \(\text{P}(X \le x)\) for general \(x\). This function, denoted \(F_X(x)\), is called the cumulative distribution function (cdf) of \(X\).




  4. How does the cdf relate to percentiles?




  5. Use the cdf to determine what percentile 30 minutes after 8am is.




  6. Compute and interpret \(F(40) - F(30)\).




Example 13.3 Continuing Example 13.2 where \(X\) (minutes after 8am) has pdf \[ f_X(x) = (2/3600)x, \qquad 0<x<60. \] and cdf \[ F_X(x) = \begin{cases} 0, & x<0,\\ (x/60)^2, & 0<x<60,\\ 1, & x>60. \end{cases} \]

  1. Find and interpret the 10th percentile.




  2. Find and interpret the 90th percentile.




  3. Find an equation for the (100\(p\))th percentile (e.g., \(p=0.9\) for the 90th percentile).




Example 13.4 Continuing Example 13.3 where \(X\) (minutes after 8am) has pdf \[ f_X(x) = (2/3600)x, \qquad 0<x<60. \] and cdf \[ F_X(x) = \begin{cases} 0, & x<0,\\ (x/60)^2, & 0<x<60,\\ 1, & x>60. \end{cases} \] and quantile function \[ Q(p) = 60\sqrt{p}, \qquad 0<p<1. \]

  1. Construct a circular spinner for simulating values of \(X\). Version 1: label the values 0, 10, 20, 30, 40, 50, 60. Careful: they will not be equally spaced.




  2. Sketch a histogram with equal bin widths—0 to 10, 10 to 20, etc.—that you would expect to see after spinning the version 1 spinner many times. Does it have the proper shape?




  3. Construct a circular spinner for simulating values of \(X\). Version 2: label the circular axis so that your spinner has 12 sectors each with probability 1/12.




  4. Sketch a histogram that you would expect to see after spinning the version 2 spinner many times. Start by sketching a histogram with unequal bin widths, then sketch the correspond equal bin width histogram. Does it have the proper shape?




Example 13.5 Continuing Example 12.3. Suppose that \(X\) is a claim amount in excess of the decuctible for a car insurance policy that incurs a claim, measured in thousands of dollars. Assume that \(X\) has pdf \[ f_X(x) = (1/4.3) e^{-x/4.3}, \qquad x >0 \]

  1. Compute \(\text{P}(X < 5)\) and phrase the result in terms of a percentile.




  2. Find an expression for the CDF of \(X\).




  3. Compute the 25th percentile.




  4. Find an expression for the quantile function of \(X\).




  5. Use the quantile function to find the 75th percentile.




13.1 Exercises

Exercise 13.1 Continuing Exercise 12.1. In a certain population, household income \(X\) ($ thousands) follows the pdf \[ f_X(x) = c x^{-2.5}, \quad x \ge 30 \] for an appropriate constant \(c\). Note that the measurement units are $ thousands, so 1 represents 1 thousand dollars. (This is not a super realistic example, but just go with it.)

  1. Compute \(\text{P}(X\le 100)\) and phrase the result in terms of a percentile.




  2. Find the cdf of \(X\).




  3. Find the 10th percentile.




  4. Find the quantile function of \(X\).




  5. Sketch a circular spinner for simulating values of \(X\).




Exercise 13.2 Let \(X\) be the number of heads in 3 flips of a fair coin.

  1. Find the pmf of \(X\) and sketch a plot of it.




  2. Find the cdf of \(X\) and sketch a plot of it.




  3. Let \(Y\) be the number of tails in 3 flips of a fair coin. Find the cdf of \(Y\).




  • A cdf is a non-decreasing function: if \(x_1 \le x_2\) then \(F_X(x_1)\le F_X(x_2)\).
  • A cdf approaches 0 as the input approaches \(-\infty\): \(\lim_{x\to-\infty}F_X(x) = 0\)
  • A cdf approaches 1 as the input approaches \(\infty\): \(\lim_{x\to\infty}F_X(x) = 1\)
  • The cdf of a discrete random variable is a step function.
    • The steps occur at the possible values of the random variable.
    • The height of a particular step corresponds to the probability of that value, given by the pmf.
  • The cdf of a continuous random variable is a continuous function.
    • The cdf of a continuous random variable is obtained by integrating the pdf, so
    • The pdf of a continuous random variable is obtained by differentiating the cdf \[ F_X' = f_X \qquad \text{if $X$ is continuous} \]
  • For any random variable \(X\) with cdf \(F_X\) \[ F_X(b) - F_X(a) = \text{P}(a<X \le b) \] Whether the inequalities in the above event are strict (\(<\)) or not (\(\le\)) matters for discrete random variables, but not for continuous.
  • Random variables \(X\) and \(Y\) have the same distribution if their cdfs are the same, that is, if \(F_X(u) = F_Y(u)\) for all \(u\).
  • That is, two random variables have the same distribution if all the percentiles are the same.