10 Percentiles
Example 10.1 Maggie and Seamus are babies who have just turned one. At their one-year visits to their pediatrician:
- Maggie is 76cm tall and in the 75th percentile of height for girls.
- Seamus is 72cm tall and in the 10th percentile of height for boys.
Explain what these percentiles mean.
- A distribution is characterized by its percentiles.
- Roughly, the value
is the th percentile (a.k.a. quantile) of a distribution of a random variable if percent of values of the variable are less than or equal to : . - Any distribution can be represented by a spinner. A spinner basically describes a distribution by specifying all the percentiles. For example,
- The 25th percentile goes 25% of the way around the axis (at “3 o’clock”)
- The 50th percentile goes 50% of the way around the axis (at “6 o’clock”)
- The 75th percentile goes 75% of the way around the axis (at “9 o’clock”)
10.1 Cumulative Distribution Functions
- Roughly, the value
is the th percentile of a distribution of a random variable if percent of values of the variable are less than or equal to : . - The cumulative distribution function (cdf) of a random variable fills in the blank for any given
: is the (blank) percentile. That is, for an input , the cdf outputs . - The cumulative distribution function (cdf) of a random variable
is the function, defined by . A cdf is defined for all real numbers regardless of whether is a possible value of .
Example 10.2 Continuing Example 9.2 where Regina’s arrival time
- Compute and interpret
.
- Compute and interpret
.
- Compute and interpret
.
- Compute
- Compute
- Find the cdf of
.
Example 10.3 Let
- Find the pmf of
and sketch a plot of it.
- Find the cdf of
and sketch a plot of it.
- Let
be the number of tails in 3 flips of a fair coin. Find the cdf of .
- A cdf is defined for all values of
, regardless if is a possible value of the RV. - A cdf is a non-decreasing function: if
then . - A cdf approaches 0 as the input approaches
: - A cdf approaches 1 as the input approaches
: - 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
- For any random variable
with cdf Whether the inequalities in the above event are strict ( ) or not ( ) matters for discrete random variables, but not for continuous. - Random variables
and have the same distribution if their cdfs are the same, that is, if for all . - That is, two random variables have the same distribution if all the percentiles are the same.
10.2 Quantile functions
- The quantile function (essentially the inverse cdf) fills in the following blank for a given
: the th percentile is (blank).
Example 10.4 Continuing Example 9.2 where Regina’s arrival time
- Find the median (i.e., 50th percentile) of
.
- Find the 25th percentile of
.
- Find the quantile function of
.
- Construct a spinner for simulating values of
according to its distribution.
- For a continuous random variable
with cdf , the quantile function is the inverse of the cdf, . - The quantile function (essentially the inverse cdf) fills in the following blank for a given
: the th percentile is (blank). - For example, evaluating the quantile function at
outputs the 25th percentile. - The quantile function can be used to create a spinner for a distribution. Basically, the values on the outside boundary of the spinner are scaled based on the quantile function (which is determined by the cdf). Intervals corresponding to regions of higher density (“more likely”) values are stretched out on the spinner boundary; intervals corresponding regions of lower density (“less likely” values) are shrunk.
- Universality of the Uniform (or “one spinner to rule them all”). Let
be a cdf and its corresponding quantile function. Let have a Uniform(0, 1) distribution and define the random variable . Then the cdf of is . - Universality of the uniform might look complicated but all it basically says is that you can construct a spinner by putting the 25th percentile 25% of the way around, the 75th percentile 75% of the way around, etc.
- Actually, universality of the uniform says we don’t have to create a new spinner. We can just spin the Uniform(0, 1) spinner and transform each resulting value by plugging it into the quantile function.
= 10000
N_rep
= runif(N_rep, 0, 1)
u
= 60 * sqrt(u)
x
hist(x,
freq = FALSE,
main = "")