Skip to content
geeksforgeeks
  • Tutorials
    • Python
    • Java
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
    • Practice Coding Problems
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Number System and Arithmetic
  • Algebra
  • Set Theory
  • Probability
  • Statistics
  • Geometry
  • Calculus
  • Logarithms
  • Mensuration
  • Matrices
  • Trigonometry
  • Mathematics
Open In App
Next Article:
Probability: Joint vs. Marginal vs. Conditional
Next article icon

Probability: Joint vs. Marginal vs. Conditional

Last Updated : 11 Mar, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Probability is a fundamental concept in statistics that helps us understand the likelihood of different events occurring. Within probability theory, there are three key types of probabilities: joint, marginal, and conditional probabilities.

  • Marginal Probability refers to the probability of a single event occurring, without considering any other events.
  • Joint Probability is the probability of two or more events happening at the same time. It is the probability of the intersection of these events.
  • Conditional Probability deals with the probability of an event occurring given that another event has already occurred.

In this article, we will discuss these probabilities in detail, including examples and differences between them as well.

Table of Content

  • Probability of an Event
    • Sample Space (S)
    • Event (A)
  • Joint Probability
    • Examples of Joint Probability
  • Marginal Probability
    • Examples of Marginal Probability
  • Conditional Probability
    • Examples of Conditional Probability
  • Difference between Joint, Marginal, and Conditional Probability
  • FAQs

Probability of an Event

Probability of an event quantifies how likely it is for that event to occur. It is a measure that ranges from 0 to 1, where 0 indicates the event cannot happen and 1 indicates the event is certain to happen.

The probability of an event A, denoted as P(A), is defined as:

P(A) = \dfrac{\text{Number of favorable outcomes}}{\text{Total number of possible outcomes}}

Sample Space (S)

The set of all possible outcomes of a random experiment. For example, if you roll a die, the sample space S is {1, 2, 3, 4, 5, 6}.

Event (A)

A subset of the sample space is called event in probability.

Event is the specific outcome or set of outcomes that we are interested in. For instance, getting an even number when rolling a die is an event A = {2, 4, 6}.

Joint Probability

Joint probability is the probability of two (or more) events happening simultaneously. It is denoted as P(A∩B) for two events A and B, which reads as the probability of both A and B occurring.

For two events A and B, the joint probability is defined as:

P(A \cap B) = P(\text{both } A \text{ and } B \text{ occur})

Note: If A and B are dependent, the joint probability is calculated using conditional probability

Examples of Joint Probability

Rolling Two Dice

  • Let A be the event that the first die shows a 3.
  • Let B be the event that the second die shows a 5.

The joint probability P(A∩B) is the probability that the first die shows a 3 and the second die shows a 5. Since the outcomes are independent,

P(A∩B) = P(A) ⋅ P(B).

Given: P(A) = 1/6 and P(B) = 1/6, so

⇒ P(A∩B) = 1/6 × 1/6 = 1/36​.

Marginal Probability

Marginal probability refers to the probability of an event occurring, irrespective of the outcomes of other variables. It is obtained by summing or integrating the joint probabilities over all possible values of the other variables.

For two events A and B, the marginal probability of event A is defined as:

P(A) = \sum_{B} P(A, B)

Where P(A, B) is the joint probability of both events A and B occurring together. If the variables are continuous, the summation is replaced by integration:

P(A) = \int_{B} P(A, B) \, dB

Examples of Marginal Probability

Consider a table showing the joint probability distribution of two discrete random variables X and Y:

X/Y

Y = 1

Y = 2

X = 1

0.1

0.2

X = 2

0.3

0.4

To find the marginal probability of X = 1:

P(X = 1) = P(X = 1, Y = 1) + P(X = 1, Y = 2) = 0.1 + 0.2 = 0.3

Read More about Marginal Distribution.

Conditional Probability

Conditional probability is the probability of an event occurring given that another event has already occurred. It provides a way to update our predictions or beliefs about the occurrence of an event based on new information.

