4.9.3Probability Theory & Statistics

Discrete random variables — PMF, CDF

1,806 words8 min readdifficulty · medium6 backlinks

WHAT is a discrete random variable?

WHY do we bother? The raw sample space Ω\Omega (e.g. "the dice landed showing a 3 and a 4") is awkward. We usually care about a number extracted from it (e.g. "the sum is 7"). The RV XX is the translator from messy outcomes to numbers we can do algebra on.

WHAT does "discrete" buy us? Because the values are countable, we can assign probability to individual points and just add them. (For continuous RVs each point has probability 0 — there you integrate instead. That contrast is the whole reason this subtopic exists.)


The PMF — Probability Mass Function

HOW must a valid PMF behave? Derive it from the axioms of probability:

  1. Probabilities are never negative, so pX(x)0p_X(x) \ge 0 for all xx. (Why? Axiom: P(A)0P(A)\ge 0.)
  2. The events {X=xi}\{X = x_i\} are disjoint (X can't equal both 2 and 5 at once) and together cover everything X can do. By countable additivity: ipX(xi)=P ⁣(i{X=xi})=P(Ω)=1.\sum_i p_X(x_i) = P\!\left(\bigcup_i \{X=x_i\}\right) = P(\Omega) = 1.

The CDF — Cumulative Distribution Function

HOW is it built from the PMF? You just sum all the mass at points x\le x. For a discrete RV this makes FXF_X a step function: flat between the values, jumping up by exactly pX(xi)p_X(x_i) at each value xix_i.

Figure — Discrete random variables — PMF, CDF

Interval probabilities — the payoff


Worked examples


Common mistakes (steel-manned)


Recall Feynman: explain it to a 12-year-old

Imagine a row of buckets numbered 1, 2, 3… and you pour 1 liter of water total, splitting it among the buckets however the game says. The PMF is "how much water is in each bucket." The total is always exactly 1 liter (that's the rule). The CDF is "if I walk from bucket 1 onward and keep adding up the water, how much have I collected by the time I reach this bucket?" When you pass a full bucket your total jumps up; between buckets it stays flat. The last bucket always brings you to a full 1 liter.


Active recall

What makes a random variable discrete?
Its set of possible values is countable (finite or countably infinite), so each value can carry its own positive probability mass.
Define the PMF pX(x)p_X(x).
pX(x)=P(X=x)p_X(x) = P(X = x), the probability mass on the exact value xx.
State the two conditions a valid PMF must satisfy.
pX(x)0p_X(x) \ge 0 for all xx, and xpX(x)=1\sum_x p_X(x) = 1.
Define the CDF FX(x)F_X(x) in terms of the PMF.
FX(x)=P(Xx)=xixpX(xi)F_X(x) = P(X \le x) = \sum_{x_i \le x} p_X(x_i).
What shape is a discrete CDF?
A right-continuous step (staircase) function: flat between values, jumping up by pX(xi)p_X(x_i) at each value.
How do you recover the PMF from the CDF?
pX(xi)=FX(xi)FX(xi)p_X(x_i) = F_X(x_i) - F_X(x_i^-) — the size of the jump at xix_i.
Give the formula for P(a<Xb)P(a < X \le b).
FX(b)FX(a)F_X(b) - F_X(a) (excludes aa, includes bb).
What are the limiting values of any CDF?
FX()=0F_X(-\infty)=0 and FX(+)=1F_X(+\infty)=1, and it is non-decreasing.
Why is a CDF non-decreasing?
Increasing xx only adds non-negative probability mass to the cumulative sum; nothing is ever subtracted.
For pX(k)=ckp_X(k)=ck, k=1,2,3k=1,2,3, find cc.
6c=1c=166c=1 \Rightarrow c=\tfrac16, from the normalization pX=1\sum p_X=1.

Connections

  • Probability Axioms — countable additivity is what makes pX=1\sum p_X = 1.
  • Continuous random variables — PDF, CDF — same CDF idea, but mass becomes density (integrate, not sum).
  • Expectation and Variance of Discrete RVs — built directly on the PMF: E[X]=xpX(x)E[X]=\sum x\,p_X(x).
  • Binomial Distribution, Poisson Distribution — named PMFs you'll use constantly.
  • Conditional Probability — conditional PMFs pXYp_{X\mid Y} reuse this machinery.

Concept Map

mapped by X to numbers

has

allows adding point masses

derive properties of

must satisfy

summed over x_i <= x

is a

forces non-decreasing and

hold for

jump size gives

equals

Sample space Omega

Discrete RV X

Countable value set

PMF p_X x

CDF F_X x

Probability axioms

Non-negative and sums to 1

Step function

Limits 0 and 1

Jumps recover PMF

Hinglish (regional understanding)

Intuition Hinglish mein samjho

Dekho, ek discrete random variable ka matlab bas itna hai ki kisi random experiment ke har outcome ko ek number de do. Jaise do dice phenke, toh "sum" ek random variable hai jiski values 2 se 12 tak ho sakti hain. "Discrete" isliye kyunki values countable hain — alag-alag points, beech mein kuch nahi.

Ab PMF (probability mass function) ka kaam hai batana ki har point pe kitni probability "mass" rakhi hai, yaani pX(x)=P(X=x)p_X(x)=P(X=x). Do hi rule hain: koi bhi mass negative nahi ho sakti, aur saari masses jodne par total exactly 11 aana chahiye. Yeh "sum = 1" wala rule normalization karta hai — jab bhi koi constant cc nikaalna ho, isi rule se nikalega.

CDF (cumulative distribution function) FX(x)=P(Xx)F_X(x)=P(X\le x) ek running total hai — number line pe left se right chalo aur jitni mass milti jaaye uska total banao. Discrete case mein yeh ek staircase (seedhiyan) banta hai: do values ke beech flat, aur har value pe utna upar jump karta hai jitni us point ki mass hai. Isiliye smooth curve mat banao!

Sabse important practical baat: range ki probability nikaalni ho toh P(a<Xb)=F(b)F(a)P(a<X\le b)=F(b)-F(a). Yahan endpoints dhyan se — << aur \le ka farq discrete mein real hota hai kyunki har point ki apni positive mass hoti hai. Exam mein yahi galti sabse zyada hoti hai, toh bracket type hamesha check karo.

Go deeper — visual, from zero

Test yourself — Probability Theory & Statistics

Connections