Explore Courses
Liverpool Business SchoolLiverpool Business SchoolMBA by Liverpool Business School
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA (Master of Business Administration)
  • 15 Months
Popular
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Business Administration (MBA)
  • 12 Months
New
Birla Institute of Management Technology Birla Institute of Management Technology Post Graduate Diploma in Management (BIMTECH)
  • 24 Months
Liverpool John Moores UniversityLiverpool John Moores UniversityMS in Data Science
  • 18 Months
Popular
IIIT BangaloreIIIT BangalorePost Graduate Programme in Data Science & AI (Executive)
  • 12 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
upGradupGradData Science Bootcamp with AI
  • 6 Months
New
University of MarylandIIIT BangalorePost Graduate Certificate in Data Science & AI (Executive)
  • 8-8.5 Months
upGradupGradData Science Bootcamp with AI
  • 6 months
Popular
upGrad KnowledgeHutupGrad KnowledgeHutData Engineer Bootcamp
  • Self-Paced
upGradupGradCertificate Course in Business Analytics & Consulting in association with PwC India
  • 06 Months
OP Jindal Global UniversityOP Jindal Global UniversityMaster of Design in User Experience Design
  • 12 Months
Popular
WoolfWoolfMaster of Science in Computer Science
  • 18 Months
New
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Rushford, GenevaRushford Business SchoolDBA Doctorate in Technology (Computer Science)
  • 36 Months
IIIT BangaloreIIIT BangaloreCloud Computing and DevOps Program (Executive)
  • 8 Months
New
upGrad KnowledgeHutupGrad KnowledgeHutAWS Solutions Architect Certification
  • 32 Hours
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Popular
upGradupGradUI/UX Bootcamp
  • 3 Months
upGradupGradCloud Computing Bootcamp
  • 7.5 Months
Golden Gate University Golden Gate University Doctor of Business Administration in Digital Leadership
  • 36 Months
New
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Golden Gate University Golden Gate University Doctor of Business Administration (DBA)
  • 36 Months
Bestseller
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDoctorate of Business Administration (DBA)
  • 36 Months
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (DBA)
  • 36 Months
KnowledgeHut upGradKnowledgeHut upGradSAFe® 6.0 Certified ScrumMaster (SSM) Training
  • Self-Paced
KnowledgeHut upGradKnowledgeHut upGradPMP® certification
  • Self-Paced
IIM KozhikodeIIM KozhikodeProfessional Certification in HR Management and Analytics
  • 6 Months
Bestseller
Duke CEDuke CEPost Graduate Certificate in Product Management
  • 4-8 Months
Bestseller
upGrad KnowledgeHutupGrad KnowledgeHutLeading SAFe® 6.0 Certification
  • 16 Hours
Popular
upGrad KnowledgeHutupGrad KnowledgeHutCertified ScrumMaster®(CSM) Training
  • 16 Hours
Bestseller
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 4 Months
upGrad KnowledgeHutupGrad KnowledgeHutSAFe® 6.0 POPM Certification
  • 16 Hours
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Science in Artificial Intelligence and Data Science
  • 12 Months
Bestseller
Liverpool John Moores University Liverpool John Moores University MS in Machine Learning & AI
  • 18 Months
Popular
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
IIIT BangaloreIIIT BangaloreExecutive Post Graduate Programme in Machine Learning & AI
  • 13 Months
Bestseller
IIITBIIITBExecutive Program in Generative AI for Leaders
  • 4 Months
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
IIIT BangaloreIIIT BangalorePost Graduate Certificate in Machine Learning & Deep Learning (Executive)
  • 8 Months
Bestseller
Jindal Global UniversityJindal Global UniversityMaster of Design in User Experience
  • 12 Months
New
Liverpool Business SchoolLiverpool Business SchoolMBA with Marketing Concentration
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA with Marketing Concentration
  • 15 Months
Popular
MICAMICAAdvanced Certificate in Digital Marketing and Communication
  • 6 Months
Bestseller
MICAMICAAdvanced Certificate in Brand Communication Management
  • 5 Months
Popular
upGradupGradDigital Marketing Accelerator Program
  • 05 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Corporate & Financial Law
  • 12 Months
Bestseller
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in AI and Emerging Technologies (Blended Learning Program)
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Intellectual Property & Technology Law
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Dispute Resolution
  • 12 Months
upGradupGradContract Law Certificate Program
  • Self paced
New
ESGCI, ParisESGCI, ParisDoctorate of Business Administration (DBA) from ESGCI, Paris
  • 36 Months
Golden Gate University Golden Gate University Doctor of Business Administration From Golden Gate University, San Francisco
  • 36 Months
