Continuous Distributions: Areas Under the PDF
Problem
A continuous random variable on [0, 1] has PDF f(x) = 2x. Find P(0.3 < X < 0.7). Show the shaded area under the curve and verify the PDF integrates to 1.
Explanation
Discrete vs. continuous
For a continuous random variable, individual values have probability zero (there are uncountably many). Instead, we specify a probability density function (PDF) , and probabilities are areas under the curve:
Any valid PDF satisfies and .
Because , strict and non-strict inequalities give the same probability: .
Step-by-step solution
The PDF: on , and elsewhere.
Step 1 — Verify it is a valid PDF.
and on . ✓
Step 2 — Set up the target probability.
Step 3 — Evaluate the integral.
So there is a 40% chance that falls between and .
Sanity check
The PDF grows linearly, so more mass sits near . Our interval contains the middle — enough of the bulk for to feel right. Compare: (less, because the left tail is low density) and (more, because the right tail is denser). All consistent.
The cumulative distribution function (CDF)
. For our PDF:
Then , matching the integral.
Key moments
Expected value:
Variance:
Common mistakes
- Treating like a probability. It is a density — values can exceed 1 (e.g. here). Only the area is a probability.
- Forgetting the endpoint doesn't matter. For continuous , , so strict vs. non-strict inequality is identical.
- Integrating over the wrong interval. If is zero outside , an integral that strays outside just contributes zero — but be explicit about the support.
Try it in the visualization
Drag the two endpoints and along the PDF curve. The shaded area shades in real time, and a readout shows the corresponding probability computed from . Toggle to a different PDF (uniform, linear, or triangular) and watch how the shape of changes the answer.
Interactive Visualization
Parameters
Got your own math or physics problem?
Turn any problem into an interactive visualization like this one — powered by AI, generated in seconds. Free to try, no credit card required.