Continuous RVs: PDF, CDF & Uniform
When outcomes form a continuum, probability lives in areas under a density curve — not in single points. The gateway to every continuous distribution GATE tests.
What you'll learn
- A PDF f(x) is non-negative and integrates to 1; probability is area under it
- P(a ≤ X ≤ b) is the integral of f from a to b; P(X = a) = 0 for continuous X
- The CDF F(x) is the integral of f up to x, and f = F prime
- Continuous uniform(a,b): f = 1/(b−a), mean (a+b)/2, variance (b−a)²/12
Before you start
Ask a friend how long they waited for the bus. They might say “about eight minutes.” Not 8.0000 minutes. The bus arriving at exactly one specific instant has, in a sense, zero chance — there are infinitely many instants in any window. So how do you talk about probability for a continuous quantity at all? You stop pinning probability to individual points and start spreading it as area under a curve. The curve is the probability density function, and once you can read areas off it you can answer every continuous-RV question GATE throws at you — and it is the same density picture behind every loss curve and likelihood you will later fit in machine learning.
Density, not probability
The PDF f(x) describes how thickly probability is packed near each value. Two
rules define it:
f(x) ≥ 0everywhere (density is never negative), and- the total area under it is 1: the integral of
fover allxequals 1.
Probability is then the area over an interval:
P(a ≤ X ≤ b) = ∫ from a to b of f(x) dx
Two consequences trip people up. First, the probability of any single value is
zero: the area over a point of zero width is zero, so P(X = a) = 0 for a continuous
RV. (That is why P(a ≤ X ≤ b) and P(a < X < b) are equal — the endpoints add
nothing.) Second, f(x) is a density, not a probability: it can exceed 1. On the
interval [0, 0.5] a valid density could reach a height of 2, because what must stay
≤ 1 is the area, not the height.
CDF: the running total
The cumulative distribution function F(x) = P(X ≤ x) accumulates probability
from the left — it is the integral of f up to x:
F(x) = ∫ from −∞ to x of f(t) dt
So F runs from 0 up to 1, never decreasing. Going the other way, the density is the
derivative of the CDF: f(x) = F prime(x). PDF and CDF are an
integrate/differentiate pair — given either one you can recover the other.
Drag the two handles to bracket a region and watch the shaded area — that area
is the probability P(a < X < b), no integration by hand. Flip between Normal,
Exponential, Beta, and Uniform to see how the same idea (probability = area)
works for every continuous distribution you will meet on the exam.
The continuous uniform
The simplest continuous distribution: X is uniform on [a, b] when its density
is flat. To enclose area 1 over a width of b − a, the height must be 1/(b − a):
f(x) = 1/(b − a)forxin[a, b], and 0 outside.- mean
= (a + b)/2(the midpoint, by symmetry). - variance
= (b − a)² / 12.
For uniform(0, 10): mean = 5, variance = 100/12 ≈ 8.33.
How GATE asks this
A reliable NAT. Three flavours recur: (1) find the constant that makes a given
f(x) a valid PDF (set its total integral to 1 and solve); (2) compute a
probability P(a ≤ X ≤ b) by integrating the density; (3) find the median m
from the CDF by solving F(m) = 0.5. Continuous uniform questions are pure plug-in
once you write f = 1/(b − a).
Worked example
Find
cso thatf(x) = c·xon[0, 2](and 0 elsewhere) is a valid PDF. Then computeP(X ≤ 1).
A valid PDF must integrate to 1 over its support:
∫ from 0 to 2 of c·x dx = c · [x²/2] from 0 to 2 = c · (4/2) = 2c
Set 2c = 1 ⟹ c = 0.5
Now integrate the density up to 1 to get the probability:
P(X ≤ 1) = ∫ from 0 to 1 of 0.5·x dx = 0.5 · [x²/2] from 0 to 1
= 0.5 · (1/2) = 0.25
So c = 0.5 and P(X ≤ 1) = 0.25. (Note f(2) = 0.5·2 = 1 here, and a density
can even exceed 1 on a narrower interval — only the total area is pinned to 1.)
Quick check
Quick check
Practice this in an interview
All questionsEach distribution has a natural generative story: Bernoulli is a single coin flip; Binomial sums Bernoullis; Poisson counts rare arrivals; Normal emerges from sums of many small effects; Exponential models waiting times between Poisson events; Uniform assigns equal probability across a range. Choosing correctly comes from matching that story to the data-generating process.
Binomial counts successes in a fixed number of independent trials with a fixed success probability. Poisson counts events in a continuous interval when events are rare and arrive independently at a constant average rate. Poisson is the limiting case of Binomial as n → ∞ and p → 0 with np = λ fixed.
The joint distribution P(X, Y) fully specifies two random variables together. Marginals P(X) and P(Y) are obtained by summing (or integrating) the joint over the other variable. Conditionals P(X|Y=y) are the joint sliced at a fixed y value, renormalized by the marginal P(Y=y).
The Normal distribution is justified by the Central Limit Theorem — averages of large i.i.d. samples converge to Normal regardless of the underlying distribution. It is fully characterized by mean and variance, enabling closed-form inference. It fails for heavy-tailed data, skewed outcomes, bounded quantities, and rare extreme events.