Skip to content
GATEiit

GATE DA · Probability and Statistics

Random variables; discrete random variables and probability mass functions

What a random variable is, discrete random variables and their PMF and step CDF, expectation, LOTUS, linearity and variance, and the distribution of a function of a random variable.

Before you start

  • Probability axioms →

    A PMF is a probability assignment, so it must be non-negative and add to 1.

  • Counting →

    PMF values of variables built from dice, cards or arrangements come from counting outcomes.

This topic comes before: Conditional expectation and variance, Continuous random variables and probability distribution functions, Mean, median, mode and standard deviation; correlation and covariance, Uniform, Bernoulli and binomial distributions

Concept notes

1. Random variables

A random variable (RV) X is a function that assigns a real number to each outcome of an experiment: X:S→R. Events about X, such as {X=2} or {X≤3}, are subsets of S.

Example: roll two dice; X = sum, M = maximum, N = number of sixes. All three are RVs on the same 36-outcome sample space.

Type Values Described by
Discrete finite or countable list (0,1,2,…) PMF p(x)=P(X=x)
Continuous an interval; P(X=x)=0 for each x PDF f(x)

Both types have a cumulative distribution function (CDF) F(x)=P(X≤x), which is non-decreasing, right-continuous, and runs from 0 at −∞ to 1 at +∞.

An indicator IA equals 1 if A occurs and 0 otherwise; E[IA]=P(A). Indicators turn counting questions into sums of simple RVs.

2. Probability mass function and CDF

The PMF of a discrete X is p(x)=P(X=x). It must satisfy p(x)≥0and∑xp(x)=1. GATE often gives a PMF with an unknown constant: use ∑p(x)=1 to find it. For p(x)=kx on x=1,2,3,4: k(1+2+3+4)=1 gives k=1/10.

The CDF of a discrete RV is a step function: F(x)=∑t≤xp(t). It jumps at each possible value by exactly p(x) and is flat in between.

Reading probabilities from a CDF:

  • P(X=a)=F(a)−F(a−) (the jump at a).
  • P(a<X≤b)=F(b)−F(a).
  • P(X>a)=1−F(a); P(X≥a)=1−F(a−).

With integer values, P(X≥a)=1−F(a−1). Watch strict versus non-strict inequalities: they matter for discrete RVs.

10.120.230.340.410.120.330.641.0PMF p(x)CDF F(x): right-continuous steps
PMF p(x) = x/10 on {1, 2, 3, 4} and its step CDF: each jump equals the PMF value

3. Expectation, LOTUS and linearity

The expectation (mean) of a discrete RV is the probability-weighted average of its values: E[X]=∑xx p(x). LOTUS (law of the unconscious statistician): for any function g, E[g(X)]=∑xg(x) p(x), so you do not need the PMF of g(X) first.

Linearity: E[aX+b]=aE[X]+b and E[X+Y]=E[X]+E[Y] for any X,Y, independent or not. With indicators this is powerful: the expected number of fixed points of a random permutation of n items is ∑i=1nP(i stays in place)=n⋅1n=1.

But in general E[g(X)]≠g(E[X]). For example E[X2]≥(E[X])2 and E[1/X]≠1/E[X]. For independent X,Y only, E[XY]=E[X]E[Y].

Tail formula for X∈{0,1,2,…}: E[X]=∑k≥1P(X≥k).

4. Variance and functions of a discrete RV

Variance and SD: Var(X)=E[(X−μ)2]=E[X2]−(E[X])2,Var(aX+b)=a2 Var(X). Var(X)=0 exactly when X is a constant (with probability 1).

PMF of Y=g(X): collect all x that map to the same y: pY(y)=∑x:g(x)=ypX(x). Example: X uniform on {−2,−1,0,1,2} and Y=X2 gives pY(0)=1/5, pY(1)=2/5, pY(4)=2/5.

Geometric distribution (a common GATE PMF): the number of independent trials up to and including the first success, with success probability p: P(N=k)=(1−p)k−1p, k=1,2,…;E[N]=1p,Var(N)=1−pp2,P(N>k)=(1−p)k. It is memoryless: P(N>m+k∣N>m)=P(N>k).

Formulas to remember

PMF conditions
p(x)≥0,∑xp(x)=1
CDF of a discrete RV
F(x)=P(X≤x)=∑t≤xp(t)
Expectation
E[X]=∑xx p(x)
LOTUS
E[g(X)]=∑xg(x) p(x)
Variance
Var(X)=E[X2]−(E[X])2
Linear transform
E[aX+b]=aE[X]+b,Var(aX+b)=a2Var(X)
Tail formulaX takes values in {0,1,2,…}
E[X]=∑k=1∞P(X≥k)
Geometric PMF
P(N=k)=(1−p)k−1p,E[N]=1p

Common mistakes

  • Forgetting to check that PMF values are non-negative as well as adding to 1.
  • Assuming E[g(X)]=g(E[X]) for a non-linear g, such as X2 or 1/X.
  • Reading P(X<a) as F(a) for a discrete RV; F(a) includes the mass at a.
  • Thinking linearity of expectation needs independence; it does not (but E[XY]=E[X]E[Y] does).
  • Building the PMF of g(X) without merging the x values that give the same g(x).

Worked examples

Try each step yourself, then reveal the working.

Example 1: Find the constant, the mean and the variance

numerical

P(X=x)=kx for x=1,2,3,4. Find k, E[X] and Var(X).

  1. Step 1: Use the fact that the PMF adds to 1.

    Try it on paper first.

Example 2: PMF of the maximum of two dice

numerical

Two fair dice are rolled and M is the larger value. Find the PMF of M and E[M].

  1. Step 1: Use the CDF first: when is $M \le m$?

    Try it on paper first.

Example 3: PMF of a function of $X$

numerical

X is uniform on {−2,−1,0,1,2} and Y=X2. Find the PMF of Y and check E[Y] by LOTUS.

  1. Step 1: Group the $x$ values by their image.

    Try it on paper first.

Example 4: Is $E[1/X]$ equal to $1/E[X]$?

conceptual

X takes the values 1 and 3 with probability 1/2 each. Compare E[1/X] with 1/E[X].

  1. Step 1: Compute $1/E[X]$.

    Try it on paper first.

Previous year questions

2 official GATE DA questions on this topic, newest first.

Practise these 2 PYQs →

Topic test

10 questions: up to 2 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.