Rushford Business SchoolRushford Business SchoolDoctor of Business Administration from Rushford Business School, Switzerland)
  • 36 Months
Edgewood CollegeEdgewood CollegeDoctorate of Business Administration from Edgewood College
  • 24 Months
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with Concentration in Generative AI
  • 36 Months
Golden Gate University Golden Gate University DBA in Digital Leadership from Golden Gate University, San Francisco
  • 36 Months
Liverpool Business SchoolLiverpool Business SchoolMBA by Liverpool Business School
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA (Master of Business Administration)
  • 15 Months
Popular
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Business Administration (MBA)
  • 12 Months
New
Deakin Business School and Institute of Management Technology, GhaziabadDeakin Business School and IMT, GhaziabadMBA (Master of Business Administration)
  • 12 Months
Liverpool John Moores UniversityLiverpool John Moores UniversityMS in Data Science
  • 18 Months
Bestseller
O.P.Jindal Global UniversityO.P.Jindal Global UniversityMaster of Science in Artificial Intelligence and Data Science
  • 12 Months
Bestseller
IIIT BangaloreIIIT BangalorePost Graduate Programme in Data Science (Executive)
  • 12 Months
Bestseller
O.P.Jindal Global UniversityO.P.Jindal Global UniversityO.P.Jindal Global University
  • 12 Months
WoolfWoolfMaster of Science in Computer Science
  • 18 Months
New
Liverpool John Moores University Liverpool John Moores University MS in Machine Learning & AI
  • 18 Months
Popular
Golden Gate UniversityGolden Gate UniversityDBA in Emerging Technologies with concentration in Generative AI
  • 3 Years
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (AI/ML)
  • 36 Months
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDBA Specialisation in AI & ML
  • 36 Months
Golden Gate University Golden Gate University Doctor of Business Administration (DBA)
  • 36 Months
Bestseller
Ecole Supérieure de Gestion et Commerce International ParisEcole Supérieure de Gestion et Commerce International ParisDoctorate of Business Administration (DBA)
  • 36 Months
Rushford, GenevaRushford Business SchoolDoctorate of Business Administration (DBA)
  • 36 Months
Liverpool Business SchoolLiverpool Business SchoolMBA with Marketing Concentration
  • 18 Months
Bestseller
Golden Gate UniversityGolden Gate UniversityMBA with Marketing Concentration
  • 15 Months
Popular
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Corporate & Financial Law
  • 12 Months
Bestseller
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Intellectual Property & Technology Law
  • 12 Months
Jindal Global Law SchoolJindal Global Law SchoolLL.M. in Dispute Resolution
  • 12 Months
IIITBIIITBExecutive Program in Generative AI for Leaders
  • 4 Months
New
IIIT BangaloreIIIT BangaloreExecutive Post Graduate Programme in Machine Learning & AI
  • 13 Months
Bestseller
upGradupGradData Science Bootcamp with AI
  • 6 Months
New
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
KnowledgeHut upGradKnowledgeHut upGradSAFe® 6.0 Certified ScrumMaster (SSM) Training
  • Self-Paced
upGrad KnowledgeHutupGrad KnowledgeHutCertified ScrumMaster®(CSM) Training
  • 16 Hours
upGrad KnowledgeHutupGrad KnowledgeHutLeading SAFe® 6.0 Certification
  • 16 Hours
KnowledgeHut upGradKnowledgeHut upGradPMP® certification
  • Self-Paced
upGrad KnowledgeHutupGrad KnowledgeHutAWS Solutions Architect Certification
  • 32 Hours
upGrad KnowledgeHutupGrad KnowledgeHutAzure Administrator Certification (AZ-104)
  • 24 Hours
KnowledgeHut upGradKnowledgeHut upGradAWS Cloud Practioner Essentials Certification
  • 1 Week
KnowledgeHut upGradKnowledgeHut upGradAzure Data Engineering Training (DP-203)
  • 1 Week
MICAMICAAdvanced Certificate in Digital Marketing and Communication
  • 6 Months
Bestseller
MICAMICAAdvanced Certificate in Brand Communication Management
  • 5 Months
Popular
IIM KozhikodeIIM KozhikodeProfessional Certification in HR Management and Analytics
  • 6 Months
Bestseller
Duke CEDuke CEPost Graduate Certificate in Product Management
  • 4-8 Months
Bestseller
Loyola Institute of Business Administration (LIBA)Loyola Institute of Business Administration (LIBA)Executive PG Programme in Human Resource Management
  • 11 Months
Popular
Goa Institute of ManagementGoa Institute of ManagementExecutive PG Program in Healthcare Management
  • 11 Months
