Difficulty: Intermediate | Prerequisites: Integration techniques (Chapter 8), basic understanding of functions, limits, and improper integrals.
This section sits at the end of Chapter 8 (Techniques of Integration) and applies integration to probability, a field that underpins statistics, data science, and decision-making across nearly every discipline. You need a solid grasp of definite and improper integrals before diving in, because probability density functions are defined and used through integration. The core idea: instead of counting outcomes one by one (which works for dice and coins), you integrate a function over an interval to find the probability that a continuous measurement falls within a given range. If you are comfortable evaluating integrals and taking limits, you have everything you need.
A random variable assigns a number to each outcome of an uncertain event. Discrete random variables take finitely many values; continuous ones span entire intervals. For discrete variables, you find probabilities by counting frequencies. For continuous variables, you integrate a probability density function over an interval, and the total area under the curve must equal 1.
Sample space
The set of all possible outcomes of an uncertain event. Think of it as the full menu of everything that could happen.
Random variable
A function X that assigns a numerical value to each outcome in a sample space. In simple terms, it turns each possible result into a number you can work with.
Discrete random variable
A random variable that can take only finitely many values (e.g. the number of heads when tossing a coin three times: 0, 1, 2, or 3). Think of it as a variable that can be listed out.
Continuous random variable
A random variable that can take on any value in an entire interval (e.g. the weight of a randomly selected person). In simple terms, you cannot list all the possible values because there are infinitely many.
Probability distribution
A description of the probabilistic behaviour of a random variable, telling you how likely each value (or range of values) is.
Frequency
The number of times a specific value of X occurs in the sample space. Dividing frequency by total outcomes gives the probability for equally likely outcomes.
Probability density function (PDF)
A nonnegative function f whose total area under its curve equals 1. The probability that a continuous random variable falls in an interval [c, d] is the integral of f from c to d. Think of it as a curve whose area under any slice tells you how likely that slice is.
Every uncertain event has a sample space: the complete set of possible outcomes.
Tossing a coin once: {H, T}.
Tossing a coin three times: {HHH, HHT, HTH, THH, HTT, THT, TTH, TTT} (8 outcomes).
Rolling a six-sided die: {1, 2, 3, 4, 5, 6}.
Drawing two cards from a 52-card deck (order irrelevant): (52 x 51)/2 = 1,326 outcomes.
A random variable X maps each outcome to a number. For the three-coin-toss, if X = number of heads: X(HHT) = 2, X(THT) = 1, and so on.
Discrete: finitely many possible values. Examples include coin tosses, die rolls, and the sum of two dice (values 2 through 12).
Continuous: values span an entire interval. Examples include a person's weight, the angle of a spun arrow on [0, 2 pi), cholesterol levels, waiting times, and tyre lifetimes.
Large discrete sets (e.g. ACT scores from 1 to 36) are sometimes modelled as continuous for statistical convenience.
For equally likely outcomes, probability = frequency / total number of outcomes.
Three-coin-toss example (X = number of heads):
X = 0: frequency 1, P(X) = 1/8
X = 1: frequency 3, P(X) = 3/8
X = 2: frequency 3, P(X) = 3/8
X = 3: frequency 1, P(X) = 1/8
The probabilities sum to 1. In a probability bar graph, the area of each bar equals the probability of that value. The probability of two or more heads is P(X=2) + P(X=3) = 3/8 + 1/8 = 4/8 = 1/2.
For continuous random variables, you cannot count individual outcomes. Instead, you use a probability density function f with three properties:
f is continuous (except possibly at finitely many points).
f is nonnegative: f(x) >= 0.
The total area under f equals 1: the integral from negative infinity to positive infinity of f(x) dx = 1.
The probability that X falls between c and d is the integral from c to d of f(x) dx.
A critical consequence: P(X = c) = 0 for any single value c. Probability is meaningful only over intervals, never at a point.
P(c \le X \le d) = \int_c^d f(x)\, dxProbability over an interval equals the definite integral of the PDF from c to d.
\int_{-\infty}^{\infty} f(x)\, dx = 1Total area under any valid PDF equals 1.
For discrete equally likely outcomes:
P(X = k) = \frac{\text{frequency of } k}{\text{total number of outcomes}}Probability distributions model everything from quality control in manufacturing (predicting how many chips survive past a given year) to medical studies (modelling blood pressure across a population with a normal distribution). The uniform distribution describes the angle of a randomly spun arrow, and exponential distributions model waiting times for buses, phone calls, and radioactive decay.
Students often think P(X = c) gives a nonzero probability for continuous variables. It does not. For a continuous random variable, the probability of any single exact value is always zero. Probability is only meaningful over an interval.
Students sometimes confuse a probability density function's value f(x) with a probability. The value f(x) is not itself a probability; you must integrate f over an interval to obtain a probability. f(x) can even exceed 1, as long as the total area under the curve is 1.
Students assume discrete and continuous variables are handled the same way. They are not. Discrete uses counting and division; continuous uses integration.
Students forget that all probabilities for a random variable must sum (or integrate) to 1. If your computed probabilities do not add up to 1, something has gone wrong.
⚠️ Expect to verify whether a given function is a valid PDF (check: nonnegative, continuous except at finitely many points, total integral = 1).
⚠️ Be ready to compute P(c <= X <= d) by evaluating a definite integral.
⚠️ Know that P(X = c) = 0 for continuous variables. This appears regularly as a conceptual question.
⚠️ Understand the three-coin-toss discrete distribution thoroughly. It is the textbook's running example and a likely exam item.
⚠️ Exercises 1 through 8 ask you to determine whether functions are valid PDFs. Practice these.
True or false: A probability density function can have values greater than 1.
True. f(x) can exceed 1, so long as the total area under the curve equals 1.
True or false: For a continuous random variable, P(X = 5) could be 0.3.
False. P(X = any single value) = 0 for continuous random variables.
Fill in the blank: The set of all possible outcomes of an uncertain event is called the ______.
Sample space.
True or false: If you toss a fair coin three times, the probability of getting exactly two heads is 3/8.
True.
Fill in the blank: A random variable that can take values across an entire interval is called a ______ random variable.
Continuous.
Q: Let f(x) = (1/2)(2 - x) over [0, 2]. Verify that f is a probability density function.
A: f is continuous and nonnegative on [0, 2]. Integrate: the integral from 0 to 2 of (1/2)(2 - x) dx = (1/2)[2x - x^2/2] from 0 to 2 = (1/2)(4 - 2) = 1. Since f >= 0 and the integral equals 1, f is a valid PDF.
Q: Let f(x) = 2e^(-2x) for x >= 0, and f(x) = 0 for x < 0. Find P(T <= 1).
A: P(T <= 1) = the integral from 0 to 1 of 2e^(-2T) dT = [-e^(-2T)] from 0 to 1 = 1 - e^(-2) which is approximately 0.865.
Q: Using the same f(x) = 2e^(-2x), find P(T = 1).
A: P(T = 1) = 0. For continuous random variables, the probability of any exact single value is zero.
Q: Show that f(x) = (4/27)x^2(3 - x) is a PDF over [0, 3].
A: f is continuous and nonnegative on [0, 3]. Integrate from 0 to 3: (4/27)[x^3/3 - x^4/4] evaluated gives (4/27)(27 - 81/4) = (4/27)(27/4) = 1. So f is a valid PDF.
Q: If you toss a fair coin three times, what is the probability of getting at least two heads?
A: P(X >= 2) = P(X=2) + P(X=3) = 3/8 + 1/8 = 4/8 = 1/2.
This material connects directly to improper integrals (Section 8.7 or equivalent), since many PDFs require evaluating integrals with infinite limits. The exponential and normal distributions covered in the next part of these notes build on the PDF concept introduced here. Expected value and variance, also covered next, extend the integration techniques further, using integration by parts.
Random variable, sample space, probability distribution, discrete random variable, continuous random variable, probability density function, PDF, frequency, probability bar graph, outcomes, equally likely outcomes, coin toss probability, calculus probability, Section 8.8, Chapter 8 probability, integration and probability, nonnegative function, area under the curve