Probability II
MAR 2026

CH1 — Part 2

PDF Derivations and Area Accumulation

Example 3: Normalisation & Derivation

If XX is a random variable having the pdf of the form:

fX(x)={cx0<x<20otherwisef_X(x) = \begin{cases} cx & 0 < x < 2 \\ 0 & \text{otherwise} \end{cases}
Example 3 (a)

Find c

Find the constant cc that makes fX(x)f_X(x) a valid pdf.

PDF Normalization
120.511.52xf(2) = 2c = 0.60
Total Area0.60
Control Constant ccc = 0.30

3 (b) Deriving the Piecewise CDF

To find FX(x)F_X(x), we integrate the piecewise density function fX(t)f_X(t) from -\infty to xx across all three mathematical regions.

Derivation Trace

Use the slider to see how the integral accumulates over each mathematical region.

Case 1: -1 ≤ x < 0
x0dt\int_{-\infty}^x 0\,dt00
Density f(t)
Cumulative F(x)
Evaluation
F(-1.00) = 0.000
x = -1.0evaluation x = -1.00x = 3.0
Complete Definition ResultFX(x)={0x<014x20x<21x2F_X(x) = \begin{cases} \color{#9b2c1c} 0 & x < 0 \\ \tfrac{1}{4}x^2 & 0 \leq x < 2 \\ 1 & x \geq 2 \end{cases}

Example 4: Area Calculation

Now that we have the PDF and CDF for Example 3, we can calculate the probability that XX falls between 1 and 2. This interactive visualization shows both the Integration Method (area under the PDF) and the Subtraction Method (CDF evaluation).

Example 4

P(1 < X < 2)

Find P(1<X<2)P(1 < X < 2).

Probability as Area
a = -1.00
b = 1.00
-2-1120.20.4x
Bound A
Bound B
Integration Method
P(1.0X1.0)=1.01.0fX(x)dx0.6827P(-1.0 \leq X \leq 1.0) = \int_{-1.0}^{1.0} f_X(x)\,dx \approx 0.6827
CDF Subtraction Method
FX(1.0)FX(1.0)=0.84130.1587=0.6827F_X(1.0) - F_X(-1.0) = 0.8413 - 0.1587 = 0.6827

Probability as Area

Remark — Area Interpretation

For a continuous random variable, the probability P(aXb)P(a \leq X \leq b) is exactly the area under the density curve between aa and bb.

P(aXb)=abfX(x)dx=FX(b)FX(a)P(a \leq X \leq b) = \int_a^b f_X(x)\,dx = F_X(b) - F_X(a)
Interval Equivalence

Because P(X=a)=0P(X=a)=0 and P(X=b)=0P(X=b)=0 for continuous variables, all the following probabilities are equal:

P(a<X<b)P(a < X < b)
P(aX<b)P(a \leq X < b)
P(a<Xb)P(a < X \leq b)
P(aXb)P(a \leq X \leq b)

Example 5: The Tent Function

This example demonstrates the Fundamental Theorem of Calculus in its piecewise form. Notice how the continuity of FX(x)F_X(x) is preserved at the boundaries.

The "tent" function is a triangular density symmetric around x=1x=1:

fX(x)={x0<x<12x1<x<20otherwisef_X(x) = \begin{cases} x & 0 < x < 1 \\ 2-x & 1 < x < 2 \\ 0 & \text{otherwise} \end{cases}
Example 5

Comprehensive Analysis

Find (a) FX(x)F_X(x), (b) P(X0.2)P(X \leq 0.2), (c) P(X1.5)P(X \leq 1.5), (d) P(0.2<X<1.5)P(0.2 < X < 1.5), (e) P(0.1<X0.9)P(0.1 < X \leq 0.9), (f) P(X>6)P(X > 6).

Interactive Visualisation

Building the Tent CDF

0 ≤ x < 1
Density
f(x)=xf(x) = x
Cumulative
F(x)=x2/2F(x) = x^2/2
1 ≤ x < 2
Density
f(x)=2xf(x) = 2 - x
Cumulative
F(x)=1(2x)22F(x) = 1 - \frac{(2-x)^2}{2}
Direct Manipulation Active
Current Value
x = -0.20
0%
Density Function Trace
Cumulative Distribution Trace
x = -0.20
Calculus Computation
Integration Result
FX(0.20)=0.20fX(t)dt=0.0000F_X(-0.20) = \int_{-\infty}^{-0.20} f_X(t)\,dt = 0.0000

Exercises

Exercise 1

Let fX(x)=2f_X(x) = 2 for 1x1.51 \leq x \leq 1.5, and 00 otherwise. Is this a valid pdf?

Exercise 2

If fX(x)=cx3(1x)f_X(x) = cx^3(1-x) for 0x10 \leq x \leq 1.
(a) Find c.
(b) Find P(X1/2)P(X \leq 1/2).
(c) Find P(X1/2)P(X \geq 1/2).