IMT GhaziabadIMT GhaziabadAdvanced General Management Program
  • 11 Months
Golden Gate UniversityGolden Gate UniversityProfessional Certificate in Global Business Management
  • 6-8 Months
upGradupGradContract Law Certificate Program
  • Self paced
New
IU, GermanyIU, GermanyMaster of Business Administration (90 ECTS)
  • 18 Months
Bestseller
IU, GermanyIU, GermanyMaster in International Management (120 ECTS)
  • 24 Months
Popular
IU, GermanyIU, GermanyB.Sc. Computer Science (180 ECTS)
  • 36 Months
Clark UniversityClark UniversityMaster of Business Administration
  • 23 Months
New
Golden Gate UniversityGolden Gate UniversityMaster of Business Administration
  • 20 Months
Clark University, USClark University, USMS in Project Management
  • 20 Months
New
Edgewood CollegeEdgewood CollegeMaster of Business Administration
  • 23 Months
The American Business SchoolThe American Business SchoolMBA with specialization
  • 23 Months
New
Aivancity ParisAivancity ParisMSc Artificial Intelligence Engineering
  • 24 Months
Aivancity ParisAivancity ParisMSc Data Engineering
  • 24 Months
The American Business SchoolThe American Business SchoolMBA with specialization
  • 23 Months
New
Aivancity ParisAivancity ParisMSc Artificial Intelligence Engineering
  • 24 Months
Aivancity ParisAivancity ParisMSc Data Engineering
  • 24 Months
upGradupGradData Science Bootcamp with AI
  • 6 Months
Popular
upGrad KnowledgeHutupGrad KnowledgeHutData Engineer Bootcamp
  • Self-Paced
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Bestseller
upGradupGradUI/UX Bootcamp
  • 3 Months
upGradupGradCloud Computing Bootcamp
  • 7.5 Months
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 5 Months
upGrad KnowledgeHutupGrad KnowledgeHutSAFe® 6.0 POPM Certification
  • 16 Hours
upGradupGradDigital Marketing Accelerator Program
  • 05 Months
upGradupGradAdvanced Certificate Program in GenerativeAI
  • 4 Months
New
upGradupGradData Science Bootcamp with AI
  • 6 Months
Popular
upGradupGradFull Stack Software Development Bootcamp
  • 6 Months
Bestseller
upGradupGradUI/UX Bootcamp
  • 3 Months
PwCupGrad CampusCertification Program in Financial Modelling & Analysis in association with PwC India
  • 4 Months
upGradupGradCertificate Course in Business Analytics & Consulting in association with PwC India
  • 06 Months
upGradupGradDigital Marketing Accelerator Program
  • 05 Months

How to Calculate and Interpret the Probability Mass Function (PMF)

By Rohit Sharma

Updated on Feb 05, 2025 | 16 min read

Share:

Did you know that the global demand for data scientist roles has grown by over 30% year-over-year​, making now the ideal time to start your career in this field? Behind these sophisticated algorithms driving industries lies a fundamental concept: the probability mass function (PMF).

But why is PMF so essential? Let’s say you’re rolling a dice, predicting stock market trends, or analyzing customer churn rates. How would you calculate the likelihood of each outcome?

That’s where the probability mass function becomes your go-to tool. PMF in probability helps you understand and navigate uncertainties in everything from business decisions to machine learning models.

This blog is your comprehensive guide to understanding the probability mass function, its role in probability theory, and its real-world applications. If you're ready to sharpen your skills in PMF in probability, keep reading!

What is a Probability Mass Function? An Overview

At its core, a PMF is a function that provides the probability of each possible outcome for a discrete random variable. But how is it different from other probability tools, and why is it so crucial?

Here’s what sets the probability mass function apart and defines its role in probability distributions:

  • Discreteness: Unlike continuous probabilities (e.g., heights, weights), PMF in probability deals with specific, countable outcomes like 1, 2, or 3.
  • Exact Probabilities: Each outcome is assigned a precise probability, ensuring total probabilities always sum to 1.
  • Visualization: PMFs are often visualized as bar graphs, making it easier to interpret data patterns at a glance.

Wish to explore probability and machine learning and be a part of this Gen AI? Start with upGrad’s machine learning courses from the best universities and upskills for your future ahead! 

Now, before diving deeper into the probability mass function (PMF), let’s understand its foundation: discrete random variables!

Understanding Discrete Random Variables

A discrete random variable is a type of random variable that assigns specific, countable values to outcomes in a probability experiment. Each value is tied to a probability; collectively, these probabilities form a distribution.

