SECTION 02 / 5

Lesson 2 — Discrete vs Continuous Random Variables

6 min read
On this page 7 headings

Infinitely many possible values does not make a random variable continuous. What matters is whether the values can be listed in a sequence (discrete) or fill a whole interval (continuous).

7. Discrete does not mean finite

A random variable is discrete when its possible values can be listed as a sequence — finite or countably infinite.

Example. Toss a fair coin until the first head. X = number of tosses needed.

Illustration description: Tosses until the first head: P(X = k) = (1/2)^k, values 1, 2, 3, 4, … go on forever

OutcomeXP(X = x)
H11/2
TH21/4
TTH31/8
TTTH41/16
………

X ∈ {1, 2, 3, …} has infinitely many values, but X can never be 2.5 or 3.78 — there are gaps between allowed values. So X is discrete. The first head on toss k needs k − 1 tails then a head:

P(X=k)=(12)k−1⋅12=(12)k,k=1,2,3,…P(X = k) = \left(\tfrac12\right)^{k-1} \cdot \tfrac12 = \left(\tfrac12\right)^{k}, \qquad k = 1, 2, 3, \ldots

Is it a valid PMF? Every term is positive, and the infinite geometric series sums to 1:

∑k=1∞(12)k=1/21−1/2=1\sum_{k=1}^{\infty} \left(\tfrac12\right)^k = \frac{1/2}{1 - 1/2} = 1

This is the geometric distribution (with p = 1/2). In general, for success probability p: P(X = k) = (1 − p)^(k−1) · p. It is a standard source of GATE questions on infinite sums.

8. Continuous random variables

A random variable is continuous when it can take every real value in an interval, with no gaps between allowed values.

Example. Y = waiting time for a bus, anywhere from 0 to 10 minutes, so Y ∈ [0, 10]. Between 2 and 3 alone, Y could be 2.5, 2.57, 2.5789, … — however far you zoom in, there are more possible values.

Illustration description: Bus waiting time: any real value between 0 and 10 minutes is possible

This set of values is uncountable: unlike {1, 2, 3, …}, it cannot be listed as a sequence. That — not "infinitely many" — is what separates continuous from discrete.

Count vs measure. Counting things (customers, defects, tosses) gives discrete variables. Measuring things (time, length, weight) usually gives continuous ones. The word "usually" matters: an amount of money recorded to the paisa is discrete in strict terms, although it is often modelled as continuous.

Illustration description: Number of customers (counted) is discrete and uses a PMF; time between arrivals (measured) is continuous and uses a PDF

Correction to this image: the right-hand bell-shaped curve is only a sketch. In the standard model, time between random arrivals follows an exponential distribution, whose PDF is highest at 0 and falls steadily — not a hump. You will meet it in Module 4.

9. The key GATE difference: points vs intervals

For a continuous variable, the probability of any single exact value is zero; only intervals carry probability, and that probability is the area under the density curve.

Illustration description: For continuous Y, P(Y = 3) = 0 (a line has no area) but P(3 ≤ Y ≤ 5) > 0 (shaded area)

PropertyDiscreteContinuous
ExampleNumber of headsWaiting time
Possible valuesCountable (finite or infinite)A whole interval (uncountable)
Infinitely many values possible?YesYes
Described byPMF p(x)PDF f(x)
P(exactly one value)Can be positive, e.g. P(X = 3) = 1/8Always 0
Probability of an eventSum of p(x)Area: integral of f(x)
CDF shapeStaircase (jumps)Smooth, no jumps

Three consequences GATE tests:

  • Endpoints don't matter for continuous Y. P(3 ≤ Y ≤ 5) = P(3 < Y < 5) = P(3 ≤ Y < 5). For discrete X they can differ (see Lesson 1, Q3).
  • Zero probability ≠ impossible. Waiting exactly 3.000… minutes can happen; it just carries no probability on its own.
  • A PDF value is not a probability. f(y) is a density and can be greater than 1 (e.g. a uniform PDF on [0, 0.5] equals 2). Only areas are probabilities, so total area must be 1.

We will derive the PDF and these area calculations properly in the next lesson.

10. Lesson 2 practice

  • ☐ Q1. A shop has X = number of customers arriving and Y = time between two arrivals. Which is correct? (A) Both discrete, since customers arrive one at a time (B) X discrete, Y continuous (C) Both continuous, since the number of customers can be arbitrarily large (D) X continuous, Y discrete
  • ☐ Q2. Discrete or continuous? (a) emails received in a day (b) a student's height (c) rolls of a die until the first six (d) proportion of defective items in a batch of 100
  • ☐ Q3. For X = tosses until the first head (fair coin), find P(X > 3) and P(X is even).
  • ☐ Q4. P(X = k) = c(1/3)^k for k = 0, 1, 2, … Find c.
  • ☐ Q5. Y is continuous and P(Y ≤ 4) = 0.6. Find P(Y < 4) and P(Y = 4).
  • ☐ Q6. True or false: a PDF with f(2) = 1.5 cannot be valid.

Answers

  • (B). X is a count with values 0, 1, 2, …; Y is a measured time that can be any non-negative real. (C) is the exact trap of this lesson: unbounded does not mean continuous.
  • (a) discrete (b) continuous (c) discrete — infinitely many values but countable (d) discrete — only 0, 0.01, 0.02, …, 1 are possible, even though it is a fraction.
  • P(X > 3) = 1/8: the first three tosses must all be tails, (1/2)³. P(X even) = 1/3: (1/4) + (1/16) + … = (1/4)/(1 − 1/4).
  • c = 2/3. c · 1/(1 − 1/3) = 1 → c · 3/2 = 1. Note the sum starts at k = 0 here.
  • P(Y < 4) = 0.6, P(Y = 4) = 0. The endpoint carries no probability.
  • False. A density can exceed 1; only the total area must equal 1.

11. Lesson 2 revision sheet

  • Discrete = values can be listed in a sequence (finite or countably infinite). Uses a PMF; probabilities are sums.
  • Continuous = values fill an interval (uncountable). Uses a PDF; probabilities are areas.
  • Test to apply: "Is there a gap between one allowed value and the next?" Yes → discrete. No → continuous.
  • Geometric (first success): P(X = k) = (1 − p)^(k−1) · p, k = 1, 2, …; and P(X > n) = (1 − p)^n.

Common mistakes

  • Calling a variable continuous because it is unbounded or has infinitely many values.
  • Calling a proportion or average continuous when it comes from a finite count.
  • Adding a point probability like P(Y = 3) for continuous Y — it is always 0.
  • Treating f(y) as a probability, or rejecting a PDF because some f(y) > 1.
  • Worrying about ≤ vs < for continuous Y (it doesn't matter) but ignoring it for discrete X (it does).

Next: Lesson 3 — PMF vs PDF in depth: why point probability is zero, computing areas, and the CDF of a continuous variable.

YOUR STUDY PROGRESS

Finished this section? Save your progress.

Back to top ↑