Continuous Random Variables
Continuous random variables let you model quantities that can take on any value within a range, not just whole numbers or specific outcomes. While a discrete variable might count how many customers walk in the door, a continuous variable measures things like how long each customer waits in line. This distinction changes how you calculate probabilities, so it's worth understanding well.
Continuous Random Variables
Definition and Key Properties
A continuous random variable can take on any value within some interval of real numbers. Because there are infinitely many possible values, the probability of the variable landing on any exact single value is zero. That sounds strange at first, but think of it this way: if you measure someone's height with perfect precision, the chance of getting exactly 170.000000... cm (to infinite decimal places) is essentially zero. What you can do is find the probability of falling within a range, like between 169 cm and 171 cm.
Because individual points have zero probability, continuous random variables can't use probability mass functions the way discrete variables do. Instead, they're described by:
- A probability density function (PDF), which gives the relative likelihood across different values. The PDF itself doesn't give you a probability directly; you need to find the area under the curve over an interval.
- A cumulative distribution function (CDF), which gives the probability that the variable is less than or equal to a given value. For continuous variables, the CDF is a smooth, continuous curve.
- The total area under the PDF curve always equals 1, representing 100% of possible outcomes.
- Key summary statistics like expected value and variance are calculated using integrals rather than sums.
Mathematical Representation and Analysis
The PDF of a continuous random variable is written as . Here's how the core calculations work:
Probability over an interval: To find the probability that falls between and , you integrate the PDF:
Since for continuous variables, it doesn't matter whether you use or in these expressions.
Expected value (mean): The weighted average of all possible values, using the PDF as the weight:
Variance: Measures how spread out the distribution is around the mean :
Standard deviation is the square root of variance: .
Median: The value where half the probability lies on each side, found by solving:
Discrete vs. Continuous Random Variables

Fundamental Differences
| Feature | Discrete | Continuous |
|---|---|---|
| Possible values | Countable (finite or countably infinite) | Any value in an interval |
| Probability at a point | Can be nonzero: | Always zero: |
| Described by | Probability mass function (PMF) | Probability density function (PDF) |
| Probability calculation | Summation | Integration |
| CDF shape | Step function (jumps at each value) | Smooth, continuous curve |
The key conceptual shift: for discrete variables, you add up probabilities at individual points. For continuous variables, you find areas under curves.
Practical Implications
- Discrete variables typically represent counts or categories: number of emails received, number of defective items in a batch, result of rolling a die.
- Continuous variables typically represent measurements on a scale: time, distance, temperature, weight.
Graphically, you'd use a bar chart or histogram with gaps for discrete data, and a smooth density curve for continuous data. The type of variable also affects which statistical methods you use, so correctly identifying whether your variable is discrete or continuous is an important first step in any analysis.
Some real-world quantities blur the line. Money is technically discrete (you can't have less than a cent), but when dealing with large financial datasets, it's often treated as continuous because the gaps between possible values are so small relative to the range.
Real-World Examples of Continuous Variables
Physical and Environmental Measurements
- Time: Duration of phone calls, how long a battery lasts, reaction time in a psychology experiment
- Physical attributes: A person's exact height or weight, body temperature
- Environmental data: Daily rainfall in millimeters, wind speed, air pollution concentration (e.g., PM2.5 levels in )
- Spatial measurements: Distance between two GPS coordinates, elevation above sea level
- Physics: Position, velocity, and acceleration of a particle; intensity of sound (decibels) or light (lumens)

Economic and Manufacturing Applications
- Finance: Stock prices, exchange rates, and interest rates are modeled as continuous even though they move in small discrete ticks
- Manufacturing: Thickness of a machined part, volume of liquid in a bottle, tensile strength of a material. Quality control relies heavily on continuous distributions to set acceptable tolerance ranges.
- Consumer behavior: Time spent on a website, total purchase amount per visit
- Energy: Electricity consumption in kilowatt-hours, fuel efficiency in miles per gallon
In each of these cases, the variable can (at least in principle) take on any value within some range, making a continuous model appropriate.
Probability Density Functions for Continuous Variables
Fundamental Concepts and Properties
The probability density function (PDF) is the central tool for working with continuous random variables. A few things to keep straight:
- The value at a particular point is not a probability. It's a density, which is why it can actually be greater than 1 at some points. What matters is the area under the curve.
- The area under the PDF between two points and gives you .
- Two requirements for any valid PDF:
- for all (no negative values)
- (total area equals 1)
- The PDF is the derivative of the CDF: . Conversely, the CDF is the integral of the PDF from to .
Common Probability Density Functions
You'll encounter several named continuous distributions throughout this course. Here are the most important ones at this stage:
- Uniform distribution: Every value in the interval is equally likely. The PDF is a flat horizontal line at height . This is the simplest continuous distribution and a good one to start with for building intuition.
- Normal (Gaussian) distribution: The classic bell-shaped curve, defined by its mean and standard deviation . It shows up constantly because of the Central Limit Theorem.
- Exponential distribution: Models the time between events that occur at a constant average rate (like time between customer arrivals). It's memoryless, meaning the probability of waiting another 5 minutes doesn't depend on how long you've already waited.
You may also see these in later units:
- Beta distribution: Defined on , useful for modeling proportions or probabilities themselves. Has two shape parameters that control its form.
- Gamma distribution: A generalization of the exponential. Often used in reliability analysis and modeling wait times for multiple events.
- Weibull distribution: Common in engineering for modeling failure times and product lifetimes.
For now, focus on understanding the uniform, normal, and exponential distributions well. The others build on the same core ideas.