STAT 200 – Introductory Statistics
January 24, 2026
A continuous random variable is a random variable with a sample space consisting of an interval of values.
Examples:
Frequently, a discrete random variable is “essentially” continuous because the spacing between adjacent values is insignificant when compared to the useful data range.
Examples:
Why does this matter?
The uniform distribution is a continuous distribution that describes random variables whose likelihood of occurring is constant across a specified interval.
If the random variable \(X\) has a Uniform distribution, we write:
\[ X \sim \text{Uniform}(a, b) \]
The Uniform distribution is characterized by these features:
The probability density function for the Uniform distribution is given by:
\[ f(x; a, b) = \begin{cases} \dfrac{1}{b-a} & x \in [a, b] \\[10pt] 0 & \textrm{otherwise} \end{cases} \]
Like the probability mass function for a discrete random variable, the probability density function uniquely defines a continuous distribution.
Note that the probability density function does not represent \(\mathbb{P}(X = x)\), unlike the probability mass function of a discrete random variable. This can be hard to understand at first!
Technically, \(\mathbb{P}(X = x) = 0\) for any specific value of \(x\).
Probabilities are defined as areas under the density curve.
There is a particularly pesky stoplight between my home and campus in the morning. It regularly cycles among green (for \(175\) seconds), yellow (\(5\) seconds), and red (\(180\) seconds).
Given that I stop at the light, what is the probability that I wait at most \(60\) seconds?
Because the time I wait does not depend on when I get there, and because there is a definite lower- and upper-bound to my wait time (\(0\) and \(180\) seconds, respectively), the wait time distribution follows a Uniform distribution.
If we define \(T\) as the time (in seconds) I spend waiting at this light, then
\[ T \sim \text{Uniform}(0, 180) \]
So we need to calculate \(\mathbb{P}(T \le 60)\).
Here is that depicted graphically. The large rectangle is the pdf of \(\text{Uniform}(0, 180)\), and the dark rectangle is the area of \(\mathbb{P}(T \le 60)\).
Because the pdf of the Uniform distribution is just a rectangle, and because areas in pdfs are probabilities, we just need to calculate the area of the region \(T \le 60\).
This is just a rectangle, with area \(A = bh\).
\[ \begin{aligned} b &= 60 \\ h &= \frac{1}{180} \\ \mathbb{P}(X \le 60) &= \frac{1}{180} \times 60 = \frac{1}{3} = 0.33333\dots \end{aligned} \]
Thus, the probability of waiting at most one minute at the stoplight on Main and Academy is 33.3%.
The cumulative distribution function (CDF) of a probability distribution is defined as
\[ F(x) = \mathbb{P}(X \le x) \]
As we discussed before, this is the first place we’ve seen a probability when dealing with continuous random variables.
That is because this is the only type of probability that can be calculated with continuous distributions.
The CDF is frequently difficult to calculate. Usually, it requires integral calculus. Specifically:
\[ F(x) = \mathbb{P}(X \le x) = \int_{-\infty}^x f(t) dt \]
However, for the Uniform distribution, we can rely on middle-school geometry.
The cumulative distribution function (CDF) is the function that describes \(F(x) = \mathbb{P}(X \le x)\).
Let \(X \sim \text{Uniform}(a, b)\).
The probability \(\mathbb{P}(X \le x)\) is the area of the rectangle with height \(f(x) = \frac{1}{b - a}\) and width \(x - a\).
This means the cumulative distribution function is:
\[ \mathbb{P}(X \le x) = F(x) = \frac{x - a}{b - a} \]
The CDF starts with a value of the random variable, \(x\), and calculates a cumulative probability, \(p\), such that \(\mathbb{P}(X \le x) = p\).
The quantile function starts with a cumulative probability, \(p\), and calculates the \(x\)-value such that \(\mathbb{P}(X \le x_p) = p\).
The two function are inverses of each other, i.e. \(Q(p) = F^{-1}(p)\).
The quantile function for the Uniform distribution is \[ Q(p) = p\, (b - a) + a \]
RIn R, there are a set of four functions to calculate various quantities from the Uniform distributions:
dunif(x, min, max) is the pdf, \(f(x) = p\).punif(x, min, max) is the CDF, \(F(x) = \mathbb{P}(X \le x) = p\).qunif(p, min, max) is the quantile function, i.e. solving \(F(x) = \mathbb{P}(X \le x) = p\) for \(x\).runif(n, min, max) generates \(n\) random values from a Uniform(min, max) distribution.The Exponential distribution is a continuous distribution that describes random variables whose probability of occurring decreases with time. It is frequently used to model “time until” something happens when there is no upper bound.
If the random variable \(X\) has a Exponential distribution, we write:
\[ X \sim \text{Exponential}(\lambda) \]
The Exponential distribution is characterized by these features:
The probability density function for the Exponential distribution is given by:
\[ f(x;\, a, b) = \begin{cases} \lambda e^{-\lambda x} & x > 0 \\ 0 & \textrm{otherwise} \end{cases} \]
The cumulative distribution function of the Exponential distribution is: \[ \mathbb{P}(X \le x) = \begin{cases} 0 & x < 0 \\ 1 - e^{-\lambda x} & 0 \le x < 1 \\ 1 & x \ge 1 \end{cases} \]
Proving this isn’t too hard, but requires an integral. I can post the proof alongside these slides, but it’s not required.
RIn R, there are a set of four functions to calculate various quantities from the Exponential distributions
dexp(x, rate) is the pdf, \(f(x) = p\).pexp(x, rate) is the CDF, \(F(x) = \mathbb{P}(X \le x) = p\).qexp(p, rate) is the quantile function, i.e. solving \(F(x) = \mathbb{P}(X \le x) = p\) for \(x\).rexp(n, rate) generates \(n\) random values from a Exponential(rate) distribution.Here are some important features of the Normal distribution (or Gaussian distribution):
Carl Friedrich Gauss is one of the most famous and important mathematicians ever:
If a random variable follows a Normal distribution with mean \(\mu\) and standard deviation \(\sigma\), i.e. \(X \sim \text{Normal}(\mu, \sigma)\), then the probability density function (pdf) is:
\[ f(x;\, \mu, \sigma) = \frac{1}{\sqrt{2 \sigma^2}} \exp\left\{ -\frac{(x - \mu)^2}{2 \sigma^2} \right\} \]
This function depends on the values of \(\mu\) and \(\sigma\). If we standardize \(X\), meaning take the \(z\)-score for all the values, we get the Standard Normal distribution
\[ Z = \frac{X - \mu}{\sigma} \sim \text{Normal}(0, 1) \]
This has mean 0 and standard deviation 1.
If you’ve ever used a \(Z\)-table, this is the Normal distribution that it describes.
Recall that the Normal distribution is a continuous distribution, so it’s defined by its cumulative distribution function, and \(\mathbb{P}(X = x) = 0\) for any \(x\).
The cumulative distribution function of the Normal distribution is:
\[ F(x;\, \mu, \sigma) = \mathbb{P}(X \le x) = \int_{-\infty}^x \frac{1}{\sqrt{2 \sigma^2}} \exp\left\{ -\frac{(t - \mu)^2}{2 \sigma^2} \right\} dt \]
This integral has no form, so we either need to use tables of CDF of the standard Normal distribution, \(Z\), typically denoted \(\Phi(x)\), or use your computer, which is faster, easier and more accurate.
RIn R, there are a set of four functions to calculate various quantities from the Normal} distributions
dnorm(x, mean, sd) is the pdf, \(f(x) = p\).pnorm(x, mean, sd) is the CDF, \(F(x) = \mathbb{P}(X \le x) = p\).qnorm(p, mean, sd) is the quantile function, i.e. solving \(F(x) = \mathbb{P}(X \le x) = p\) for \(x\).rnorm(n, mean, sd) generates \(n\) random values from a Normal}(mean, sd) distribution.By design, intelligence quotient (IQ) measures in the United States follow a Normal distribution with \(\mu = 100\) and \(\sigma = 15\). What proportion of Americans have an IQ score less than 90?
Solution: We are asked to calculate \(p\) such that
\[ \mathbb{P}(X \le 90) = p \]
given that \(X \sim \text{Normal}(100, 15)\).
This can be calculated in R with pnorm(90, mean = 100, sd = 15).
Thus, the proportion of people in the United States with IQ scores less than 90 is approximately 0.2524925, which is about 25%.
By design, intelligence quotient (IQ) measures in the United States follow a Normal distribution with \(\mu = 100\) and \(\sigma = 15\). What proportion of Americans have an IQ score above 90?
Solution: We are asked to calculate \(p\) such that
\[ \mathbb{P}(X > 90) = p \]
given that \(X \sim \text{Normal}(100, 15)\).
This can be calculated in R with 1 - pnorm(90, mean = 100, sd = 15).
Thus, the proportion of people in the United States with IQ scores above 90 is approximately 0.7475075, which is about 75%.
By design, intelligence quotient (IQ) measures in the United States follow a Normal distribution with \(\mu = 100\) and \(\sigma = 15\). What proportion of Americans have an IQ score between 87 and 122?
Solution: We are asked to calculate \(p\) such that
\[ \mathbb{P}(87 < X < 122) = p \]
given that \(X \sim \text{Normal}(100, 15)\).
This can be calculated in R with pnorm(122, mean = 100, sd = 15) - pnorm(87, mean = 100, sd = 15).
Thus, the proportion of people in the United States with IQ scores between 87 and 122 is approximately 0.7357043, which is about 75%.
By design, intelligence quotient (IQ) measures in the United States follow a Normal distribution with \(\mu = 100\) and \(\sigma = 15\). What IQ value separates the lower 30% from the upper 70%?
Solution: We are asked to calculate \(p\) such that
\[ \mathbb{P}(X < x_p) = 0.30 \]
given that \(X \sim \text{Normal}(100, 15)\).
This can be calculated in R with qnorm(0.30, mean = 100, sd = 15).
Thus, approximately 30% of Americans have an IQ score less that 92.13 and approximately 70% of Americans have an IQ score of more than 92.13.