Some of the everyday examples of it may include:

  • Coin Toss: Number of heads in 3 tosses (e.g., 0, 1, 2, or 3).
  • Dice Rolls: Possible outcomes when rolling a 6-sided die (e.g., 1 through 6).
  • Customer Arrivals: Number of customers visiting a store in an hour.
  • Defective Items: Number of defective pieces in a production batch.

But how does it relate to PMF in probability? Read ahead!

The Relationship Between PMF and Discrete Random Variables

Discrete random variables and their associated PMFs are indispensable for making sense of structured, finite outcomes. Here’s how PMF ties closely to discrete random variables:

  • Defining Probabilities: The PMF assigns probabilities to each outcome of a discrete random variable.  For example:

If you roll a fair die, the PMF would assign

P ( X = 1 ) = 1 6 , P ( X = 2 ) = 1 6

and so on.

  • Visualizing Distributions: Discrete random variables, represented by PMFs, allow you to visualize how likely each outcome is.

For instance, a bar chart of the PMF for a die roll would show equal heights for each face of the die.

  • Total Probability: The PMF ensures that all probabilities for the variable's possible outcomes sum to 1, maintaining consistency within probability theory.

Also Read: Types of Probability Distribution [Explained with Examples]

With discrete random variables as your starting point, let’s get into its fundamental properties!

Key Properties of a Probability Mass Function

The probability mass function (PMF) adheres to strict mathematical principles, ensuring accuracy and reliability. These properties not only define how PMF in probability works but also make them indispensable in modeling discrete random variables. 

Let’s explore the core properties that govern a PMF.

1. Non-Negativity: All Probabilities Must Be ≥ 0

Probabilities represent the likelihood of an event occurring. It’s impossible to have a negative likelihood — an event either happens or it doesn’t. For any discrete random variable X and outcome x:

P ( X = x ) 0

For example, the chance of rolling a "7" on a standard die is 0 — not negative!

2. Normalization Condition: Total Probabilities Sum to 1

A PMF must account for all possible outcomes of a discrete random variable. The sum of probabilities for all these outcomes must always equal 1:

P ( X = x ) = 1

For instance, the probabilities of rolling a die — P( 1 ) through P( 6 ) — combine to 1, affirming that one of the outcomes will definitely occur.

3. Support of PMF: Defining Relevant Outcomes

The support of a PMF is the set of all possible values a discrete random variable can take where

P ( X = x ) > 0

For example, the support for the sum of two dice rolls is {2, 3, 4, …, 12}. Any value outside this range has

P ( X = x ) = 0

By adhering to these properties, PMFs empower you to navigate uncertainty with clarity and precision.

Also Read: Conditional Probability Explained with Real-Life Applications

Now that you’ve seen the core properties, let's look at some of the standard PMF distributions used and related concepts!

Common Probability Distributions and Their PMFs

The probability mass function (PMF) varies depending on the type of discrete random variable and the distribution it follows. Let’s explore some widely-used discrete probability distributions and their PMFs.

1. Binomial Distribution: Probability of Successes in Trials

The binomial distribution models the number of successes in n independent trials, where each trial has the same probability of success (p).

  • PMF Formula
\[P(X = x) = (n_C)p^x(1 - p)^{n - x}\]

where x is the number of successes, n is the number of trials, and p is the probability of success.

  • Example: Flipping a coin 3 times, where p = 0.5, the PMF gives the probabilities of getting 0, 1, 2, or 3 heads.

2. Poisson Distribution: Events in a Fixed Interval

The Poisson distribution is used when counting the number of events occurring in a fixed interval of time or space, assuming the events occur independently.

  • PMF Formula
\[P(X = x) = (n_C)p^x(1 - p)^{n - x}\]

where λ is the average rate of occurrence, and x is the actual number of events.

  • Example: If a call center receives an average of 5 calls per hour, the Poisson PMF gives the probabilities of obtaining 0, 1, 2, etc., calls in an hour.

Also Read: Poisson Distribution & Poisson Process Explained [With Examples]

3. Geometric Distribution: Trials Until First Success

The geometric distribution models the number of trials needed to achieve the first success in a series of independent Bernoulli trials.

  • PMF Formula
\[P(X = x) = (1 p)^{x - 1} \cdot p\]

Where x is the trial number on which the first success occurs, and p is the probability of success.

  • Example: Tossing a coin until the first heads appear, with p = 0.5.

Related Concepts to PMF in Probability

While the PMF in probability is central to understanding discrete random variables, it’s also closely tied to other probability concepts like CDF and Joint/Marginal PMFs. 

Let’s explore these related ideas and their relevance.

1. Cumulative Distribution Function (CDF)

