Continuous Random Variables & Probability Density Functions
A continuous random variable (Definition 12.5) draws its probabilities not from a list of point masses but from the area under a curve: there is a probability density function (pdf) with and more generally . This lesson pins down what makes a function a legitimate density (Remark 12.1: everywhere and total area ), reads probabilities off as areas , and draws the defining contrast with the discrete world — for a continuous variable every single point is negligible, (Proposition 12.1), so endpoints never matter: . We anchor everything in the uniform distribution on (Example 12.5), where on and a probability is just a length, and in a worked exponential density (Example 12.6).
Before you start — give these a try
Attempting first primes your brain for the lesson — even if you miss. Nothing is graded or saved; it's just a warm-up.
A random variable is uniform on , so its density is a constant on and elsewhere. Find the value of that makes a valid density. Give your answer as a decimal to places.
Which of the following functions (taken to be outside the stated interval) is a valid probability density function?
What you’ll be able to do
- State Definition 12.5: is a continuous random variable if there is a probability density function with for all , and read off the general rule .
- Use Remark 12.1 to decide whether a function is a valid density — for all and — and find the normalising constant that forces the total area to equal .
- Compute probabilities as areas under : and , for constant, piecewise-constant and linear densities.
- Apply Proposition 12.1: , so a continuous variable is never discrete and endpoints are irrelevant — .
- Work fluently with the uniform distribution on (Example 12.5), where on and , and verify a given density such as the exponential of Example 12.6.
In your course
· MATH2015 · Linear Algebra & Probability- Definition 12.5Continuous random variableis continuous if there is a density with for all ; then .
- Remark 12.1Valid probability density functionis a density if and only if for all and ; any such defines a continuous random variable.
- Proposition 12.1Point probabilities and probabilities as areasfor every ; hence is never discrete and .
- Example 12.5Uniform distribution onDensity on and elsewhere; for .
- Example 12.6An exponential densityfor (and otherwise) is a valid density: , and .
From mass functions to density functions (Definition 12.5)
A discrete random variable piles its probability onto isolated values through a mass function . A continuous random variable spreads probability smoothly instead: Definition 12.5 says is continuous if there is a function , the probability density function (pdf), with Geometrically, is the area under the graph of from up to . The same picture delivers every probability: for any subset for which the integral makes sense, so and . The crucial mental shift is that is not a probability — it is a density, a rate of probability per unit length, and may even exceed — and only its integral over a region returns an actual probability.
What makes a legitimate density (Remark 12.1)
Not every function can serve as a density. Remark 12.1 gives the two conditions, and they are exactly the ones that make areas-under- behave like probabilities: Non-negativity keeps every area , so no event gets a negative probability; and total area encodes , the certainty that lands somewhere. Conversely, any function meeting these two conditions defines a valid continuous random variable. In practice a density often arrives with an unknown normalising constant: given a shape like on or on (and elsewhere), you find by forcing the total area to . For the constant, gives ; for the ramp, gives .
Probabilities are areas, and single points vanish (Proposition 12.1)
Because probability is area under , the chance of landing on any one exact value is the area over a single point — a region of zero width. Proposition 12.1 makes this precise: for any real number , Two consequences follow. First, a continuous random variable is never discrete: no value carries positive probability, so the discrete mass-function picture cannot apply. Second, because each endpoint contributes nothing, including or excluding endpoints changes no probability: This is a sharp break from the discrete case, where is typically positive and the difference between and matters. For continuous you may move endpoints freely — only the interval, i.e. the region of integration, counts.
The uniform distribution on $[0,1]$ and beyond (Examples 12.5-12.6)
The simplest continuous model is the uniform distribution on (Example 12.5): pick a real number at random from with every location equally likely. Its density is the flat function for and otherwise, whose total area is that of a square, namely . Probabilities are then simply lengths: for , So , while as the proposition demands. The uniform on a general interval has the constant density . Densities need not be flat, though: Example 12.6 takes for (and otherwise), a decaying exponential density. It is non-negative and , so it too is a legitimate density — one whose areas are read off by calculus rather than by a rectangle.
A random variable is continuous if there exists a function , called a probability density function (pdf) of , such that More generally, for any subset for which integration is defined, ; in particular and .
A function qualifies as a probability density function exactly when it satisfies both Any such defines a valid continuous random variable.
If has density , then for every real number , Consequently a continuous random variable is never discrete, and including or excluding endpoints does not change probabilities:
Worked examples
Example 12.5 — Uniform on . Let be uniform on , with density for and otherwise. (a) Confirm is a valid density. (b) Find . (c) Find .
- 1
(a) Check Remark 12.1. On we have , and elsewhere , so everywhere. The total area is (a square). Both conditions hold, so is a valid density.
- 2
(b) Probability as area. By Definition 12.5 the probability is the area under between the limits: For the uniform on a probability is simply the length of the interval.
- 3
(c) A single point (Proposition 12.1). The value is certainly possible, yet it carries zero probability — so as well.
Example 12.6 — An exponential density. Let for and otherwise. (i) Verify that is a valid probability density function. (ii) For with this density, compute .
A linear (ramp) density. A random variable has density for and otherwise. (a) Find the constant . (b) Compute .