SECTION 05 / 5

Lesson 5 — The CDF of a Continuous Random Variable

7 min read
On this page 11 headings

The CDF F(x) = P(X ≤ x) records the area under the PDF from the far left up to x. Integrate f to get F; differentiate F to get f.

24. What the CDF is: accumulated probability

If you answer P(X ≤ 0.3), P(X ≤ 0.6) and P(X ≤ 0.9) one integral at a time, you repeat the same work. The CDF does it once, for every x:

F(x)=P(X≤x)F(x) = P(X \le x)

Capital F is the CDF; small f is the PDF. Picture walking left to right under f(x) = 2x and recording the area behind you: 0 at x = 0, 0.36 at x = 0.6, all of it (1) at x = 1.

Illustration description: F(0.6) = area under f(x) = 2x from 0 to 0.6 = 0.36, i.e. 36% accumulated

x00.30.50.60.91
F(x) = x²00.090.250.360.811

Note f(0.6) = 1.2 is the height of the PDF, not a probability; F(0.6) = 0.36 is the probability.

25. From PDF to CDF: integrate

F(x)=∫−∞xf(t) dtF(x) = \int_{-\infty}^{x} f(t)\,dt

The dummy variable t keeps the moving integration variable separate from the upper limit x.

Example. f(x) = 2x on [0, 1].

  • Support is [0, 1]; there is no density below 0, so start the integral at 0.
  • Integrate for 0 ≤ x ≤ 1:
F(x)=∫0x2t dt=[t2]0x=x2F(x) = \int_0^x 2t\,dt = \left[t^2\right]_0^x = x^2
  • Fill in every region — the CDF is defined for all real x, and GATE marks you down for leaving regions out:
