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:
How to Calculate Probability
Next article icon

How to Calculate Probability

Last Updated : 26 Nov, 2024
Comments
Improve
Suggest changes
Like Article
Like
Report

Probability is a fascinating and vital field of mathematics that deals with calculating the likelihood of events occurring. It is a concept that permeates our daily lives, from predicting weather patterns to making informed decisions in business and finance.

Probability Formula

probablity

Probability is the measure of the likelihood that an event will occur. It is quantified as a number between 0 and 1, where 0 indicates impossibility and 1 indicates certainty.

Probability of an event (A) is calculated using the following formula:

P(A) = n(A) / n(S)

where, n(A) is favorable number of outcomes
n(S) is the total number of outcomes.

Example 1: If you want to find the probability of drawing an Ace from a standard deck of cards:

Total number of cards in the deck (n(S)) = 52

Number of Ace cards (n(A)) = 4

Probability of selecting an Ace:

P(Ace) = n(A)/n(S) = 4/52 = 1/13

Example 2: You roll a fair six-sided die. What is the probability of rolling a number greater than or equal to 4?

Total Number of sides in die i.e n(S) = 6

Number of sides with number > 4 i.e n(A) = 3

P (rolling ≥ 4) = 3/6 = 1/2.

So, the probability of rolling a number greater than or equal to 4 is 1/2.

Read More: Basic Concepts of Probabaility

How to Find Probability of an Event?

To find the probability of an event, you can use the following steps:

1. Identify the Total Number of Outcomes (Sample Space):

Determine the total number of possible outcomes in the experiment. This set of all possible outcomes is called the sample space and is often denoted by S.

2. Identify the Number of Favorable Outcomes:

Determine the number of outcomes that correspond to the event of interest (the event you are finding the probability for). These are the favorable outcomes.

3. Use the Probability Formula:

The probability of an event A happening is given by the formula:

P(A) = \frac{\text{Number of Favorable Outcomes}}{\text{Total Number of Possible Outcomes}}

4. Simplify the Fraction (if necessary):

Simplify the fraction to its lowest terms to get the probability.

5. Express the Probability:

Probabilities are usually expressed as fractions, decimals, or percentages. The probability value will always be between 0 and 1 (or between 0% and 100%).

Important Formulas of Probability

Untitled-Diagram-Probability-Rules


  • Rule of Addition: The probability of either event (A) or event (B) occurring is given by:

P(A ∪ B) = P(A) + P(B) - P(A ⋂ B)

  • Rule of Complementary Events: The sum of the probabilities of an event and its complementary event is always 1:

P(A’) + P(A) = 1

  • Disjoint (Mutually Exclusive) Events: If events (A) and (B) cannot occur simultaneously (i.e., (A ⋂ B = 0)), then:

P(A ⋂ B) = 0

  • Independent Events: If events (A) and (B) are independent, their joint probability is the product of their individual probabilities:

P(A ⋂ B) = P(A) · P(B)

  • Conditional Probability: The probability of event (A) given that event (B) has occurred is given using the formula:

P(A|B) = P(A ⋂ B)/P(B)

Conditional Probability

Conditional Probability is the probability of an event occurring given that another event has already occurred. It is denoted by ( P(A|B) ), which reads as “the probability of A given B.”

Dependent Events: When the outcome of one event affects the outcome of another, the events are dependent.

Bayes’ Theorem: A way to find the probability of an event given the probabilities of other related events. It’s expressed as:

P(A|B) = P(B|A)P(A) / P(B)​

Common Misconceptions

  • “If an event hasn’t happened for a while, it’s due to occur”: This is known as the gambler’s fallacy. In independent events, like coin tosses, the odds remain the same regardless of previous outcomes.
  • “Adding probabilities of two events gives the probability of either occurring”: This is only true for mutually exclusive events. Generally, the correct formula is:

P(A or B) = P(A) + P(B) - P(A and B)

Solved Problems on Probability

Problem 1: If a coin is flipped three times, what is the probability of getting exactly two heads?

Solution:

When flipping a coin, there are two possible outcomes for each flip: Heads (H) or Tails (T).

Flipping a coin three times means there are 23 = 8 possible outcomes.

Favorable outcomes for getting exactly two heads are: HHT, HTH, and THH.

There are 3 favorable outcomes out of 8 possible outcomes.

Using the probability formula:

P(Exactly 2 Heads)=\dfrac{Number of favorable outcomes}{Total number of outcomes}=\dfrac{3}{8}

So, the probability of getting exactly two heads is ( \frac{3}{8} ).

Problem 2: In a deck of 52 cards, what is the probability of drawing an ace or a king?

Solution:

A standard deck of cards has 52 cards, with 4 aces and 4 kings.

Event of drawing an ace is mutually exclusive from the event of drawing a king (you can’t draw a card that is both an ace and a king).

Number of favorable outcomes for drawing an ace or a king is (4 + 4 = 8).

Using probability formula:

P(Ace or King)=\dfrac{Number of favorable outcomes (Aces + Kings)}{Total number of cards}=\dfrac{8}{52}

Simplifying the fraction ( \frac{8}{52} ) gives us ( \frac{2}{13} ).

So, the probability of drawing an ace or a king is ( \frac{2}{13} ).


Next Article
How to Calculate Probability

Y

yaminiy1183
Improve
Article Tags :
  • Mathematics
  • School Learning
  • Probability

Similar Reads

    How to calculate Dice Probabilities?
    Probability is the chance or likelihood of an event happening. It is represented by a number between 0 and 1. The higher the probability, the greater the chances of the event occurring.A probability of 0 means the event is impossible and cannot happen.A probability of 1 means the event is certain to
    5 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
    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
    How To Calculate Probability using Combination
    Combination probability is a mathematical method that involves the process of combination in determining the number of favorable outcomes of an event. We use combinations in probability problems to determine a sequence of outcomes where the order of the outcomes does not matter. Understanding how to
    8 min read
    Dice Rolling Probability Calculator
    A classic example of probability and statistics is a dice thrown. It’s often used to demonstrate some basic principles of probability. Therefore, students need to know about dice probabilities because they form the bedrock for more complicated statistical concepts commonly used in games and real-lif
    5 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