The Null Hypothesis
01.Atlas02.Laboratory03.Workshop04.Case Studies05.Library
TABLE OF CONTENTS
Back to Archive
Probability II
VOL. IMAR 2026

CH1 — Part 2

Example 3

Normalisation & Derivation

If XXX 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}fX​(x)={cx0​0<x<2otherwise​

Example 3 (a)

Find c

Find the constant ccc that makes fX(x)f_X(x)fX​(x) a valid pdf.
Solution

For fX(x)f_X(x)fX​(x) to be a valid pdf, the total area must be 1:

∫−∞∞fX(x) dx=1  ⟹  ∫02cx dx=1\int_{-\infty}^{\infty} f_X(x)\,dx = 1 \implies \int_0^2 cx\,dx = 1∫−∞∞​fX​(x)dx=1⟹∫02​cxdx=1c[x22]02=1  ⟹  2c=1  ⟹  c=1/2c\left[ \frac{x^2}{2} \right]_0^2 = 1 \implies 2c = 1 \implies c = 1/2c[2x2​]02​=1⟹2c=1⟹c=1/2

So:

fX(x)={12x0<x<20otherwisef_X(x) = \begin{cases} \tfrac{1}{2}x & 0 < x < 2 \\ 0 & \text{otherwise} \end{cases}fX​(x)={21​x0​0<x<2otherwise​
PDF Normalization
120.511.52xf(2) = 2c = 0.60
Total Area0.60
Control Constant cccc = 0.30
3 (b)

Deriving the Piecewise CDF

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

Mathematical Derivation Engine

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

— f(x): linear ramp from 0 to 1 on [0, 2].

— F(x): parabola 1/4x² on [0, 2].

Case 1: -0.5 ≤ x < 0
FX(x)=∫−∞x0 dt=0F_X(x) = \int_{-\infty}^{x} 0 \, dt = 0FX​(x)=∫−∞x​0dt=0FX(−0.50)=0F_X(-0.50) = 0FX​(−0.50)=0
Density Function f(t)
Cumulative Tracing F(x)
Evaluation
F(-0.50) = 0.000
x = -0.5evaluation x = -0.50x = 2.5
Complete Definition ResultFX(x)={0x<014x20≤x<21x≥2F_X(x) = \begin{cases} \color{#9b2c1c} 0 & x < 0 \\ \tfrac{1}{4}x^2 & 0 \leq x < 2 \\ 1 & x \geq 2 \end{cases}FX​(x)=⎩⎨⎧​041​x21​x<00≤x<2x≥2​
Example 4

Area Calculation

Now that we have the PDF and CDF for Example 3, we can calculate the probability that XXX 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)P(1<X<2).
Solution

We can solve this using either the integral of the PDF or the subtraction of the CDF:

P(1<X<2)=∫1212x dx=3/4P(1 < X < 2) = \int_1^2 \frac{1}{2}x\,dx = 3/4P(1<X<2)=∫12​21​xdx=3/4

Or using CDF subtraction:

FX(2)−FX(1)=1−1/4=3/4F_X(2) - F_X(1) = 1 - 1/4 = 3/4FX​(2)−FX​(1)=1−1/4=3/4
Probability as Area
a = 1.00
b = 2.00
-2-1120.20.4x
Bound A
Bound B
Integration Method
P(1.0≤X≤2.0)=∫1.02.0fX(x) dx≈0.7500P(1.0 \leq X \leq 2.0) = \int_{1.0}^{2.0} f_X(x)\,dx \approx 0.7500P(1.0≤X≤2.0)=∫1.02.0​fX​(x)dx≈0.7500
CDF Subtraction Method
FX(2.0)−FX(1.0)=1.0000−0.2500=0.7500F_X(2.0) - F_X(1.0) = 1.0000 - 0.2500 = 0.7500FX​(2.0)−FX​(1.0)=1.0000−0.2500=0.7500

Probability as Area

Remark — Area Interpretation

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

P(a≤X≤b)=∫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)P(a≤X≤b)=∫ab​fX​(x)dx=FX​(b)−FX​(a)
Interval Equivalence

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

P(a<X<b)P(a < X < b)P(a<X<b)
P(a≤X<b)P(a \leq X < b)P(a≤X<b)
P(a<X≤b)P(a < X \leq b)P(a<X≤b)
P(a≤X≤b)P(a \leq X \leq b)P(a≤X≤b)
Boundary Effects
This is one of the most practically useful facts in probability. For continuous distributions, the ≤ vs < distinction is irrelevant.
Probability as Area
a = -1.00
b = 1.00
-2-1120.20.4x
Bound A
Bound B
Integration Method
P(−1.0≤X≤1.0)=∫−1.01.0fX(x) dx≈0.6827P(-1.0 \leq X \leq 1.0) = \int_{-1.0}^{1.0} f_X(x)\,dx \approx 0.6827P(−1.0≤X≤1.0)=∫−1.01.0​fX​(x)dx≈0.6827
CDF Subtraction Method
FX(1.0)−FX(−1.0)=0.8413−0.1587=0.6827F_X(1.0) - F_X(-1.0) = 0.8413 - 0.1587 = 0.6827FX​(1.0)−FX​(−1.0)=0.8413−0.1587=0.6827
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)FX​(x) is preserved at the boundaries.

The "tent" function is a triangular density symmetric around x=1x=1x=1:fX(x)={x0<x<12−x1<x<20otherwisef_X(x) = \begin{cases} x & 0 < x < 1 \\ 2-x & 1 < x < 2 \\ 0 & \text{otherwise} \end{cases}fX​(x)=⎩⎨⎧​x2−x0​0<x<11<x<2otherwise​

Example 5

Comprehensive Analysis

Find (a) FX(x)F_X(x)FX​(x), (b) P(X≤0.2)P(X \leq 0.2)P(X≤0.2), (c) P(X≤1.5)P(X \leq 1.5)P(X≤1.5), (d) P(0.2<X<1.5)P(0.2 < X < 1.5)P(0.2<X<1.5), (e) P(0.1<X≤0.9)P(0.1 < X \leq 0.9)P(0.1<X≤0.9), (f) P(X>6)P(X > 6)P(X>6).
Solution

Final CDF

FX(x)={0x<01/2x20≤x<11−1/2(2−x)21≤x<21x≥2F_X(x) = \begin{cases} 0 & x < 0 \\ 1/2x^2 & 0 \leq x < 1 \\ 1 - 1/2(2-x)^2 & 1 \leq x < 2 \\ 1 & x \geq 2 \end{cases}FX​(x)=⎩⎨⎧​01/2x21−1/2(2−x)21​x<00≤x<11≤x<2x≥2​
P(X≤0.2)P(X \leq 0.2)P(X≤0.2)0.02
P(X≤1.5)P(X \leq 1.5)P(X≤1.5)0.875
P(0.2<X<1.5)P(0.2 < X < 1.5)P(0.2<X<1.5)0.855
P(0.1<X≤0.9)P(0.1 < X \leq 0.9)P(0.1<X≤0.9)0.40
P(X>6)P(X > 6)P(X>6)0
Symmetry
The absolute value makes the function symmetric around x = 1.
Interactive Visualisation

Building the Tent CDF

0 ≤ x < 1
Density
f(x)=xf(x) = xf(x)=x
Cumulative
F(x)=x2/2F(x) = x^2/2F(x)=x2/2
1 ≤ x < 2
Density
f(x)=2−xf(x) = 2 - xf(x)=2−x
Cumulative
F(x)=1−(2−x)22F(x) = 1 - \frac{(2-x)^2}{2}F(x)=1−2(2−x)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.0000FX​(−0.20)=∫−∞−0.20​fX​(t)dt=0.0000
Region 0Live evaluation

Exercises

Exercise 1
Let fX(x)=2f_X(x) = 2fX​(x)=2 for 1≤x≤1.51 \leq x \leq 1.51≤x≤1.5, and 000 otherwise. Is this a valid pdf?
Step-by-Step Derivation
Step 1: Area Visualization
Identify the region for the PDF fX(x)=2f_X(x) = 2fX​(x)=2 on [1,1.5][1, 1.5][1,1.5].
Exercise 2
If fX(x)=cx3(1−x)f_X(x) = cx^3(1-x)fX​(x)=cx3(1−x) for 0≤x≤10 \leq x \leq 10≤x≤1.
(a) Find c.
(b) Find P(X≤1/2)P(X \leq 1/2)P(X≤1/2).
(c) Find P(X≥1/2)P(X \geq 1/2)P(X≥1/2).
Step-by-Step Derivation
Step 1: (a) Find c
Calculate the constant ccc such that ∫01cx3(1−x) dx=1\int_0^1 cx^3(1-x)\,dx = 1∫01​cx3(1−x)dx=1.
The Null Hypothesis.

Where rigorous statistics and fluid design converge to build the architecture of insight.

Begin Exploration

The Platform

  • The Atlas
  • Laboratory
  • Case Studies
  • Workshop

Reference

  • The Library
  • About
  • Source Code↗

Get in Touch

contact@nullhypothesis.dev

© 2026 The Null Hypothesis. All Rights Reserved.