Skip to content
GATEiit

GATE DA · Probability and Statistics

Continuous random variables and probability distribution functions

Continuous random variables described by a probability density function: the PDF conditions, probabilities as areas, the CDF, mean, variance, median and mode by integration, and the distribution of a function of X.

Before you start

This topic comes before: Conditional expectation and variance, Cumulative distribution function; conditional PDF, Uniform, exponential, Poisson, normal, standard normal, t- and chi-squared distributions

Concept notes

1. Probability density function

A random variable X is continuous if there is a function f(x), the probability density function (PDF), with P(a≤X≤b)=∫abf(x) dxfor all a≤b. A valid PDF needs f(x)≥0and∫−∞∞f(x) dx=1.

Key consequences:

  • P(X=a)=0 for every single point, so P(a<X<b)=P(a≤X≤b): strict or not does not matter.
  • f(x) is not a probability. It can exceed 1 (the uniform PDF on [0,0.5] equals 2). Only areas under f are probabilities.
  • For small Δ, P(x<X≤x+Δ)≈f(x) Δ.

Finding the constant: for f(x)=kx2 on [0,3], ∫03kx2 dx=9k=1 gives k=1/9. Then P(1<X<2)=19⋅8−13=727.

01237/27f(x) = x²/9
PDF f(x) = x²/9 on [0, 3]: the shaded area P(1 < X < 2) = 7/27

2. The CDF of a continuous random variable

The cumulative distribution function is F(x)=P(X≤x)=∫−∞xf(t) dt. For a continuous RV, F is continuous, non-decreasing, F(−∞)=0, F(∞)=1, and wherever f is continuous, f(x)=F′(x).

So probabilities come from F by subtraction: P(a<X≤b)=F(b)−F(a) and P(X>a)=1−F(a).

Write F piecewise across the whole real line: 0 to the left of the support, the integral inside it, 1 to the right. For f(x)=2x on [0,1]:

Unlike a discrete CDF, there are no jumps.

3. Mean, variance, median and mode

Replace sums by integrals: E[X]=∫xf(x) dx,E[g(X)]=∫g(x)f(x) dx (LOTUS),Var(X)=E[X2]−(E[X])2. Linearity and Var(aX+b)=a2Var(X) hold as before.

  • Median m: solve F(m)=12. More generally the p-th quantile solves F(xp)=p.
  • Mode: the x where f is largest (set f′(x)=0, or check the endpoints if f is monotone).
For f(x)=2x on [0,1] Value
Mean ∫012x2 dx=2/3
E[X2] ∫012x3 dx=1/2
Variance 1/2−4/9=1/18
Median m2=1/2, m=1/2≈0.707
Mode 1 (the PDF increases)

Here mean < median < mode, the pattern for a left-skewed shape.

For a non-negative X, the tail formula also holds: E[X]=∫0∞P(X>x) dx.

4. Functions of a continuous random variable

To find the distribution of Y=g(X), use the CDF method:

  1. Write FY(y)=P(g(X)≤y) as an event about X.
  2. Express it with FX.
  3. Differentiate: fY(y)=FY′(y).

Example: X∼U(0,1), Y=X2. For 0<y<1, FY(y)=P(X≤y)=y, so fY(y)=12y.

Monotone shortcut: if g is strictly increasing or decreasing with inverse x=g−1(y), fY(y)=fX(g−1(y))∣dxdy∣. For the linear map Y=aX+b: fY(y)=1∣a∣fX ⁣(y−ba). So U(0,1) under Y=2X+3 becomes uniform on [3,5] with density 12.

Probability integral transform: if X has a continuous CDF F, then F(X)∼U(0,1). Read backwards, F−1(U) has CDF F; this is how samples are generated (inverse transform sampling).

Formulas to remember

PDF conditions
f(x)≥0,∫−∞∞f(x) dx=1
Probability as area
P(a≤X≤b)=∫abf(x) dx=F(b)−F(a)
CDF and PDF
F(x)=∫−∞xf(t) dt,f(x)=F′(x)
Mean
E[X]=∫−∞∞x f(x) dx
LOTUS
E[g(X)]=∫−∞∞g(x) f(x) dx
Median
F(m)=12
Change of variable (monotone g)
fY(y)=fX(g−1(y))∣ddyg−1(y)∣

Common mistakes

  • Treating f(x) as a probability; only ∫f over an interval is a probability, and f may exceed 1.
  • Forgetting the 0 and 1 pieces when writing a CDF over the whole real line.
  • Applying the change-of-variable formula without the ∣dx/dy∣ factor, or using it for a non-monotone g such as X2 on a symmetric range.
  • Finding the median by setting f(m)=1/2 instead of F(m)=1/2.
  • Integrating over the wrong limits: use only the support where f is non-zero.

Worked examples

Try each step yourself, then reveal the working.

Example 1: Constant, probability, mean and variance

numerical

f(x)=kx2 for 0≤x≤3 and 0 otherwise. Find k, P(1<X<2), E[X] and Var(X).

  1. Step 1: Normalise.

    Try it on paper first.

Example 2: CDF and median

numerical

f(x)=2x on [0,1]. Find the CDF, P(X>0.5) and the median.

  1. Step 1: Integrate the PDF up to $x$.

    Try it on paper first.

Example 3: Distribution of the square of a uniform

numerical

X∼U(0,1) and Y=X2. Find the PDF of Y and E[Y] in two ways.

  1. Step 1: Write the CDF of $Y$ through $X$.

    Try it on paper first.

Example 4: Is a density a probability?

conceptual

X is uniform on [0,0.5]. Its PDF is 2. Is something wrong, and what is P(X=0.3)?

  1. Step 1: Check the two PDF conditions.

    Try it on paper first.

Previous year questions

1 official GATE DA question on this topic, newest first.

Practise these 1 PYQs →

Topic test

9 questions: up to 1 official PYQs and original practice questions, with GATE marking (MCQ wrong answers lose marks). Score 60% or more to pass. A new set is drawn each time.

Mark as mastered

Loading your progress…

My revision notes

Notes written by the GATEiit team against the official GATE DA syllabus; being checked by a reviewer. Updated 2026-11-21. Spotted a mistake? Use Report an issue on any question, or contact us.