The Cumulative Distribution Function (CDF) represents the probability that a random variable X takes on a value less than or equal to x.

  • Relationship with PMF: The CDF accumulates probabilities from the PMF. Mathematically: 
\[F(x) = P(X \leq x) = \sum_{k \leq x}P(X = k)\]
  • Example: For a die roll:

                     a) PMF: P(X=1)=1/6,P(X=2)=1/6,....

                     b) CDF: F(1)=1/6,F(2)=1/6+1/6=2/6,….

2. Joint and Marginal PMFs

A joint PMF extends the concept to multiple random variables, giving the probability of specific outcomes for two or more variables.

For example, in the case of rolling two dice, the joint PMF will be:

P(X=1,Y=1)=1/36, P(X=2,Y=3)=1/36, etc.

On the other hand, the marginal PMF provides the probabilities of individual variables by summing over the joint PMF of others.

For instance, if X and Y are the outcomes of two dice, then Marginal PMF will be:

X=1: P(X=1)=∑yP(X=1,Y=y)

 

Differences Between PMF and PDF

While the PMF is specifically for discrete random variables, the Probability Density Function (PDF) deals with continuous random variables. Though they sound similar, the two concepts differ significantly in their applications and interpretations.

Let’s break down the key differences:

Aspect PMF (Probability Mass Function) PDF (Probability Density Function)
Definition Probability of exact outcomes for discrete variables. Probability density over ranges for continuous variables.
Applicable Variables Discrete random variables (e.g., dice rolls, coin tosses). Continuous random variables (e.g., heights, weights).
Value Representation Direct probabilities for outcomes. Density values; probabilities over intervals.
Visualization Bar plots. Continuous curves.
Total Probability Sum of all probabilities equals 1. Integral of the PDF over all possible values equals 1.

Also Read: Top 10 Data Visualization Types: How To Choose The Right One?

Mastering both helps you handle discrete and continuous data with confidence! Now, let's learn how you compute PMFs, along with some practice questions!

How to Calculate a Probability Mass Function?

Calculating a probability mass function (PMF) might sound complex, but it’s simply about breaking down probabilities for specific outcomes of a discrete random variable. PMF calculation follows a structured process.

Let’s walk you through a step-by-step guide to make it clear and practical.

Step 1: Identify the Random Variable (X)

Begin by defining the random variable and its possible outcomes.

  • Define the Variable: Clearly specify what the random variable represents (e.g., the number of heads in coin tosses).
  • List Possible Values: Enumerate all possible outcomes of the variable, ensuring they are finite and discrete.

For example, Rolling a six-sided die, the outcomes are X={1,2,3,4,5,6}

Step 2: Determine the Probability for Each Value

Calculate the probability for each outcome of the random variable using appropriate formulas or data.

  • Use a Formula: Choose the right formula based on the distribution governing the random variable (e.g., binomial, Poisson).
  • Assign Probabilities: Compute probabilities for each value of XXX.

For example, for a fair die, P(X=x)=1/6 for each x in {1,2,3,4,5,6}.

Step 3: Verify the Conditions

Ensure the calculated PMF satisfies these fundamental conditions:

  • The sum of Probabilities = 1: The total probability of all outcomes must equal 1.

For example, for a die roll,

\[\sum_{x = 1}^6 = P(X = x) = 1/ 6 + 1/ 6 + \ldotp \ldotp \ldotp + 1/ 6 = 1\]
  • Probabilities are Non-Negative: Each probability must be ≥0 and ≤1.

Examples with Step-by-Step Solutions

Let's work through a few practical examples to better understand these calculation steps of PMF in probability. Each example follows the step-by-step process to compute the probabilities for discrete random variables.

Example 1: Tossing a Fair Die

Random Variable: X = outcome of a die roll.
Possible Values: X = {1,2,3,4,5,6}.

1. Identify the Random Variable:
X represents the result of rolling a fair six-sided die.

2. Determine the Probability for Each Value:
Since the die is fair, each outcome has an equal probability, i.e. 

P(X=x)=1/6​, for x=1,2,3,4,5,6.

3. Verify the Conditions:

  • Non-Negativity: 

    \[P(X = x) = 1/ 6 \geq 0\]
  • Total Probability: 

    \[\sum_{x = 1}^6 = P(X = x) = 6 \times 1/ 6 = 1\]

Result: PMF assigns P(X=x)=1/6 ​​ for each outcome from 1 to 6.

Example 2: Drawing a Card from a Deck

Random Variable: X = number of red cards drawn.
Possible Values: X = {0,1,2} (drawing two cards).

1. Identify the Random Variable:
X represents the number of red cards drawn from a standard 52-card deck with 26 red cards.

2. Determine the Probability for Each Value:
Use the hypergeometric distribution to calculate probabilities:

\[P(X = x) = \frac{(26_x) \cdot (26_2-x)}{52_x}\]
  • \[P(X = 0) = \frac{(26_0) \cdot (26_2)}{52_2} = 0.245\]
  • \[P(X = 1) = \frac{(26_1) \cdot (26_1)}{52_2} = 0.511\]
  • \[P(X = 2) = \frac{(26_2) \cdot (26_0)}{52_2} = 0.245\]

3. Verify the Conditions:

  • Non-Negativity: Probabilities are ≥0
  • Total Probability: 0.245+0.511+0.245=1

Result: PMF: P(X=0)=0.245, P(X=1)=0.511, P(X=2)=0.245.

Example 3: Coin Tossing

Random Variable: X = number of heads in two tosses.
Possible Values: X = {0,1,2}.

1. Identify the Random Variable:
X represents the number of heads when tossing a fair coin twice.

2. Determine the Probability for Each Value:
Use the binomial distribution:

\[P(X = x) = (2_C) \cdot (0.5)^x \cdot (0.5)^{2 - x}\]
  • \[P(X = 0) = (2_C) \cdot (0.5)^0 \cdot (0.5)^2 = 0.25\]
  • \[P(X = 1) = (2_C) \cdot (0.5)^1 \cdot (0.5)^1 = 0.5\]
  • \[P(X = 2) = (2_C) \cdot (0.5)^2 \cdot (0.5)^0 = 0.25\]

3. Verify the Conditions:

  • Non-Negativity: Probabilities are ≥0
  • Total Probability: 0.25+0.5+0.25=1

Result: PMF: P(X=0)=0.25, P(X=1)=0.5, P(X=2)=0.25.

Example 4: Number of Goals in a Football Match

Random Variable: X =  number of goals scored by a team.
Possible Values: X = {0,1,2,3}.

1. Identify the Random Variable:
X represents the number of goals scored by a team in a match, following a Poisson distribution with λ=1.5 (average goals per match).

2. Determine the Probability for Each Value:
Use the Poisson distribution formula:

\[P(X = x) = \frac{\lambda^x \cdot e^{ \lambda}}{x\oc }\]
  • \[P(X = 0) = \frac{(1.5)^0 \cdot e^{- (1.5)}}{0\oc } = 0.223\]
  • \[P(X = 1) = \frac{(1.5)^1 \cdot e^{- (1.5)}}{1\oc } = 0.335\]
  • \[P(X = 2) = \frac{(1.5)^2 \cdot e^{- (1.5)}}{2\oc } = 0.251\]
  • \[P(X = 3) = \frac{(1.5)^3 \cdot e^{- (1.5)}}{3\oc } = 0.125\]

3. Verify the Conditions:

  • Non-Negativity: Probabilities are ≥0
  • Total Probability: 0.223+0.335+0.251+0.125=0.934 (within rounding tolerance).

Result: PMF: 

\[P(X = 0) = 0.223,P(X = 1) = 0.335,P(X = 2) = 0.251,P(X = 3) = 0.125\]

There you go! These examples demonstrate how PMFs are calculated step by step for different scenarios, reinforcing their utility across various contexts.

Practice Questions On How to Calculate a Probability Mass Function

To solidify your understanding of PMFs, try solving these practice problems. Each question focuses on applying the concepts of discrete random variables and probability mass functions.

Question 1. Calculate the PMF for a Single Toss of a Fair Coin

A fair coin is tossed once.

  • Random Variable: X = outcome of a coin toss ({Heads, Tails}).
  • PMF calculation:

    \[P(X = Heads) = 0.5,P(X = Tails) = 0.5\]

Verify:

\[P(X = Heads) + P(X = Tails) = 0.5 + 0.5 = 1\]

Question 2. A bag contains 3 red balls and 2 blue balls. Calculate the PMF for drawing a red ball in a single random draw.

  • Random Variable: X = color of the drawn ball ({Red, Blue}).
  • PMF calculation:
\[P(X = Red) = 3/ 5,P(X = Blue) = 2/ 5\]

Verify:

\[P(X = Red) + P(X = Blue) = 3/ 5 + 2/ 5 = 1\]

Question 3. If X is the number of heads in 3 tosses of a fair coin, compute the PMF for X=0,1,2,3.

  • Random Variable: X = number of heads.
  • Binomial Distribution Formula:
\[P(X = x) = 3_C \cdot (0.5)^x \cdot (0.5)^{3 - x}\]
  • \[P(X = 0) = 3_C \cdot (0.5)^0 \cdot (0.5)^3 = 0.125\]
  • \[P(X = 1) = 3_C \cdot (0.5)^1 \cdot (0.5)^2 = 0.375\]
  • \[P(X = 2) = 3_C \cdot (0.5)^2 \cdot (0.5)^1 = 0.375\]
  • \[P(X = 3) = 3_C \cdot (0.5)^3 \cdot (0.5)^0 = 0.125\]

Verify: 0.125+0.375+0.375+0.125=1.

Question 4. A six-sided die is rolled twice. Compute the PMF for the number of times a 6 is rolled (0,1 or 2).

  • Random Variable: X = number of times a 6 is rolled.
  • Binomial Distribution Formula:
\[P(X = 0) = 2_C \cdot (\frac{1}{6})^0 \cdot (\frac{5}{6})^2 = 0.694\]
  • \[P(X = x) = 2_C \cdot (\frac{1}{6})^1 \cdot (\frac{5}{6})^2 = 0.278\]
  • \[P(X = 1) = 2_C \cdot (\frac{1}{6})^2 \cdot (\frac{5}{6})^2 = 0.028\]

Verify: 0.694+0.278+0.028=1.

Question 5. A team can score 0, 1, 2, or 3 goals in a match. The probabilities of scoring each number of goals are as follows:

  • P(X=0)=0.2
  • P(X=1)=0.4
  • P(X=2)=0.3
  • P(X=3)=0.1

Check if the sum of probabilities equals 1.

Say Random Variable X = number of goals scored, and PMFs are given. So, to verify the sum, add the probabilities given:

P(X=0)+P(X=1)+P(X=2)+P(X=3)=0.2+0.4+0.3+0.1=1

These practice problems will help reinforce your understanding of PMF calculations. Make sure to verify your results to ensure consistency and accuracy!

Also Read: Most Common Probability Aptitude Questions & Answers [For Freshers]

Now, how do you visualize these outcomes? Proceed ahead to know!

How to Visualize a Probability Mass Function (PMF)?

Visualizing a probability mass function (PMF) is one of the best ways to understand how probabilities are distributed. A graphical representation simplifies interpretation and highlights patterns and trends in probabilities.

A bar plot is the most common way to visualize a PMF. Here’s how it works:

  1. X-Axis: Represents the possible outcomes of the discrete random variable.
  2. Y-Axis: Represents the probability assigned to each outcome.
  3. Bar Height: Indicates the probability of a specific outcome; taller bars represent higher probabilities.

To understand better, consider the case of rolling a fair six-sided die. The possible outcomes X={1,2,3,4,5,6} are equally likely, with each having a probability of P(X=x)=⅙.

So the step-by-step visualizing in this case can be done by:

  1. First, plot the outcomes X={1,2,3,4,5,6} on the X-axis.
  2. Assign the probability P(X=x)=⅙ to each outcome on the Y-axis.
  3. Draw a bar for each outcome, all with the same height since the probabilities are equal.

The resulting bar plot will show six equally tall bars, illustrating the uniform distribution of probabilities across the outcomes.

Also Read: Tableau Data Visualization: Effective Visualization with Tableau

Thus, by turning probabilities into visuals, you can communicate complex data simply and effectively — a skill invaluable for anyone in data analytics, data science, or business.

Curious about a career in data science and analytics? Dive into upGrad’s expertly designed data science courses and gain the skills to become a highly sought-after data professional!

Now, let’s get into its practical use cases! 

Real-World Applications of Probability Mass Function

The probability mass function (PMF) isn’t just a theoretical concept — it’s a powerful tool with widespread applications in solving real-world problems. It helps simplify complex scenarios involving discrete random variables, enabling better industry decision-making.

Let’s explore how PMFs find their way into diverse applications and impact your day-to-day lives. 

1. Statistical Modeling in Predictive Analysis

PMFs play a crucial role in building predictive analysis models via statistical modeling that rely on probabilities to forecast outcomes:

  • Data Science: PMFs are the foundation of machine learning algorithms like Naïve Bayes, which predict categorical outcomes based on probabilities.
  • Customer Insights: Businesses use PMFs to model purchase behaviors, segment customers, or predict churn rates based on discrete events.
  • Epidemiology: In public health, PMFs model the spread of diseases by estimating the probability of events like infections or recoveries.

2. Real-world scenarios in Key Industries

PMFs are widely applied in industries like manufacturing, finance, and insurance to streamline operations and mitigate risks:

  • Quality Control: Manufacturers use PMFs to monitor defects in production batches, ensuring the quality of their products while minimizing waste.
  • Finance: In portfolio management, PMFs estimate the likelihood of discrete events, such as defaults or market downturns, for better risk assessment.
  • Insurance: Actuaries leverage PMFs to model claim frequencies, enabling precise premium calculations and efficient policy design.