The conditional probability of event A given event B is denoted as P(A∣B) and is defined by the formula:

P(A|B) = \frac{P(A \cap B)}{P(B)}

Where:

  • P(A∩B) is the joint probability of both events A and B occurring.
  • P(B) is the probability of event B occurring.

Examples of Conditional Probability

Suppose we have a deck of 52 cards, and we want to find the probability of drawing an Ace given that we have drawn a red card.

  • Let A be the event of drawing an Ace.
  • Let B be the event of drawing a red card.

There are 2 red Aces in a deck (Ace of hearts and Ace of diamonds) and 26 red cards in total.

P(A|B) = \frac{P(A \cap B)}{P(B)} = \frac{\frac{2}{52}}{\frac{26}{52}} = \frac{2}{26} = \frac{1}{13}

Difference between Joint, Marginal, and Conditional Probability

The key differences between joint, marginal and conditional probability are listed in the following table:

  • For Independent Events
    • P(A∩B) = P(A) x P(B)
  • For Dependent Events
    • P(A∩B) = P(A) x P(B|A)
AspectJoint ProbabilityMarginal ProbabilityConditional Probability
DefinitionThe probability of two or more events occurring together.The probability of a single event irrespective of the occurrence of other events.The probability of an event given that another event has occurred.
NotationP(A∩B) or P(A, B)P(A) or P(B)P(A∣B) or P(B∣A)
FormulaP(A) = ∑B​P(A∩B)P(A∣B) = P(A∩B)​/P(B)
ExampleProbability of rolling a 2 and flipping heads: P(2 ∩ Heads)Probability of rolling a 2:P(2)Probability of rolling a 2 given that the coin flip is heads: P(2 ∣ Heads)
Calculation ContextCalculated from a joint probability distribution.Calculated by summing the joint probabilities over all outcomes of the other variable.Calculated using the joint probability and the marginal probability of the given condition.
DependenciesInvolves multiple events happening simultaneously.Does not depend on other events.Depends on the occurrence of another event.
Use CaseUsed to find the likelihood of combined events in probabilistic models.Used to find the likelihood of a single event in the presence of multiple events.Used to update the probability of an event based on new information.

Read More,

  • Probability in Maths
  • Conditional Probability Practice Questions
  • Probability Formulas
  • Application of Bayes Theorem
  • Bayes Theorem in Machine Learning
  • Compound Probability
  • Dependent and Independent Events

Next Article
Probability: Joint vs. Marginal vs. Conditional

S

somesh_barthwal
Improve
Article Tags :
  • Mathematics
  • School Learning
  • Probability
  • Maths-Difference-Between

Similar Reads

    Conditional Probability
    Conditional probability defines the probability of an event occurring based on a given condition or prior knowledge of another event. Conditional probability is the likelihood of an event occurring, given that another event has already occurred. In probability, this is denoted as A given B, expresse
    12 min read
    Joint Probability Mass Function
    Joint Probability Mass Function (PMF) is a fundamental concept in probability theory and statistics, used to describe the likelihood of two discrete random variables occurring simultaneously. It provides a way to calculate the probability of multiple events occurring together.Table of ContentJoint P
    10 min read
    How to Calculate Marginal Probability
    To calculate the marginal probability in the probability distribution table, add the rows or columns of the required variable. It provides the total probability of event occurrence. In this article, we will explore marginal probability, the marginal probability formula and how to determine the margi
    10 min read
    Bayes's Theorem for Conditional Probability
    Bayes's Theorem for Conditional Probability: Bayes's Theorem is a fundamental result in probability theory that describes how to update the probabilities of hypotheses when given evidence. Named after the Reverend Thomas Bayes, this theorem is crucial in various fields, including engineering, statis
    9 min read
    How to Calculate Conditional Probability in R?
    In this article, we will discuss how to calculate conditional probability in R programming language. The probability of occurrence of one event conditioned over the occurrence of another event( i.e., an event occurs depending on the condition of another event) is termed as conditional probability. I
    6 min read
geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences