Visual Tools
Calculators
Tables
Mathematical Keyboard
Converters
Other Tools


Probability Density Function (PDF)






Probability in the Continuous Case


When a random variable can vary continuously over an interval, probability is no longer assigned to individual points. Instead, probability is described through a density function that spreads likelihood smoothly across ranges of values.

This page introduces the Probability Density Function (PDF) as the core mathematical object behind continuous probability models. It explains how probability is recovered from areas under curves, why single points have zero probability, and how calculus—through integration and differentiation—governs every meaningful calculation involving continuous random variables.

The goal is not to catalog distributions, but to understand what a PDF is, how it works, and why it replaces discrete probability functions in the continuous setting.

Key Terms

Probability Density Function— fX(x)f_X(x), density for continuous variables
PDF of a Transformed Variable— density of Y=g(X)Y = g(X) derived from density of XX
Continuous Random Variable— the type described by a PDF
Cumulative Distribution Function— FX(x)F_X(x), related to the PDF by integration
Expected Value— E[X]E[X], computed from the PDF
Variance— Var⁡(X)\operatorname{Var}(X), computed from the PDF

See All Probability Definitions →


Definition & Physical Intuition

For a discrete variable the probability function gives P(X = x). Try the same reading for a continuous one.

What is a PDF?

A PDF (Probability Density Function) describes how probability is distributed across a continuous random variable. Unlike discrete variables where probability sits at specific points, continuous variables spread probability across intervals.
Uniform on [0, 0.5] has f(x) = 2 at every point — and a probability of 2 is impossible.
intervalwidthprobability = 2 × width
[0.1, 0.2]0.10.2
[0.1, 0.11]0.010.02
the single point 0.100
the whole of [0, 0.5]0.51
Read as an area, height times width, the same 22 gives sensible probabilities, and the whole interval gets exactly 11.
A single point has no width, so it carries no probability; only intervals do.

The Zero Probability Paradox

For any specific value aa:
Definition & Physical Intuition
P(X=a)=0P(X = a) = 0
This seems impossible. How can every individual outcome have zero probability, yet something must happen?
The resolution: Probability for continuous variables lives in intervals, not points. A single point is infinitesimally thin—it has no width, so it captures no probability mass. Just as a geometric point on a line has zero length, a single value in a continuous distribution has zero probability.
Example
Pick a random number between 0 and 1. What's P(X=0.5)P(X = 0.5)? Exactly zero. What's P(0.49<X<0.51)P(0.49 < X < 0.51)? Positive. Probability only exists across ranges.
The definition
The probability density function ff of a continuous random variable gives probabilities as areas: P(a≤X≤b)=∫abf(x) dxP(a \le X \le b) = \int_a^b f(x)\,dx.

Density ≠ Probability

The PDF value f(x)f(x) is not a probability. It's a density—a rate of probability per unit.
Probability of Interval Continuous
P(a≤X≤b)=∫abf(x)dxP(a \leq X \leq b) = \int_a^b f(x)dx
Learn more about this formula: Probability of Interval Continuous →
Probability is the area under the curve, not the height. This means f(x)f(x) can exceed 1, unlike a PMF where p(x)≤1p(x) \leq 1 always.
So for the uniform variable on [0,0.5][0, 0.5], P(0.1≤X≤0.2)=2×0.1=0.2P(0.1 \le X \le 0.2) = 2 \times 0.1 = 0.2.
Density is probability per unit length, as a rod has mass per unit length.
Think of it like the density of a material. A steel rod doesn't have "weight at a point"—it has density (mass per unit length). Similarly, a continuous random variable doesn't have "probability at a point"—it has probability density.
The PDF is the continuous analog of mass in the discrete case. Where mass concentrates at points, density spreads across regions.
0.000.080.160.240.320.40-4-3.0-2.0-1.0-0.01.02.03.04.0xf(x)
Normal density, mean 0, standard deviation 1

Density is probability per unit length: the curve is highest at the mean, where a small interval captures the most probability, and the probability of any interval is the area above it. The height 0.4 at the centre is not itself a probability. Toggle to the CDF view and see the accumulated area on the PDF visualizer.

For a continuous variable a single point carries no probability; probability is the area under the density over an interval.
A density can be larger than 1; only its total area is fixed.
Example
Uniform distribution on [0,0.5][0, 0.5] has f(x)=2f(x) = 2. The density is 2, but the total probability integrates to 1.
The notation for all of this is fixed next.
The rest of the page covers notation, the support, the two axioms, the three views of a PDF, building one from a story, calculations, location and spread measures, change of variables, the link with the CDF and the densities of common distributions.

PDF Notation

Notation

PDF Notation

A function name with a subscript for the variable, and an integral wherever a probability is wanted — the notation itself says that a density is not a probability. All are catalogued among the probability symbols.
The full account of these marks — including the density-may-exceed-one warning — lives at probability function notation; the mass function pX(x)p_X(x) at PMF notation.
fX(x)f_X(x)
f sub X of x — the density of X at x
The PDF of the random variable XX evaluated at the value xx: a probability density at that point, not a probability.
CasesThe subscript keeps several variables apart — fX(x)f_X(x), fY(y)f_Y(y), fT(t)f_T(t). With only one variable in play it can be dropped: f(x)f(x).
Do not confuseThe PMF p(x)p(x). One needs integrating to give a probability; the other gives the probability directly.
P(a≤X≤b)P(a \leq X \leq b)
the probability that X lies between a and b
Probability comes from integrating the density over an interval: P(a≤X≤b)=∫abfX(x) dxP(a \leq X \leq b) = \int_a^b f_X(x)\,dx.
P(X=a)=0P(X = a) = 0
the probability that X equals a is zero
Point probabilities are always zero: ∫aafX(x) dx=0\int_a^a f_X(x)\,dx = 0, whatever the density at aa.
DownloadPNG2×PDF
Notation · Cheat sheet
Random Variable Notation at a Glance
The marks from the notation cards across the random-variable pages: how each is read and what it means. Every group links to the full card on its page.
Random variables
X:Ω→RX : \Omega \to \mathbb{R}
X maps outcomes to numbers
A random variable is a function, not a variable.
{X≤x}\{X \le x\}
the event that X is at most x
Braces turn a condition into an event.
X∼Bin(n,p)X \sim \text{Bin}(n, p)
X is distributed as
Names the distribution and its parameters.
Probability functions
XX vs xx
the variable; a value
Capital for the random variable, lowercase for a number it takes.
P(⋅)P(\cdot)
the probability of
Takes an event, returns a number in [0,1][0, 1].
p(x)p(x) vs f(x)f(x)
mass; density
pp is a chance (discrete); ff is a rate (continuous).
PMF
{x:pX(x)>0}\{x : p_X(x) > 0\}
the support of X
Every value that carries probability.
∑xpX(x)=1\sum_{x} p_X(x) = 1
the masses add to one
The sum runs over the support, not from a start to an end.
PDFThis page
fX(x)f_X(x)
the density of X at x
A density, not a probability; it can exceed 11.
P(a≤X≤b)P(a \le X \le b)
X between a and b
The integral ∫abfX(x) dx\int_a^b f_X(x)\,dx.
P(X=a)=0P(X = a) = 0
a single point
For a continuous variable, always zero.
CDF
FX(x)F_X(x)
the CDF of X at x
Equals P(X≤x)P(X \le x): everything up to and including xx.
F(b)−F(a)F(b) - F(a)
F of b minus F of a
Equals P(a<X≤b)P(a < X \le b).
Indicators
IA,  1AI_A, \; \mathbf{1}_A
the indicator of A
11 if AA happens, 00 if not.
1{X≤x}\mathbf{1}\{X \le x\}
one if the condition holds
The brace form takes a statement instead of an event.
N=∑IAiN = \sum I_{A_i}
a count of events
How many of the AiA_i happened.
Same marks, different job
PP vs ppCapital PP takes an event; lowercase pp is a mass function of a value.
FF vs ffCapital FF accumulates (the CDF); lowercase ff is the density.
∼\simIs distributed as; in linear algebra, row-equivalent or similar.
{X≤x}\{X \le x\}An event, not a set of numbers.
Random Variable Notation at a Glance·/probability/random-variablesLearn Math Class
Notation
fX(x)f_X(x)

Probability of Interval Continuous
P(a≤X≤b)=∫abfX(x)dxP(a \leq X \leq b) = \int_a^b f_X(x)dx
Learn more about this formula: Probability of Interval Continuous →


See All Probability Symbols and Notations →

The Domain (Support)


The support of a PDF is the set of values where the density is nonzero—the region where probability can be found.

Formally: The support of XX is {x:fX(x)>0}\{x : f_X(x) > 0\}.

Outside the support, fX(x)=0f_X(x) = 0. No probability density exists there.

Types of Support


Bounded Support: The random variable is confined to a finite interval.

Example: Uniform distribution on [0,1][0, 1]. Support is [0,1][0, 1]. Outside this interval, f(x)=0f(x) = 0.

Example: Beta distribution on [0,1][0, 1]. All probability density concentrates within the unit interval.

Unbounded Support: The random variable can take values extending to infinity in both directions.

Example: Normal distribution on (−∞,∞)(-\infty, \infty). Support is the entire real line. Density never truly reaches zero, though it becomes negligible far from the mean.

Half-Bounded Support: Bounded on one side, unbounded on the other.

Example: Exponential distribution on [0,∞)[0, \infty). Support starts at 0 and extends infinitely rightward.

Example: Gamma distribution on [0,∞)[0, \infty).

Why Support Matters


The support determines:
• Where to integrate when computing probabilities
• What values are possible vs. impossible
• The limits of integration: P(X∈A)=∫A∩SupportfX(x)dxP(X \in A) = \int_{A \cap \text{Support}} f_X(x)dx

Pitfall: Using the formula outside the support
Integrating 2e−2x2e^{-2x} from −∞-\infty to 11 for an exponential with λ=2\lambda = 2 diverges, because the formula grows without bound for x<0x < 0. The density is 00 there, so P(X<1)=∫012e−2x dx=1−e−2≈0.865P(X < 1) = \int_0^1 2e^{-2x}\,dx = 1 - e^{-2} \approx 0.865.

When computing P(X∈A)P(X \in A) for some set AA, only integrate over the intersection of AA with the support. Outside the support contributes nothing—integrating over those regions just adds zeros.

The Two Fundamental Axioms


Every valid PDF must satisfy two non-negotiable rules. Just like the PMF in the discrete case, the PDF must obey the same foundational constraints.

Axiom 1: Non-Negativity


PDF Non-negativity
fX(x)≥0 for all xf_X(x) \geq 0 \text{ for all } x
Learn more about this formula: PDF Non-negativity →


Density cannot be negative. Ever.

Each point gets zero or positive density. If f(5)=−0.3f(5) = -0.3, you've made an error. Fix it.

Axiom 2: Normalization


PDF Normalization
∫−∞∞fX(x)dx=1\int_{-\infty}^{\infty} f_X(x)dx = 1
Learn more about this formula: PDF Normalization →


The total area under the density curve must equal exactly 1.

This is your total probability budget. The entire curve must integrate to 1—no more, no less.

Fact: A density need not fade far out
Let f(x)=nf(x) = n on [n,n+1n⋅2n]\left[n, n + \frac{1}{n \cdot 2^n}\right] for each whole number n≥1n \geq 1 and 00 elsewhere. The rectangles have areas 12,14,18,…\frac{1}{2}, \frac{1}{4}, \frac{1}{8}, \ldots, which add up to 11, so ff is a valid density whose peaks grow without bound far out.

On an unbounded support the budget is spread over an infinitely long stretch of the line. The area out there is a sum of infinitely many pieces, one for each unit of length, and normalization only asks that these pieces add up to 1. It says nothing directly about how tall the curve may be at any particular place, near the center or far out in the tail.

Example
Uniform distribution on [0,2][0, 2] has f(x)=12f(x) = \frac{1}{2} for x∈[0,2]x \in [0,2].
Check: ∫0212dx=12⋅2=1\int_0^2 \frac{1}{2}dx = \frac{1}{2} \cdot 2 = 1. ✓

