22 Named Distributions
$$
$$
In this chapter, we introduce three named continuous distributions. Each of these three distributions can be derived from location-scale transformations (Section 21.3) of a single distribution. This makes it easy to derive the expected value and variance of these named distributions.
We have already encountered specific instances of all three distributions, so this chapter is more of a synthesis and a review of facts that you already know.
22.1 Uniform
The uniform distribution is used to model continuous random variables that are “equally likely” to take on any value in a range. In Example 18.3, we modeled the distance of one of Jackie Joyner-Kersee’s long jumps as a uniform random variable.
Equivalently, a random variable has a \(\text{Uniform}(a, b)\) distribution if its CDF is \[ F(x) = \int_{-\infty}^x f(t)\,dt = \begin{cases} 0 & x \leq a \\ \frac{x-a}{b-a} & a < x < b \\ 1 & x \geq b \end{cases}.\]
This CDF is graphed below.
Using Definition 22.1, the distance \(X\) of one of
Joyner-Kersee’s long jumps is a \(\textrm{Uniform}(a= 6.3, b= 7.5)\) random variable. We can use the PDF or CDF to calculate probabilities such as \(P(7.0 < X < 7.3)\).
In fact, R has a built-in function for the CDF of a uniform distribution, punif, which we can use to calculate probabilities. For example, to determine \(P(7.0 < X < 7.3)\), we can calculate \(F(7.3) - F(7.0)\) in R as follows:
We can derive any uniform distribution as a location-scale transformation of the standard uniform distribution—that is, a \(\textrm{Uniform}(a= 0, b= 1)\) distribution. To see this, let \(U\) be a standard uniform random variable. If we scale \(U\) by \((b - a)\) and shift by \(a\), then the resulting variable will be uniformly distributed between \(a\) and \(b\).
22.1.1 Expectation and Variance
Proposition 22.1 provides a simple way to derive the expectation and variance of any uniform distribution. First, we calculate the expectation \(\text{E}\!\left[ U \right]\) and variance \(\text{Var}\!\left[ U \right]\) for a standard uniform random variable \(U\). Then, we use properties of expected value and variance for linear transformations to derive the expectation of a general uniform random variable.
Using Proposition 22.2, it is easy to calculate that the expected distance of one of Joyner-Kersee’s long jumps is \[\text{E}\!\left[ X \right] = \frac{6.3 + 7.5}{2},\] and the variance of one of her long jumps is \[\text{Var}\!\left[ X \right] = \frac{(7.5 - 6.3)^2}{12} = 0.12.\]
22.2 Exponential
The exponential distribution is used to model the time until some event. In Example 18.7, we used this distribution to model the time until the first click of a Geiger counter.
Equivalently, a random variable has a \(\text{Exponential}(\lambda)\) distribution if its CDF is \[ F(x) = \int_{-\infty}^x f(t)\,dt = \begin{cases} 0 & x \leq 0 \\ 1 - e^{-\lambda x} & x > 0 \end{cases}.\]
This CDF is graphed below.
In this language, we can describe the time (in seconds) until the first click of a Geiger counter from Example 18.7, \(T\), as an \(\textrm{Exponential}(\lambda=1.2)\) random variable. We can use the PDF or CDF to calculate probabilities such as \(P(T > 2.3)\).
In fact, R has a built-in function for the CDF of an exponential distribution, pexp, which we can use to calculate probabilities. For example, to determine \(P(T > 2.3)\), we can calculate \(1 - F(2.3)\) in R as follows:
We can derive any exponential distribution as a scale transformation of the standard exponential distribution—that is, a \(\textrm{Exponential}(\lambda=1)\) distribution. To see this, let \(Z\) be a standard exponential random variable. Note that \(Z\) is measured in time units so that the rate is \(1\). To convert back to the original time units, we need to scale \(Z\) by \(\frac{1}{\lambda}\).
22.2.1 Expectation and Variance
Proposition 22.3 provides a simple way to derive the expectation and variance of any exponential distribution. First, we calculate the expectation \(\text{E}\!\left[ Z \right]\) and variance \(\text{Var}\!\left[ Z \right]\) for a standard exponential random variable \(Z\). Then, we use properties of expected value and variance for linear transformations to derive the expectation of a general exponential random variable.
Using Proposition 22.4, it is easy to write down the expected time of the first click of the Geiger counter from Example 18.7: \[\text{E}\!\left[ X \right] = \frac{1}{\lambda} = \frac{1}{1.2},\] and the variance of the time of the first click: \[\text{Var}\!\left[ X \right] = \frac{1}{\lambda^2} = \frac{1}{1.2^2}.\]
22.2.2 Memoryless Property
The exponential distribution is frequently used to model the time until an event. What are some practical implications of using the exponential model?
One property of the exponential distribution is that it is memoryless. That is, if the event has not happened by time \(t\), then the remaining time until the event happens has the same exponential distribution.
The memoryless property is controversial. In real-world situations, we expect that if you have already waited a long time, then the remaining waiting time will be shorter. But when we use the exponential distribution to model waiting times, this will not be the case because of the memoryless property. For this reason, statisticians and engineers typically use non-memoryless distributions, such as the Weibull distribution, to model waiting times.
22.3 Normal
The normal distribution is the most important continuous model in probability and statistics. In Example 18.5, we used the normal distribution to model the high temperature in May in Iqaluit.
To begin our formal discussion of the normal distribution, we will first define the standard normal distribution, which is a bell-shaped PDF centered around \(0\). Then, we will apply location-scale transformations to the standard normal distribution to construct general normal distributions, which are bell-shaped PDFs that can have any width and be centered around values other than \(0\).
22.3.1 Standard Normal Distribution
Unfortunately, this integral is not easy to evaluate because \(e^{-x^2 / 2}\) has no elementary antiderivative. We can approximate the integral numerically using R.
In Example 23.9, we will use tools from joint distributions to show that \(k = \sqrt{2\pi}\) so that the standard normal PDF is \[ \begin{equation} f(x) = \frac{1}{\sqrt{2\pi}} e^{-x^2 / 2}; \qquad -\infty < x < \infty. \end{equation} \tag{22.4}\]
This PDF is graphed in Figure 22.5.
Equivalently, a random variable has a standard normal distribution if its CDF is \[ \Phi(x) \overset{\text{def}}{=}\int_{-\infty}^x \frac{1}{\sqrt{2\pi}} e^{-t^2/2}\,dt. \tag{22.5}\]
Because the PDF Equation 22.4 has no elementary antiderivative, the CDF cannot be simplified beyond Equation 22.5. For this reason, we will often express probabilities in terms of the standard normal CDF \(\Phi\). Note that we are using the symbol \(\Phi\) for the standard normal CDF, as opposed to the more generic \(F\). This is an indication of the importance of the standard normal CDF.
22.3.2 General Normal Distribution
The general normal distribution is defined as a location-scale transformation of a standard normal distribution. That is, the general normal PDF is bell-shaped, like the standard normal PDF (Equation 22.4), but with a different width and centered around a value that is not necessarily \(0\).
However, we do not usually have to work with Equation 22.8 because we can always convert a normal random variable into a standard normal random variable, by a process called standardization. Standardization is simply the inverse of Equation 22.7. It says that \[ Z = \frac{X - \mu}{\sigma}. \tag{22.9}\] The next example illustrates how standardization can be used to solve problems.
22.3.3 Expectation and Variance
Because we defined the (general) normal distribution as a location-scale transformation of a standard normal random variable, we can derive the expectation and variance easily. First, we calculate the expectation \(\text{E}\!\left[ Z \right]\) and variance \(\text{Var}\!\left[ Z \right]\) for a standard normal random variable \(Z\). Then, we use Proposition 21.2 and Proposition 21.3 to obtain the expectation and variance of a general normal random variable.
22.4 Exercises
Exercise 22.1 (Marguerite wait time) The Marguerite, campus shuttle system for Stanford University, arrives at the Oval every \(15\) minutes. You walk to the Oval without looking at the schedule, so your arrival time is effectively random, relative to the Marguerite’s schedule.
Let \(W\) be your wait time, in minutes, until the next Marguerite arrives.
What is your expected wait time?
The Marguerite takes \(4\) minutes to go from the Oval to the Palo Alto Caltrain station. If your train leaves in \(10\) minutes, what is the probability you will catch the train?
If you want to be at least \(80\%\) sure that you will catch the Marguerite within the next \(w\) minutes, what is \(w\)?
Exercise 22.2 (Multimeter reading error) A multimeter reports voltage rounded to the nearest \(0.01 V\). Engineers often model the rounding error as equally likely anywhere within half a unit.
Your circuit spec says that voltage must be within \(\pm 0.003 V\) of a target, and you are deciding whether the meter’s rounding along could cause a pass/fail mistake. What is the probability the rounding error stays inside the tolerance?
Exercise 22.3 (Competing risks) A fintech company monitors two independent incident streams:
- App crashes at rate \(0.3\) per day;
- Payment failures at rate \(0.1\) per day.
Assume each follows a Poisson process (Section 18.3) and they are independent. Let \(T\) be the time, in days, until the next incident of either type.
What is the probability of going at least 5 days with no incidents?
What is the probability that the next incident is an app crash?
Exercise 22.4 (Network switch failure) A company runs a fleet of identical network switches. Based on long-term reliability testing, the company reports that during the “useful life” phase (after burn-in and before wear-out), the switch has an approximately constant instantaneous failure rate of \(h = 0.0008\) failures per hour.
Engineers often model time-to-failure \(T\) with an exponential distribution when the hazard rate is constant: \(T \sim \text{Exponential}(\lambda = h)\).
This model is used when the chance of failing in the next tiny time window is about the same no matter how old the device is (no aging).
The company offers a warranty that covers failures within the first \(1,000\) hours. If a switch fails, what is the probability it is covered under warranty?
A particular switch has been running for \(600\) hours. What is the probability it survives an additional \(300\) hours? Explain what your answer implies about whether “surviving so far” makes the device safer.
Exercise 22.5 (Bottling sodas) A soda company’s bottling line is set to target \(500 \text{ mL}\) per bottle. Due to several sources of variation (pressure fluctuations, micro-foaming, sensor noise), the fill volume from bottle-to-bottle is approximated by a normal distribution.
Let \(V\) be the fill volume, in mL, for a randomly selected bottle and assume \(V \sim \text{Normal}(500,16)\).
Regulations and customer complaints make underfilling expensive; any bottle with \(492 \text{ mL}\) or less must be discarded.
What is the probability that a randomly chosen bottle gets discarded?
Management wants the underfill rate to be only \(0.5\%\). If the variability stays the same, what should the new target mean \(\mu\) be set to (instead of \(\text{500 mL}\)?) We can think of \(\mu - 500\) as the “extra cushion” we are intentionally overfilling.
Exercise 22.6 (Biomarkers) A clinic uses a blood biomarker \(X\) to screen for a condition. For healthy adults, the biomarker is approximately normal with \(X \sim \text{Normal}(50,100)\). The clinic will flag a patient as “screen positive” if \(X\) exceeds a cutoff \(c\).
The clinic wants only \(5\%\) of healthy patients to be flagged (to keep follow-up testing manageable). Find the screening threshold \(c\) that achieves a \(5\%\) false-positive rate.
The clinic screens \(800\) healthy patients per month. How many false positives should they expect per month, approximately? Explain why this is a relevant operational metric.
Exercise 22.7 (Stock returns) A common first-pass finance model treats one-year log returns as normal. That means the price evolves multiplicatively, and the end-of-year price is lognormal.
Suppose a stock is currently \(\$100\) and the one-year continuously compounded return \(R\) satisfies
\[ S_1 = S_0 e^R, \qquad R \sim \text{Normal}(0.08,0.04). \] a. What is the probability the stock is down at least \(10\%\) after one year?
What is the probability the stock is up at least \(30\%\)?
Compute the median and the mean of \(S_1\). Interpret each value and explain intuitively why the mean is greater than the median.