3. Games of Chance: Calculating Odds

PMFs are indispensable in probability-based games, offering insights into odds and strategies:

  • Dice Games: Calculate the likelihood of rolling specific combinations, such as a total of 7 in a two-dice roll.
  • Lotteries: PMFs help determine the probability of winning prizes by analyzing the number of possible outcomes.
  • Board Games: Probabilities guide players in optimizing strategies, like the chance of landing on a specific square in Monopoly.

Also Read: 5 Breakthrough Applications of Machine Learning

Now, to help you master the probability mass function, let's explore quick strategies!

Top 3 Tips for Mastering Probability Mass Functions

From predicting business outcomes to designing algorithms, PMF in probability offers clarity in uncertainty. But how do you truly master this concept and apply it effectively?

The key lies in combining visualization, practical application, and a deep understanding of essential formulas. Here are three actionable tips to help you achieve fluency in it:

1. Visualize Data: Bring PMFs to Life with Bar Charts

Humans are visual creatures, and when it comes to understanding PMFs, a clear visual graph can make all the difference.

For example, plotting the PMF of dice rolls immediately shows the uniformity of outcomes in a fair die. It’s a quick and intuitive way to grasp complex distributions.

How to Apply It:

Use tools like ExcelPython ( like Matplotlib), or R language to create bar plots of PMFs for discrete random variables, such as dice rolls or customer purchases.

Also Read: Bar Chart vs. Histogram: Which is Right for Your Data?

2. Practice with Real-World Data: Learn by Doing

Understanding PMFs in theory is one thing, but applying them to real-world data transforms abstract concepts into practical skills.

How to Apply It:

  • Begin with simple datasets, and slowly, you can move to more complex cases.
  • Explore publicly available datasets (e.g., Kaggle, UCI Machine Learning Repository) to practice calculating and interpreting PMFs.

Ask yourself: “How does this data behave? What insights can the PMF reveal about future outcomes?”

3. Master Key Formulas: Build a Strong Foundation

Mathematical formulas underpin every PMF, and understanding the most common ones, like the binomial and Poisson distributions, is crucial. They’re also foundational for advanced topics like Bayesian inference and machine learning.

How to Apply It:

  • Binomial PMF: Use it to calculate the probability of a certain number of successes in repeated trials. For example, what’s the chance of flipping precisely 3 heads in 5 coin tosses?
  • Poisson PMF: Apply it to situations involving event counts over a fixed interval. For instance, what’s the probability of receiving four calls in an hour if the average rate is 2?

Practice solving problems with these formulas by hand and then verify them using statistical software. You can explore upGrad’s complete guide to problem-solving skills, helping you approach problems in a structured and nuanced manner!

Also Read: Bayes Theorem in Machine Learning: Understanding the Foundation of Probabilistic Models

By adopting these practices, you’ll enhance your grasp of PMFs and position yourself as a skilled professional in today’s data-driven world.

How upGrad Can Help You Master Probability Concepts?

Mastering concepts like the probability mass function (PMF) isn’t just about acing exams — it’s about acquiring the skills to solve real-world problems. upGrad bridges the gap between theory and application.

Whether you’re exploring the fundamentals of probability or diving into advanced machine learning techniques, upGrad provides personalized programs and resources to help you upskill with confidence.

Some of the top relevant courses include:

Don’t just learn — apply, grow, and lead. Book your free counseling session with upGrad today to discuss your career goals and find the perfect program!

Unlock the power of data with our popular Data Science courses, designed to make you proficient in analytics, machine learning, and big data!

Elevate your career by learning essential Data Science skills such as statistical modeling, big data processing, predictive analytics, and SQL!

Stay informed and inspired  with our popular Data Science articles, offering expert insights, trends, and practical tips for aspiring data professionals!

References:
https://www.appliedaicourse.com/blog/is-data-science-a-good-career/

Frequently Asked Questions (FAQs)

1. What is a Probability Mass Function (PMF)?

2. How does PMF differ from PDF?

3. Why is PMF important in probability theory?

4. What are some examples of discrete random variables?

5. How do you calculate a PMF?

6. What’s the difference between PMF and CDF?

7. What are standard distributions associated with PMFs?

8. How is PMF visualized?

9. What are some real-world applications of PMF?

10. Why should I learn PMFs for data science?

11. How can upGrad help me master PMFs?

Rohit Sharma

599 articles published

Get Free Consultation

+91

By submitting, I accept the T&C and
Privacy Policy

Start Your Career in Data Science Today

Suggested Blogs