Decoding Probability Formulas: Understand Chance and Uncertainty

# Decoding Probability Formulas: Understand Chance and Uncertainty

Vikram Singh
Assistant Manager - Content
Updated on Sep 12, 2023 11:35 IST

In this article, we will briefly discuss the probability formulas that can be used to calculate the probability of any event.

Probability is a branch of mathematics that deals with randomness, chance, and uncertainty. It is a measure or estimation of how likely an event will occur. From weather forecasting to estimating a stock’s potential return, probability assesses the likelihood of various events and guides decision-making. While making decisions, we often rely on intuitions to make sense of the likelihood of various events. However, these intuitions can be misleading; to overcome this problem, we use probability formulas. This article will briefly discuss different probability formulas and how to use them.

But before that, let’s glimpse some key terminologies used in Probability.

## Key Terminologies Used in Probability

Till now, we got enough understanding of the basics of probability. Now, it’s time to explore the formulas of probability.

### The Basic Formula: Formula of Probability

Probability is the ratio of the number of favourable outcomes to the total number of outcomes.

Let A be any event, then

#### P(A) = Number of Favourable Outcomes / Total Number of Possible Outcomes

where

P(A): Probability of Event A and 0 <= P(A) <= 1

#### Example: What is the probability of getting exactly one head when two coins are tossed?

Solution: Sample Space for tossing two coins:

S = {HH, HT, TH, TT}

Therefore, the total number of possible outcomes is 4.

A: Event of getting exactly two heads

=> Favourable Outcome = {HH}

=> P(A) = a number of favourable outcomes / Total number of outcomes = 1/ 4

Hence, P(A) = 1/4

Must Read: What is the Difference Between Probability and Likelihood

Let A and B be two events, and then the addition rule calculates the probability of either event A or event B occurring.

Formula: P(A U B) = P(A) + P(B) – P(A ∩ B)

Note: If A and B are two mutually exclusive events, then the formula will be:

P(A U B) = P(A) + P (B)

Related Read – Probability and Non Probability Sampling

### The Multiplication Rule

The multiplication rule occurs simultaneously when two events (let A and B) occur.

Formula:

P(A ∩ B) = P(A) x P(B|A)

P(B|A) represents the probability of occurrence of B, given that event A already occurred.

Note: If events A and B are independent events, then,

P(A ∩ B) = P(A) x P(B)

Probability Distributions used in Data Science
In this article we listed 5 probability distributions used in Data Science like Uniform, Bernoulli, Binomial, Poisson, and Normal which are .
Probability Density Function: Definition, Properties, and Application
Probability Density function describes the probability distribution of the continuous random variable. In this article, we will briefly discuss what is probability density function, its properties, its application, and how...read more

### Conditional Probability

Condition Probability is the probability of an event occurring given that another event has already occurred. i.e. we try to calculate the probability of the second event given that the first event has already occurred.

The formula for conditional probability is

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

P(A|B) represents the probability of occurrence of A, given that event B already occurred.

Example: Consider a deck of 52 playing cards. The deck contains 26 Red Cards (13 Hearts and 13 Diamonds) and 26 Black Cards (13 Clubs and 13 Spades).
Let’s consider two cases:
A = Drawing a Red Card
B = Drawing a Heart

Then, what will be the probability of drawing a Heart given that the card drawn is Red?

Answer: Here, we have two events, drawing a red card and drawing a heart, since we have to find the probability of drawing a heart given that the card is red.
i.e., P(B|A)
From the conditional probability formula, we have:

P(B|A) = P (B A) / P(A)……(i)

P(A) = Number of Red Cards / Total Number of Cards = 26/52 = 1/2
=> P(A) = 1/2

P(B A) = Number of Common Cards (Heart and Red) / Total Number of Cards = 13/ 52 = 1/4
=> P(B A) = 1/4

Now, substituting the value of P(A), and P(B intersect A) in (i), we get

=> P(B|A) = P(B A)/ P(A) = (1/4) / (1/2) = 2/4 = 1/2
=> P(B|A) = 1/2

Must Check: Conditional Probability

#### Bayes Theorem

It is one of the fundamental theorems of probability. It describes the relationship between the probability of an event given some evidence and the probability of the evidence without any evidence.
In simple terms, it gives the relationship between the conditional probabilities of two events.

Mathematically, it can be expressed as

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

where,

P(A|B) represents the probability of event A occurring, given that event B has occurred.

P(B|A) is the probability of event B occurring, given that event A has occurred.

Example: Consider a case where 1% of the population has a rare genetic disease.

A new test has been developed to detect the disease. The test has a 95% True Positive Rate (i.e., the probability that a person with the disease will test positive) and a 2% False Positive Rate (i.e., the probability that a person without the disease will test positive).
If the test is performed over any random person, the result is positive for the disease. What is the probability that the person has the disease?

Solution:

Firstly, let’s segregate the above question into two different events:

A: Having a genetic disease
B: Testing positive for the disease
=> P(A) = 0.01 (the probability of having the disease)

To Find: Probability of having the disease given a positive test result, i.e. P(A|B)

Now, let’s find all the probabilities:

P(A) = 0.01 (the probability of having the disease)
TPR = P(B|A) = 0.95 (the probability that a person with the disease will test positive)
TNR = P (B|A’) = 0.02 (probability that a person without the disease will test positive)

Now, we will use the Law of Total Probability:

P(B) = P(B|A) * P(A) + P(B|A’) * P(A’)

and since P(A’) = 1 – P(A)
=> P(B) = 0.95 * 0.01 + 0.02 (1-0.01) = 0.0095 + (0.02)(0.99) = 0.0287
=> P(B) = 0.0287

Now, applying Baye’s Thoerem, to find the value of P(A|B)

=> P(A|B) = (P(B|A) * P(A)) / P(B) = (0.95 * 0.01) / 0.0287
=> P(A|B) = 0.3306

Hence, the Probability of having the disease given a positive test result is 33.06%.

Must Check: Baye’s Theorem

## Conclusion

The role of probability is not just limited to finding the solution using these probability formulas. Probability is important in data science, providing a foundation for understanding and interpreting data while making predictions.

Knowing the basics concepts will not only help calculate an event’s uncertainty, but it will also be useful to understand the complex machine learning algorithms (Naive Bayes Classifier, Decision Tree, Random Forest, etc.) and the working mechanism of Natural Language Processing.

This article briefly covers all probability formulas, including probability formulas class 12 and probability formulas class 10.

Hope you will like the article.

Happy Learning!!

Statistics Interview Questions for Data Scientists
In this article, Statistics Interview Questions for Data Scientists are listed. It starts with defining Statistics and ends with describing Empirical Rule.
Top 10 Probability Questions Asked in Interviews
Probability is defined as the likeliness of something to occur or happen. In this article, we will discuss top 10 probability questions that are asked in the interviews with their...read more
Introduction to Inferential Statistics
The branch of mathematics that deals with the collection, analysis, prediction, and presentation of numerical data is known as Statistics.
Introduction to Sampling and Resampling
Measures of Central Tendency: Mean, Median and Mode
When we have the dataset having ample records (like passenger traveling through of airplane, weight, and score of all students in a university, share prices) in it and...read more
Skewness in Statistics – Overview, Concepts, Types, Measurements and Importance
Imagine a seesaw—perfectly balanced, right? That's how data can sometimes be—nice and even on both sides. But what if all the kids pile on one side? That's kind of like...read more
Measures of Dispersion: Range, IQR, Variance, Standard Deviation
To describe the data, a measure of the central tendency is not just enough as it only gives information about the central values of the dataset.
Difference Between Covariance and Correlation
Looking to understand the difference between covariance and correlation? This article breaks down the key differences between the two statistical measures, including their definitions, range of values, units, sensitivity to...read more
PDF vs. CDF: Difference Between PDF and CDF
PDF describes the probability distribution of a continuous random variable, while PDF describes the probability distribution of both discrete and continuous random variables. In this article, we will learn what...read more
Understanding the Basics: The Difference Between Mean, Median, and Mode
Looking to gain a better understanding of statistical measures of central tendency? Check out our article on the differences between mean, median, and mode. Learn how each measure represents a...read more
Difference Between Population And Sample
The article discusses the concept of population and sample in statistics and the difference between population and sample.
Difference between Median and Average
Average and median are two basic terms that are used in statistics very often. Median is the middle value in a set, whereas average is an arithmetic mean of set...read more
Difference between One-tailed and Two-Tailed Test
One-tailed and two-tailed test are statistical hypothesis tests to accept or reject the null hypothesis. In this article, we will briefly discuss the difference between one tail and two tail...read more
Difference between Variance and Standard Deviation
Variance and Standard Deviation are statistical measure to measure the dispersion of data point from the center or mean. In this article, we will discuss difference between variance and standard...read more
Difference between Correlation and Regression
Correlation measures the degree of relationship between two variables while regression is about how one variable affects the other. In this article, we will briefly discuss the difference between correlation...read more

## FAQs

What is Probability?

Probability is a branch of mathematics that deals with randomness, chance, and uncertainty. It is a measure or estimation of how likely an event will occur.

What is the formula of Probability?

Probability is the ratio of the number of favourable outcomes to the total number of outcomes. Let A be any event, then P(A) = Number of Favourable Outcomes / Total Number of Possible Outcomes

What is Conditional Probability?

Condition Probability is the probability of an event occurring given that another event has already occurred. i.e. we try to calculate the probability of the second event given that the first event has already occurred.

What is Bayes Theorem?

It is one of the fundamental theorems of probability. It describes the relationship between the probability of an event given some evidence and the probability of the evidence without any evidence. In simple terms, it gives the relationship between the conditional probabilities of two events.