Example
Exponential distribution with f(x)=λe−λxf(x) = \lambda e^{-\lambda x} for x≥0x \geq 0.
Check: ∫0∞λe−λxdx=λ⋅1λ=1\int_0^{\infty} \lambda e^{-\lambda x}dx = \lambda \cdot \frac{1}{\lambda} = 1. ✓

Validation Process


To verify a function is a valid PDF:
1. Check f(x)≥0f(x) \geq 0 everywhere in the support
2. Integrate over the entire support
3. Confirm the integral equals 1

If either axiom fails, you don't have a valid probability density function.

These two axioms are fundamental for both PMF and PDF. See axioms for the foundational probability principles.
Uniform density on [0, 0.5]: height 2, width 0.5, total area 1xf(x)−0.250.250.50.7511.250.511.522.5height f(x) = 2: above 1width 0.5area 0.5 · 2 = 1P(0.1 < X < 0.2) = 0.1 · 2 = 0.2Density can exceed 1; only the total area must be 1
A density taller than 1

The uniform density on [0, 0.5] from the page's example. It must enclose area 1 over an interval only 0.5 wide, so its height is 2. That breaks no rule: the axioms ask only that f is never negative and that the total area is 1. Probabilities come from areas, never from heights: P(0.1 < X < 0.2) = 0.1 · 2 = 0.2.

Narrow the interval to [0, 0.1] and the height rises to 10, still a valid density.

Representations: The Three Views


A PDF can be represented in three equivalent ways. Each offers different insights into how probability density distributes.

Graphical Representation


The PDF appears as a smooth curve on the x-y plane. The x-axis shows values of the random variable, the y-axis shows density.

Key features:
• Height represents density, not probability
• Area under the curve represents probability
• Peaks indicate regions of high likelihood
• The curve must stay non-negative
• Total area under the entire curve equals 1

Example: The normal distribution shows a symmetric bell curve centered at the mean. The peak occurs at the mode, and density decreases smoothly on both sides.

Example: The exponential distribution starts at maximum density and decays monotonically toward zero.

Functional Representation


The PDF is defined by an explicit mathematical function f(x)f(x).

Often piece-wise, depending on the support:

Example: Uniform distribution on [a,b][a, b]:

Representations: The Three Views
f(x)={1b−aif x∈[a,b]0otherwisef(x) = \begin{cases} \frac{1}{b-a} & \text{if } x \in [a, b] \\ 0 & \text{otherwise} \end{cases}

Example: Exponential distribution:

Representations: The Three Views
f(x)={λe−λxif x≥00if x<0f(x) = \begin{cases} \lambda e^{-\lambda x} & \text{if } x \geq 0 \\ 0 & \text{if } x < 0 \end{cases}

The functional form makes computation possible—you can integrate it to find probabilities.

Numerical/Tabular Representation


While less common than for PMF, PDFs can be approximated through discretization or represented via CDF values at specific points.

Tables of the standard normal distribution CDF values are common because the PDF integral has no closed form.

Software implementations often store PDFs as arrays of evaluated points for computational efficiency.

Why Three Views?


• Graphical: Best for intuition and visualization
• Functional: Best for calculation and analysis
• Numerical: Best for computation and approximation

All three describe the same density, just from different perspectives.
DownloadPNG2×PDF
Before you read
Three views of one density
A probability density function can be drawn, written as a formula, or listed as numbers. Each view answers different questions.
Representing a PDF3 views
Graphical
Readsheight = density, area = probability
Examplesnormal, exponential curves
Functional
Readsan explicit f(x)f(x), often piecewise
Examplesuniform, exponential formulas
Numerical
Readstabulated values
Examplesnormal CDF tables
Takeaway
Probability is area
Whichever view you use, the height is a density; probabilities come from the area under the curve.
Three views of a PDF·/probability/probability-function/pdfLearn Math Class

Building a PDF (From Story to Math)


Every PDF starts with a story—the situation, the process, the experiment. Your job is to translate that concrete setup into mathematical form.

The Construction Process


Step 1: Identify the Random Variable

What continuous quantity are you measuring? Define it clearly.

Example: "Measure the time until a lightbulb fails" → Let TT = time to failure (in hours).

Step 2: Determine the Support

What values can the random variable take? Is it bounded or unbounded?

Example: Time to failure must be positive. Support is [0,∞)[0, \infty).

Step 3: Construct the Density Function

Use physical reasoning, symmetry, or modeling assumptions to derive f(x)f(x).

Methods:
• Uniform spread: If all values in an interval are equally likely, use constant density
• Exponential decay: If likelihood decreases at a constant rate, use exponential form
• Symmetry: If the situation is symmetric around a center, build a symmetric density
• Maximum entropy: Choose the density with maximum uncertainty given constraints

Example: Lightbulb with constant failure rate λ\lambda. The memoryless property suggests:

Building a PDF (From Story to Math)
f(t)=λe−λt for t≥0f(t) = \lambda e^{-\lambda t} \text{ for } t \geq 0

Step 4: Verify the Axioms

Check non-negativity: Is f(x)≥0f(x) \geq 0 everywhere? Yes, exponential is always positive.

Check normalization: Does it integrate to 1?

Building a PDF (From Story to Math)
∫0∞λe−λtdt=λ⋅1λ=1\int_0^{\infty} \lambda e^{-\lambda t}dt = \lambda \cdot \frac{1}{\lambda} = 1
✓

See axioms for the fundamental requirements.

Step 5: Write the PDF in Standard Form

Express the function clearly, including the support.

Building a PDF (From Story to Math)
fT(t)={λe−λtif t≥00if t<0f_T(t) = \begin{cases} \lambda e^{-\lambda t} & \text{if } t \geq 0 \\ 0 & \text{if } t < 0 \end{cases}

From Physical Setup to Mathematical Object


The key skill is moving from a concrete scenario to a precise density function. Ask:
• What values are possible?
• How does likelihood vary across those values?
• Does the assignment satisfy the axioms?

Once built, the PDF becomes a complete mathematical description of the random variable's behavior.

Calculations Using the PDF


Once you have a PDF, you can compute probabilities for any event involving the random variable. Unlike PMF, all calculations require integration.

Interval Probabilities


The core calculation: probability over an interval equals the area under the curve.

Probability of Interval Continuous
P(a≤X≤b)=∫abfX(x)dxP(a \leq X \leq b) = \int_a^b f_X(x)dx
Learn more about this formula: Probability of Interval Continuous →


Example: Uniform distribution on [0,10][0, 10] with f(x)=110f(x) = \frac{1}{10}.

Calculations Using the PDF
P(3≤X≤7)=∫37110dx=110⋅4=0.4P(3 \leq X \leq 7) = \int_3^7 \frac{1}{10}dx = \frac{1}{10} \cdot 4 = 0.4

Example: Exponential distribution with f(x)=2e−2xf(x) = 2e^{-2x} for x≥0x \geq 0.

Calculations Using the PDF
P(1≤X≤3)=∫132e−2xdx=[−e−2x]13=e−2−e−6≈0.133P(1 \leq X \leq 3) = \int_1^3 2e^{-2x}dx = [-e^{-2x}]_1^3 = e^{-2} - e^{-6} \approx 0.133

Pitfall: Dropping the minus sign of the antiderivative
Taking e−2xe^{-2x} as the antiderivative of 2e−2x2e^{-2x} gives e−6−e−2≈−0.133e^{-6} - e^{-2} \approx -0.133, a negative probability. The antiderivative is −e−2x-e^{-2x}, so P(1≤X≤3)=e−2−e−6≈0.133P(1 \leq X \leq 3) = e^{-2} - e^{-6} \approx 0.133.

The exponential example follows the pattern every interval probability uses: find an antiderivative of the density, evaluate it at the upper limit, and subtract its value at the lower limit. Because this density decreases, the interval [1,3][1, 3] holds far less probability than the interval [0,2][0, 2] of the same length, which holds 1−e−4≈0.9821 - e^{-4} \approx 0.982.

Inequalities Are Irrelevant


For continuous variables, endpoint inclusion doesn't matter:

Calculations Using the PDF
P(X<a)=P(X≤a)P(X < a) = P(X \leq a)
Calculations Using the PDF
P(X>a)=P(X≥a)P(X > a) = P(X \geq a)
Calculations Using the PDF
P(a<X<b)=P(a≤X≤b)P(a < X < b) = P(a \leq X \leq b)

Why? Because P(X=a)=0P(X = a) = 0 for any single point. Adding or removing a zero-probability point doesn't change the total.

Example
P(X<5)=P(X≤5)P(X < 5) = P(X \leq 5) exactly. No approximation, no difference.

Tail Probabilities


Probability beyond a threshold:

Calculations Using the PDF
P(X>a)=∫a∞fX(x)dx=1−P(X≤a)P(X > a) = \int_a^{\infty} f_X(x)dx = 1 - P(X \leq a)

Calculations Using the PDF
P(X<a)=∫−∞afX(x)dxP(X < a) = \int_{-\infty}^a f_X(x)dx

Example: Exponential with λ=0.5\lambda = 0.5.

Calculations Using the PDF
P(X>2)=∫2∞0.5e−0.5xdx=e−1≈0.368P(X > 2) = \int_2^{\infty} 0.5e^{-0.5x}dx = e^{-1} \approx 0.368

Complement Rule


Use the complement when integration is easier in the opposite direction:

Calculations Using the PDF
P(X∉A)=1−P(X∈A)P(X \notin A) = 1 - P(X \in A)

Example: P(X>10)=1−P(X≤10)P(X > 10) = 1 - P(X \leq 10)

The Core Pattern


Every probability question reduces to:
1. Identify the interval or region
2. Set up the integral with correct bounds
3. Integrate the PDF over that region
4. Evaluate

The PDF gives complete information. If you know fX(x)f_X(x) for all xx, you can answer any probability question about XX.

Derived Properties: Location Measures


The PDF contains all the information about a random variable. From it, we can compute summary measures that describe where the distribution is centered.

Expected Value (Mean)


The expected value is the probability-weighted average across all possible values, computed via integration.

Expected Value (Continuous)
E[X]=∫−∞∞x⋅fX(x)dxE[X] = \int_{-\infty}^{\infty} x \cdot f_X(x)dx
Learn more about this formula: Expected Value (Continuous) →


Each value xx contributes based on its density weight. Think of it as the balance point of the density curve.

Example: Uniform distribution on [0,10][0, 10] with f(x)=110f(x) = \frac{1}{10}.

Derived Properties: Location Measures
E[X]=∫010x⋅110dx=110⋅x22∣010=110⋅50=5E[X] = \int_0^{10} x \cdot \frac{1}{10}dx = \frac{1}{10} \cdot \frac{x^2}{2}\Big|_0^{10} = \frac{1}{10} \cdot 50 = 5

The mean sits at the midpoint, as expected from symmetry.

Example: Exponential distribution with f(x)=λe−λxf(x) = \lambda e^{-\lambda x} for x≥0x \geq 0.

Derived Properties: Location Measures
E[X]=∫0∞x⋅λe−λxdx=1λE[X] = \int_0^{\infty} x \cdot \lambda e^{-\lambda x}dx = \frac{1}{\lambda}

The mean depends inversely on the rate parameter.

Median


The median is the value mm that splits the probability in half.

Derived Properties: Location Measures
P(X≤m)=∫−∞mfX(x)dx=0.5P(X \leq m) = \int_{-\infty}^m f_X(x)dx = 0.5

It's the point where the CDF equals 0.5.

Example: Exponential distribution with parameter λ\lambda.

Derived Properties: Location Measures
∫0mλe−λxdx=1−e−λm=0.5\int_0^m \lambda e^{-\lambda x}dx = 1 - e^{-\lambda m} = 0.5

Derived Properties: Location Measures
e−λm=0.5  ⟹  m=ln⁡(2)λe^{-\lambda m} = 0.5 \implies m = \frac{\ln(2)}{\lambda}

For symmetric distributions, median equals mean. For skewed distributions, they differ.

Mode


The mode is the value where the PDF reaches its maximum.

Derived Properties: Location Measures
mode=arg⁡max⁡xfX(x)\text{mode} = \arg\max_x f_X(x)

Found by solving fX′(x)=0f'_X(x) = 0 and checking the second derivative, or at an end of the support when the density is highest there.

Example: Normal distribution with mean μ\mu and standard deviation σ\sigma. The mode is μ\mu, where the bell curve peaks.

Example: Exponential distribution. The mode is 0, where density is highest before it decays.

A distribution can have multiple modes if the PDF has several local maxima.

Why These Matter


Location measures summarize where the distribution sits on the number line. They answer: "What's a typical value?" Each measure captures a different notion of "typical."

Derived Properties: Spread Measures


Location tells you where the distribution centers. Spread tells you how widely values scatter around that center.

Variance


Variance quantifies the average squared deviation from the mean, computed through integration.

Derived Properties: Spread Measures
Var(X)=∫−∞∞(x−E[X])2⋅fX(x)dx\text{Var}(X) = \int_{-\infty}^{\infty} (x - E[X])^2 \cdot f_X(x)dx

Each squared distance from the mean is weighted by density. High-density regions far from the mean contribute heavily to variance.

Computational shortcut:

Variance Computational Formula
Var(X)=E[X2]−(E[X])2\text{Var}(X) = E[X^2] - (E[X])^2
Learn more about this formula: Variance Computational Formula →


where E[X2]=∫−∞∞x2⋅fX(x)dxE[X^2] = \int_{-\infty}^{\infty} x^2 \cdot f_X(x)dx

Example: Uniform distribution on [a,b][a, b].

Continuous Uniform Variance
Var(X)=(b−a)212\text{Var}(X) = \frac{(b-a)^2}{12}
Learn more about this formula: Continuous Uniform Variance →


Wider intervals produce larger variance.

Example: Exponential distribution with parameter λ\lambda.

Exponential Variance
Var(X)=1λ2\text{Var}(X) = \frac{1}{\lambda^2}
Learn more about this formula: Exponential Variance →


Variance decreases as the rate parameter increases.

Standard Deviation


Standard deviation is Var(X)\sqrt{\text{Var}(X)}, bringing spread back to the original measurement units.

Derived Properties: Spread Measures
SD(X)=Var(X)\text{SD}(X) = \sqrt{\text{Var}(X)}

For the exponential: SD(X)=1λ\text{SD}(X) = \frac{1}{\lambda}

Standard deviation has the same dimensionality as XX itself, making interpretation more direct than variance.

Interquartile Range


The IQR measures spread using percentiles rather than deviations from the mean.

Derived Properties: Spread Measures
IQR=Q3−Q1\text{IQR} = Q_3 - Q_1

where Q1Q_1 is the 25th percentile and Q3Q_3 is the 75th percentile.

Find quartiles by solving: ∫−∞Q1fX(x)dx=0.25\int_{-\infty}^{Q_1} f_X(x)dx = 0.25 and ∫−∞Q3fX(x)dx=0.75\int_{-\infty}^{Q_3} f_X(x)dx = 0.75

IQR is robust to outliers and heavy tails—extreme values don't affect it the way they affect variance.

What Spread Reveals


Narrow spread means values cluster tightly, making individual outcomes more predictable. Wide spread means values scatter broadly, increasing uncertainty about any single observation. Two distributions with identical means can behave completely differently based on their spread.

Transformations (Change of Variables)


Apply a function to a random variable, and you create a new random variable with its own PDF. The transformation process requires careful handling of how density changes.

The Transformation Problem


Start with random variable XX with PDF fX(x)f_X(x).

Apply function gg to get Y=g(X)Y = g(X).

The new PDF fY(y)f_Y(y) must account for how gg stretches or compresses intervals—this affects density.

Linear Transformations


For Y=aX+bY = aX + b where a≠0a \neq 0:

PDF of Linear Transformation
fY(y)=1∣a∣fX(y−ba)f_Y(y) = \frac{1}{|a|} f_X\left(\frac{y - b}{a}\right)
Learn more about this formula: PDF of Linear Transformation →


The factor 1∣a∣\frac{1}{|a|} appears because scaling the variable by aa compresses or stretches the density axis.

Example: If XX is uniform on [0,1][0, 1] with fX(x)=1f_X(x) = 1, then Y=3XY = 3X has:

Transformations (Change of Variables)
fY(y)=13⋅1=13 for y∈[0,3]f_Y(y) = \frac{1}{3} \cdot 1 = \frac{1}{3} \text{ for } y \in [0, 3]

The density drops to 13\frac{1}{3} because the interval stretched by factor 3.

Pitfall: Leaving out the factor 1/|a|
Writing fY(y)=fX(y3)=1f_Y(y) = f_X\left(\frac{y}{3}\right) = 1 on [0,3][0, 3] substitutes without the factor, and the area under fYf_Y becomes 33. With the factor, fY(y)=13⋅1=13f_Y(y) = \frac{1}{3} \cdot 1 = \frac{1}{3} and the area is 11.

Two things happen in the linear formula. The argument y−ba\frac{y - b}{a} sends each value yy back to the value of XX it came from, which fixes where the density sits on the new axis. The factor in front sets how tall the density is there.

Example: Y=X+5Y = X + 5 shifts the distribution but doesn't change density shape:

Transformations (Change of Variables)
fY(y)=fX(y−5)f_Y(y) = f_X(y - 5)

General Transformations (Invertible)


For invertible gg (strictly increasing or decreasing), the transformation formula includes the Jacobian:

PDF of Monotone Transformation
fY(y)=fX(g−1(y))⋅∣ddyg−1(y)∣f_Y(y) = f_X(g^{-1}(y)) \cdot \left|\frac{d}{dy}g^{-1}(y)\right|
Learn more about this formula: PDF of Monotone Transformation →


The derivative term ∣ddyg−1(y)∣\left|\frac{d}{dy}g^{-1}(y)\right| is the Jacobian—it measures how gg locally stretches or compresses space.

Alternative form using g′(x)g'(x):

Transformations (Change of Variables)
fY(y)=fX(x)⋅1∣g′(x)∣f_Y(y) = f_X(x) \cdot \frac{1}{|g'(x)|}
where x=g−1(y)x = g^{-1}(y)

Example: Y=X2Y = X^2 for X>0X > 0. Then g−1(y)=yg^{-1}(y) = \sqrt{y} and ddyy=12y\frac{d}{dy}\sqrt{y} = \frac{1}{2\sqrt{y}}.

Transformations (Change of Variables)
fY(y)=fX(y)⋅12yf_Y(y) = f_X(\sqrt{y}) \cdot \frac{1}{2\sqrt{y}}

Fact: Squares pile up near zero
If XX is uniform on [0,1][0, 1], then Y=X2Y = X^2 has density 12y\frac{1}{2\sqrt{y}}, which grows without bound as y→0y \to 0. A tenth of all the probability lands in [0,0.01][0, 0.01], because Y≤0.01Y \leq 0.01 exactly when X≤0.1X \leq 0.1, yet the total area is still ∫0112y dy=1\int_0^1 \frac{1}{2\sqrt{y}}\,dy = 1.

Take XX uniform on [0,1][0, 1], so that fX=1f_X = 1 there and Y=X2Y = X^2 also stays inside [0,1][0, 1]. Squaring moves every value strictly between 00 and 11 downward, and it squeezes the values near 00 hardest: 0.10.1 becomes 0.010.01, and 0.010.01 becomes 0.00010.0001. Probability that was spread over a stretch of xx values now sits on a much shorter stretch of yy values.

Another route to the same density goes through the CDF of YY: find FYF_Y first, then differentiate.

CDF Method for Transformations
FY(y)=P(g(X)≤y)F_Y(y) = P(g(X) \leq y)
Learn more about this formula: CDF Method for Transformations →


Why the Absolute Value?


The Jacobian includes ∣⋅∣|\cdot| because density must remain non-negative. Whether gg increases or decreases, the density adjustment stays positive.

Probability is preserved: P(a≤X≤b)=P(g(a)≤Y≤g(b))P(a \leq X \leq b) = P(g(a) \leq Y \leq g(b)) for increasing gg (for decreasing gg the bounds swap: P(g(b)≤Y≤g(a))P(g(b) \leq Y \leq g(a)))

The Jacobian ensures total area under the new PDF still integrates to 1.

Non-Invertible Transformations


When gg is not one-to-one, multiple xx values map to the same yy. Sum their contributions:

Transformations (Change of Variables)
fY(y)=∑x:g(x)=yfX(x)∣g′(x)∣f_Y(y) = \sum_{x: g(x) = y} \frac{f_X(x)}{|g'(x)|}

This generalizes the invertible case by collecting all pre-images.

Key Insight


Transformations redistribute probability density across a new domain. The Jacobian factor adjusts for how the transformation stretches or compresses regions, ensuring probability conservation. Density can change dramatically even when total probability stays fixed at 1.
X uniform on [0, 1] with density 1, and Y = 3X uniform on [0, 3] with density 1/3: three times as wide, a third as tallvaluedensity0.511.522.533.50.51X uniform on [0, 1]: f = 1Y = 3X on [0, 3]: f = 1/3both areas equal 1Stretching by 3 divides the density by 3
Change of variables: Y = 3X

X is uniform on [0, 1] with density 1 (blue). Multiplying by 3 spreads the same probability over [0, 3], three times as wide, so the density of Y = 3X must drop to 1/3 (amber) for the area to stay 1. This is the factor |d/dy g⁻¹(y)| = 1/3 in the change-of-variables formula.

A shift, Y = X + 5, moves the rectangle without changing its height.

Connection to CDF (The Fundamental Theorem)


    The PDF and the CDF (Cumulative Distribution Function) are two representations of the same probability distribution. They are connected through the fundamental operations of calculus: integration and differentiation.

    From PDF to CDF (Integration)


    The CDF accumulates probability from the PDF through integration:

    Connection to CDF (The Fundamental Theorem)
    FX(x)=P(X≤x)=∫−∞xfX(t)dtF_X(x) = P(X \leq x) = \int_{-\infty}^x f_X(t)dt

    The CDF at any point equals the total area under the PDF curve from −∞-\infty up to that point.

    Example: Exponential distribution with f(x)=λe−λxf(x) = \lambda e^{-\lambda x} for x≥0x \geq 0.

    Connection to CDF (The Fundamental Theorem)
    FX(x)=∫0xλe−λtdt=1−e−λx for x≥0F_X(x) = \int_0^x \lambda e^{-\lambda t}dt = 1 - e^{-\lambda x} \text{ for } x \geq 0

    Example: Uniform distribution on [0,10][0, 10] with f(x)=110f(x) = \frac{1}{10}.

    Connection to CDF (The Fundamental Theorem)
    FX(x)=∫0x110dt=x10 for x∈[0,10]F_X(x) = \int_0^x \frac{1}{10}dt = \frac{x}{10} \text{ for } x \in [0, 10]

    RULE
    The CDF is continuous and always increasing (or at least non-decreasing) for continuous random variables.

    From CDF to PDF (Differentiation)


    The PDF is the derivative of the CDF:

    PDF as CDF Derivative
    fX(x)=ddxFX(x)f_X(x) = \frac{d}{dx}F_X(x)
    Learn more about this formula: PDF as CDF Derivative →


    The PDF gives the instantaneous rate at which probability accumulates—the slope of the CDF curve.

    Example: Exponential with FX(x)=1−e−λxF_X(x) = 1 - e^{-\lambda x}.

    Connection to CDF (The Fundamental Theorem)
    fX(x)=ddx(1−e−λx)=λe−λxf_X(x) = \frac{d}{dx}(1 - e^{-\lambda x}) = \lambda e^{-\lambda x}

    Example: Uniform with FX(x)=x10F_X(x) = \frac{x}{10} on [0,10][0, 10].

    Connection to CDF (The Fundamental Theorem)
    fX(x)=ddx(x10)=110f_X(x) = \frac{d}{dx}\left(\frac{x}{10}\right) = \frac{1}{10}

    Constant derivative produces constant density.

    The Fundamental Theorem Connection


    This relationship is the Fundamental Theorem of Calculus applied to probability:

    Connection to CDF (The Fundamental Theorem)
    ddx∫−∞xfX(t)dt=fX(x)\frac{d}{dx}\int_{-\infty}^x f_X(t)dt = f_X(x)

    Integration builds up cumulative probability. Differentiation recovers the density function. They are inverse operations.

    Graphical Relationship


  • PDF: Shows where density concentrates (peaks and valleys)
  • CDF: Shows accumulated probability (always rising, reaches 1)

  • The steeper the CDF at point xx, the higher the PDF at that point. Flat regions in the CDF correspond to zero density in the PDF.

    Why Both Exist


    The PDF answers: "How dense is probability at this point?"

    The CDF answers: "What's the probability of at most this value?"

    Different questions favor different representations. The PDF is better for understanding density and finding modes. The CDF is better for computing cumulative probabilities and percentiles. Both describe the same underlying distribution completely.
0.00.20.40.60.81.0-4-3.0-2.0-1.0-0.01.02.03.04.0xF(x) = P(X ≤ x)
Normal CDF, mean 0, standard deviation 1

The CDF is the running area under the density, so its slope at any point is the density there: the S-curve is steepest at the mean where the bell is highest and flattens in the tails where the bell is low. Differentiating F recovers f and integrating f recovers F. Move along the curve and compare slope with density on the continuous CDF visualizer.

The named continuous families are catalogued next.

PDFs of Common Continuous Distributions


Certain probability scenarios appear so frequently that their PDFs have been studied, named, and cataloged. These are the standard continuous distributions.

Each distribution models a specific type of random process. Once you recognize the pattern, you can use the established PDF formula instead of deriving it from scratch.

Uniform Distribution


PDF: f(x)=1b−af(x) = \frac{1}{b-a} for x∈[a,b]x \in [a, b], zero elsewhere.

The PDF is completely flat—constant density across the entire support. Probability spreads evenly, with no value more likely than any other. This represents maximum uncertainty given only the interval bounds. The PDF height equals 1interval length\frac{1}{\text{interval length}} to ensure total area equals 1. For [0,1][0, 1], density is exactly 1. For [0,10][0, 10], density drops to 110\frac{1}{10}.

Read More About Uniform Distribution

Normal (Gaussian) Distribution


PDF: f(x)=1σ2πe−(x−μ)22σ2f(x) = \frac{1}{\sigma\sqrt{2\pi}}e^{-\frac{(x-\mu)^2}{2\sigma^2}} for x∈(−∞,∞)x \in (-\infty, \infty)

The PDF forms the iconic bell curve—symmetric, smooth, and unimodal. The peak sits at the mean μ\mu, where density is maximized. Density decreases symmetrically on both sides following the exponential of a quadratic. The parameter σ\sigma controls spread: small σ\sigma creates a narrow, tall peak; large σ\sigma creates a wide, flat curve. The PDF never reaches zero but becomes negligibly small beyond μ±3σ\mu \pm 3\sigma. The exponential decay ensures finite total area despite infinite support. This is the most important distribution in statistics due to the Central Limit Theorem.

Read More About Normal Distribution

Exponential Distribution


PDF: f(x)=λe−λxf(x) = \lambda e^{-\lambda x} for x≥0x \geq 0, zero for x<0x < 0

The PDF starts at maximum density λ\lambda at x=0x = 0 and decays exponentially toward zero. It decreases monotonically—no peaks or valleys, just continuous decline. The rate parameter λ\lambda controls how fast decay occurs: high λ\lambda produces rapid drop-off and concentration near zero; low λ\lambda produces slow decay and spread across larger values. The exponential PDF has the memoryless property—the remaining distribution shape doesn't depend on how much time has passed. Each step multiplies density by constant factor e−λe^{-\lambda}. Despite infinite support, the integral converges to 1 due to exponential shrinkage.

Read More About Exponential Distribution

Beta Distribution


PDF: f(x)=xα−1(1−x)β−1B(α,β)f(x) = \frac{x^{\alpha-1}(1-x)^{\beta-1}}{B(\alpha, \beta)} for x∈[0,1]x \in [0, 1]

The PDF is remarkably flexible, changing shape dramatically based on parameters α\alpha and β\beta. For α,β>1\alpha, \beta > 1, it's unimodal with peak inside (0,1)(0, 1). For α,β<1\alpha, \beta < 1, it's U-shaped with density concentrating at the endpoints. For α=β\alpha = \beta, it's symmetric around 12\frac{1}{2}. For α≠β\alpha \neq \beta, it's skewed. The normalizing constant B(α,β)B(\alpha, \beta) ensures integration to 1. As α\alpha increases, mass shifts toward 1; as β\beta increases, mass shifts toward 0. Special case: α=β=1\alpha = \beta = 1 reduces to uniform on [0,1][0, 1]. The bounded support makes it ideal for modeling proportions, probabilities, and rates.



PDF Patterns


Each PDF has characteristic behavior: where density concentrates, how it spreads, whether it's symmetric or skewed, how parameters reshape the curve. These patterns reflect the underlying random process and determine the distribution's expected value and variance. Recognizing PDF shapes helps identify which distribution models your data.
0.0000.2000.4000.6000.8001.0000.91.72.63.54.35.26.06.9Value (k)Density f(x)E[X]=1.00
Exponential density, lambda = 1, with the mean marked

The catalogue of continuous densities includes this decaying curve for waiting times, the flat uniform density and the normal bell; each is a different rule for spreading unit area over the line. The explorer marks the mean on each, here at 1 over lambda. Compare the three shapes and their parameters on the distribution explorer.

Each family has its own page with parameters, moments and applications.

Common Pitfalls

Each of the three mistakes below is marked where it happens in the sections above; here each is worked through in full, with the wrong and the right working side by side.

Using the formula outside the support

A density is given by a formula on its support and is 00 elsewhere. When a probability is set up, the formula is integrated over the whole interval of the event, including the part that lies outside the support.

Wrong working: for the exponential density f(x)=2e−2xf(x) = 2e^{-2x}, x≥0x \geq 0,
P(X<1)=∫−∞12e−2x dx=[−e−2x]−∞1P(X < 1) = \int_{-\infty}^{1} 2e^{-2x}\,dx = \left[-e^{-2x}\right]_{-\infty}^{1}

As x→−∞x \to -\infty, e−2xe^{-2x} grows without bound, so the integral diverges.

Right working: the density is 00 for x<0x < 0, so only the part of the event inside the support counts.
P(X<1)=∫012e−2x dx=[−e−2x]01=1−e−2≈0.865P(X < 1) = \int_{0}^{1} 2e^{-2x}\,dx = \left[-e^{-2x}\right]_{0}^{1} = 1 - e^{-2} \approx 0.865


Why it happens: the formula is the part of the PDF that is written large, while the condition x≥0x \geq 0 sits beside it and is easy to drop. The tail formula P(X<a)=∫−∞afX(x) dxP(X < a) = \int_{-\infty}^{a} f_X(x)\,dx then invites the lower limit −∞-\infty.

How to check: a probability is a number between 00 and 11. An infinite or negative result, or one above 11, means the integral has run where the density is 00. Writing the support next to the limits before integrating catches it.

Dropping the minus sign of the antiderivative

An interval probability for the exponential density is set up correctly, but the antiderivative of e−2xe^{-2x} is taken without the factor that comes from the chain rule, so its sign is lost.

Wrong working:
∫132e−2x dx=[e−2x]13=e−6−e−2≈0.0025−0.1353=−0.133\int_1^3 2e^{-2x}\,dx = \left[e^{-2x}\right]_1^3 = e^{-6} - e^{-2} \approx 0.0025 - 0.1353 = -0.133


Right working: differentiating −e−2x-e^{-2x} gives 2e−2x2e^{-2x}, so −e−2x-e^{-2x} is the antiderivative.
∫132e−2x dx=[−e−2x]13=−e−6+e−2≈0.133\int_1^3 2e^{-2x}\,dx = \left[-e^{-2x}\right]_1^3 = -e^{-6} + e^{-2} \approx 0.133


Why it happens: exe^{x} is its own antiderivative, and that rule is carried over to e−2xe^{-2x} without accounting for the inner factor −2-2.

How to check: differentiate the antiderivative and compare it with the density; ddxe−2x=−2e−2x\frac{d}{dx}e^{-2x} = -2e^{-2x}, which has the wrong sign. A negative probability is always a sign of an error.

Leaving out the factor 1/|a|

The PDF of a linear transformation Y=aX+bY = aX + b is found by substituting y−ba\frac{y - b}{a} into fXf_X, and the factor 1∣a∣\frac{1}{|a|} in front is left out.

Wrong working: for XX uniform on [0,1][0, 1] and Y=3XY = 3X,
fY(y)=fX(y3)=1 for y∈[0,3]f_Y(y) = f_X\left(\frac{y}{3}\right) = 1 \text{ for } y \in [0, 3]

The area under this function is 1⋅3=31 \cdot 3 = 3.

Right working: the factor 1∣a∣=13\frac{1}{|a|} = \frac{1}{3} scales the height.
fY(y)=13fX(y3)=13 for y∈[0,3]f_Y(y) = \frac{1}{3} f_X\left(\frac{y}{3}\right) = \frac{1}{3} \text{ for } y \in [0, 3]

The area is 13⋅3=1\frac{1}{3} \cdot 3 = 1.

Why it happens: for a PMF the substitution alone is correct, because each value keeps its own probability when it is moved. A density is probability per unit length, and stretching the axis by a factor 33 spreads the same probability over three times the length.

How to check: integrate the new density over its support. If the area is not 11, the factor is missing; here the wrong answer has area 33, exactly ∣a∣|a|.

PDF FAQ

Why is the probability at a single point zero for a continuous variable?

+
Because probability is the area under the density, and a single point has no width. Integrating f over an interval of zero length gives zero, whatever the density's height there. This does not mean the value cannot occur — every observation lands on some point. It means probability for a continuous variable lives on intervals, never on individual points.Read more →

Can a PDF value exceed 1?

+
Yes. A PMF returns probabilities, so its values are capped at 1; a PDF returns density, which has no such ceiling. What must equal 1 is the total area, not any height. A uniform distribution on [0, 0.1] has f(x) = 10 across that interval — perfectly valid, since 10 × 0.1 = 1.Read more →

Does it matter whether you use < or ≤ for a continuous variable?

+
No — they give identical answers. P(X < a) and P(X ≤ a) differ by the single point a, which carries zero probability, so all four of <, ≤, >, ≥ agree. This is the opposite of the discrete case, where including or excluding an endpoint changes the answer by that value's whole probability.Read more →

What does the value of a PDF actually tell you?

+
A rate, not a probability. f(5) = 0.8 means the density at 5 is 0.8 — roughly, probability per unit of x in that neighborhood — not that anything has probability 0.8. To get a probability you integrate over an interval. Saying “the probability at x = 5 is 0.8” is the phrasing to avoid.Read more →

Why does the change-of-variables formula need an absolute value?

+
To keep the density non-negative. Transforming a variable multiplies the density by the derivative of the inverse map, and that derivative is negative whenever the transformation reverses direction. Without the absolute value the result would be a negative density, violating the axioms. The bars record that only the magnitude of the stretch matters, not its orientation.Read more →

Does a PDF have to approach zero far out in the tails?

+
No. Normalization only asks that the total area be 11; it says nothing about the height at any particular place. Let f(x)=nf(x) = n on [n,n+1n⋅2n]\left[n, n + \frac{1}{n \cdot 2^n}\right] for each whole number n≥1n \geq 1 and 00 elsewhere. The rectangles have areas 12,14,18,…\frac{1}{2}, \frac{1}{4}, \frac{1}{8}, \ldots, which add up to 11, so ff is a valid density whose peaks grow without bound far out.Read more →

Can a PDF go to infinity and still be valid?

+
Yes, as long as the area stays 11. If XX is uniform on [0,1][0, 1], then Y=X2Y = X^2 has density 12y\frac{1}{2\sqrt{y}}, which grows without bound as y→0y \to 0, yet ∫0112y dy=1\int_0^1 \frac{1}{2\sqrt{y}}\,dy = 1. Squaring crowds the values toward 00: a tenth of all the probability lands in [0,0.01][0, 0.01], because Y≤0.01Y \leq 0.01 exactly when X≤0.1X \leq 0.1.Read more →