Skip to content
Glacius
ProbabilityConcept reference

Probability mass functions

A PMF gives P(X=x) by adding probabilities of all outcomes mapped to x.

On this page 7 sections
  1. Overview
  2. Understand the idea
  3. For equally likely labeled tickets, count how many tickets carry each score
  4. Every outcome contributes its probability exactly once
  5. Key takeaway
  6. Sources & further reading
  7. Concept connections

01Understand the idea#

The probability mass function, or PMF, gives the probability of each numerical value: p(x)=P(X=x)p(x)=P(X=x). Several outcomes may contribute to the same value.

Outcomes A and C both produce X=1 with masses .2 and .5, totaling p(1)=.7. B produces X=4 with mass .3. Stem positions are numerical values and heights are the aggregated probability masses.Outcomes A and C both produce X=1 with masses .2 and .5, totaling p(1)=.7. B produces X=4 with mass .3. Stem positions are numerical values and heights are the aggregated probability masses.
Figure 1Outcomes A and C both produce X=1 with masses .2 and .5, totaling p(1)=.7. B produces X=4 with mass .3. Stem positions are numerical values and heights are the aggregated probability masses.
Link to this figure ↗Download SVGDownload PNG

A and C both give X=1X=1. Their events are disjoint, so add their probabilities: p(1)=0.2+0.5=0.7p(1)=0.2+0.5=0.7. B alone gives X=4X=4, so p(4)=0.3p(4)=0.3.

The PMF lists each distinct numerical value once.

Check your reasoning

A,B,C probabilities 0.1, 0.6, 0.3. Scores 0,3,00,3,0. Give (p(0),p(3))(p(0),p(3)).

  1. A(0.1,0.9)(0.1, 0.9)
  2. B(0.2,0.8)(0.2, 0.8)
  3. C(0.4,0.6)(0.4, 0.6)
Show answer and explanation
(0.4,0.6)(0.4, 0.6)

A+C: 0.1+0.3=0.40.1+0.3=0.4. B: 0.60.6.

02For equally likely labeled tickets, count how many tickets carry each score#

For equally likely labeled tickets, count how many tickets carry each score. Divide by the total number of tickets.

Equal probability for tickets does not make their distinct scores equally likely. Repeated scores collect more probability.

Check your reasoning

Each of 4 labeled tickets is equally likely. Scores: 22, 22, 22, 77. Give (p(2),p(7))(p(2),p(7)).

  1. A(0.75,0.25)(0.75, 0.25)
  2. B(0.5,0.5)(0.5, 0.5)
  3. C(0.25,0.75)(0.25, 0.75)
Show answer and explanation
(0.75,0.25)(0.75, 0.25)

Counts 3,13,1 out of 44.

03Every outcome contributes its probability exactly once#

Every outcome contributes its probability exactly once. A valid PMF has nonnegative masses that sum to one; values outside the possible range have mass zero.

If two outcomes share a value, add their masses. Averaging them would lose probability.

Check your reasoning

A,B,C probabilities 0.4, 0.5, 0.1. Scores 1,4,1-1,4,-1. Draft drops C. Correct (p(1),p(4))(p(-1),p(4)).

  1. A(0.4,0.6)(0.4, 0.6)
  2. B(0.5,0.5)(0.5, 0.5)
  3. C(0.25,0.75)(0.25, 0.75)
Show answer and explanation
(0.5,0.5)(0.5, 0.5)

A+C: 0.50.5; B: 0.50.5.

Key takeaway

Group outcomes with equal values and add their probabilities.

  • Construct a discrete random variable's probability mass function.

Sources & further reading

  1. [1]
    Pishro-Nik, Introduction to Probability: Probability Mass FunctionPishro-Nik: Introduction to Probability · Article

Reference this concept

Link to this page, a section, or an individual figure.

Glacius. “Probability mass functions.” Math behind ML. /learn/p-pmf