Skip to content

probability mass function

A probability mass function is a function that gives the probability of each individual value of a discrete random variable.

If X is a discrete random variable, then its PMF is:

p(x) = P(X = x)

It tells you:

  • which values X can take
  • the probability of each value

A PMF must satisfy:

  1. p(x) \ge 0 for all x
  2. \sum p(x) = 1

⭐ Example 1: Rolling a Fair Die

Let X = the number rolled.

p(x) = \frac{1}{6}, \quad x = 1,2,3,4,5,6

This PMF says each outcome has equal probability.

⭐ Example 2: Bernoulli Random Variable

Let X = 1 if a coin flip is heads, and X = 0 if tails.
Let p = P(\text{heads}).

p(1) = p, \quad p(0) = 1 - p

This is the simplest PMF — only two possible values.

⭐ Example 3: Number of Heads in 3 Coin Flips

Let X = number of heads in 3 flips.

Possible values: 0, 1, 2, 3.

p(0) = \frac{1}{8},\quad p(1) = \frac{3}{8},\quad p(2) = \frac{3}{8},\quad p(3) = \frac{1}{8}

This is a binomial PMF with n = 3, p = 0.5.

⭐ Example 4: Custom PMF (Non‑Uniform)

Suppose a random variable X takes values 1, 2, 3 with probabilities:

xp(x)
10.2
20.5
30.3

Check:
0.2 + 0.5 + 0.3 = 1

This is a valid PMF.

⭐ PMF vs PDF (Quick Reminder)

FeaturePMFPDF
ForDiscrete variablesContinuous variables
GivesP(X = x)Density, not probability
Can assign probability to a single value?YesNo (always 0)

🎨 Intuition

A PMF is like a menu listing all possible outcomes and the probability of each one.
If you can count the outcomes, you can build a PMF.

Leave a Reply

error: Content is protected !!