F(x)={0x<0x20≤x≤11x>1F(x) = \begin{cases} 0 & x < 0 \\ x^2 & 0 \le x \le 1 \\ 1 & x > 1 \end{cases}

Illustration description: Integrate f(x) = 2x to get F(x) = x² on [0, 1], 0 to the left and 1 to the right

Shape check: a straight rising PDF gives a curved CDF; the CDF is steepest where the PDF is tallest (near x = 1), because its slope is the PDF. The pieces join with no jumps: F = 0 at x = 0 and F = 1 at x = 1 from both sides.

26. Using the CDF: intervals and tails

Once F is known, no more integration is needed — just plug in and subtract.

Illustration description: P(0.5 ≤ X ≤ 0.8) = F(0.8) − F(0.5) = 0.39; P(X > 0.6) = 1 − F(0.6) = 0.64

AskedFormulaWith F(x) = x²
P(X ≤ a)F(a)P(X ≤ 0.6) = 0.36
P(a ≤ X ≤ b)F(b) − F(a)P(0.5 ≤ X ≤ 0.8) = 0.64 − 0.25 = 0.39
P(X > a)1 − F(a)P(X > 0.6) = 1 − 0.36 = 0.64

For a continuous X, < and ≤ give the same answer, since P(X = a) = 0. So P(0.5 < X < 0.8) is also 0.39. (For a discrete X this is not true — recall Lesson 1, Q3.)

Values outside the support: P(X ≤ 1.7) = F(1.7) = 1 and P(X > −2) = 1 − F(−2) = 1. Read off the correct region of the piecewise CDF; don't plug 1.7 into x².

27. From CDF back to PDF, and CDF properties

Differentiate the CDF to recover the PDF (wherever F is differentiable):

f(x)=dF(x)dxe.g. ddx(x2)=2x on 0<x<1, and f=0 elsewheref(x) = \frac{dF(x)}{dx} \qquad \text{e.g. } \frac{d}{dx}(x^2) = 2x \text{ on } 0 < x < 1, \text{ and } f = 0 \text{ elsewhere}

Illustration description: PDF and CDF linked by integration and differentiation; the CDF properties

Every CDF satisfies:

  • 0 ≤ F(x) ≤ 1
  • Non-decreasing
  • F(x) → 0 as x → −∞, and F(x) → 1 as x → +∞
  • Right-continuous

For a continuous random variable the CDF is more than right-continuous: it is continuous everywhere, with no jumps. Image note: the open dot drawn at the origin of the CDF graph suggests a jump at x = 0. There is none — F(0) = 0 from both sides. Open and filled dots belong to discrete (staircase) CDFs, as in Lesson 1.

Checking a proposed CDF (common GATE MCQ): test each property. F(x) = 1 − x on [0, 1] fails (decreasing). F(x) = 2x on [0, 1] fails (exceeds 1). F(x) = x² on [0, 1] with 0 below and 1 above passes.

28. Harder GATE patterns

A. Median and percentiles: solve F(m) = target

The median m is the value with half the probability on each side: F(m) = 0.5. The p-th percentile solves F(x) = p/100.

For F(x) = x² on [0, 1]:

m2=0.5  ⇒  m=12≈0.70775th percentile: x2=0.75⇒x≈0.866m^2 = 0.5 \;\Rightarrow\; m = \tfrac{1}{\sqrt2} \approx 0.707 \qquad \text{75th percentile: } x^2 = 0.75 \Rightarrow x \approx 0.866

The median is above 0.5 because the density is piled up on the right.

B. CDF of a piecewise PDF: carry the accumulated area forward

Triangle PDF: f(x) = x on [0, 1], f(x) = 2 − x on [1, 2], 0 otherwise.

  • 0 ≤ x ≤ 1: F(x) = ∫₀ˣ t dt = x²/2. At x = 1, F = 1/2.
  • 1 ≤ x ≤ 2: start from the 1/2 already accumulated, then add the new piece:
F(x)=12+∫1x(2−t) dt=12+[2t−t22]1x=2x−x22−1F(x) = \tfrac12 + \int_1^x (2 - t)\,dt = \tfrac12 + \left[2t - \tfrac{t^2}{2}\right]_1^x = 2x - \tfrac{x^2}{2} - 1
  • Check the joins: F(1) = 2 − 0.5 − 1 = 0.5 ✔ and F(2) = 4 − 2 − 1 = 1 ✔.
F(x)={0x<0x2/20≤x≤12x−x2/2−11<x≤21x>2F(x) = \begin{cases} 0 & x < 0 \\ x^2/2 & 0 \le x \le 1 \\ 2x - x^2/2 - 1 & 1 < x \le 2 \\ 1 & x > 2 \end{cases}

The classic mistake is starting the second piece from 0 instead of from F(1) = 1/2. Check the join values every time.

29. Lesson 5 practice

  • ☐ Q1. A continuous X has CDF F(x) = x² for 0 ≤ x ≤ 1. P(X > 0.6) = ? (A) 0.36 (B) 0.40 (C) 0.64 (D) 0.60
  • ☐ Q2. f(x) = x/2 on [0, 2]. Write the full CDF, then find P(X ≤ 1.5) and P(X > 1).
  • ☐ Q3. F(x) = x³ on [0, 1] (0 below, 1 above). Find the PDF and P(0.5 < X ≤ 1).
  • ☐ Q4. For f(x) = 2x on [0, 1], find the median and the 75th percentile.
  • ☐ Q5. Which can be a CDF on [0, 1] (0 below, 1 above)? (A) x² (B) 1 − x (C) 2x
  • ☐ Q6. F(x) = 1 − e^(−2x) for x ≥ 0, 0 for x < 0. Find the PDF and P(X > 1).
  • ☐ Q7. A continuous X has F(x) = kx² for 0 ≤ x ≤ 3, 0 below, 1 above. Find k, the PDF, and P(1 < X < 2).
  • ☐ Q8. For the triangle PDF of section 28B, find P(X ≤ 1.5) and the median.

Answers

  • (C) 0.64. 1 − F(0.6) = 1 − 0.36. Option (A) is F(0.6) itself — the left tail, not the right.
  • F = 0 (x < 0), x²/4 (0 ≤ x ≤ 2), 1 (x > 2). P(X ≤ 1.5) = 2.25/4 = 9/16; P(X > 1) = 1 − 1/4 = 3/4 (matches section 21).
  • f(x) = 3x² on [0, 1]; P = 0.875. 1 − 0.5³ = 1 − 0.125.
  • Median ≈ 0.707, 75th percentile ≈ 0.866. Solve x² = 0.5 and x² = 0.75.
  • (A). (B) decreases; (C) exceeds 1 for x > 0.5.
  • f(x) = 2e^(−2x) for x ≥ 0; P(X > 1) = e^(−2) ≈ 0.135. This is the exponential distribution — you'll meet it in Module 4.
  • k = 1/9, f(x) = 2x/9 on [0, 3], P = 1/3. Continuity at 3 forces k·9 = 1. Then (4 − 1)/9.
  • P(X ≤ 1.5) = 0.875; median = 1. Second piece: 3 − 1.125 − 1 = 0.875. F(1) = 1/2, so the median is 1 (the PDF is symmetric about 1).

30. Lesson 5 revision sheet

TaskDo this
PDF → CDFF(x) = ∫ from −∞ to x of f(t) dt; write all regions (0 left of support, 1 right of it)
CDF → PDFf(x) = F′(x) inside the support, 0 outside
P(X ≤ a)F(a)
P(a ≤ X ≤ b)F(b) − F(a) (endpoints don't matter for continuous X)
P(X > a)1 − F(a)
Median / percentileSolve F(m) = 0.5 / F(x) = p
Unknown constant in a CDFContinuity at the support's ends (F reaches 1 at the right end)
Piecewise PDFEach new piece starts from the area already accumulated

Common mistakes

  • Answering a right-tail question with F(a) instead of 1 − F(a).
  • Plugging a value outside the support into the middle formula (F(1.7) = 1, not 1.7²).
  • Writing only the middle piece of the CDF.
  • Restarting a piecewise CDF from 0 at the break point.
  • Confusing f(a) (height) with F(a) (probability).

Next: Module 2 — Expectation and variance.

YOUR STUDY PROGRESS

Finished this section? Save your progress.

Back to top ↑