Skip to main content

Bayes Theorem | Definition, Proof, Formula, Derivation & Solved Examples | Class 12 Math Notes Study Material Download Free PDF

Bayes’ theorem describes the probability of occurrence of an event related to any condition. It is also considered for the case of conditional probability. Bayes theorem is also known as the formula for the probability of “causes”. For example: if we have to calculate the probability of taking a blue ball from the second bag out of three different bags of balls, where each bag contains three different colour balls viz. red, blue, black. In this case, the probability of occurrence of an event is calculated depending on other conditions is known as conditional probability. In this article, let us discuss the statement and proof for Bayes theorem, its derivation, formula, and many solved examples.

Bayes Theorem Statement

Let E1, E2,…, En be a set of events associated with a sample space S, where all the events E1, E2,…, En have nonzero probability of occurrence and they form a partition of S. Let A be any event associated with S, then according to Bayes theorem,

P(EiA) = P(Ei)P(AEi)k=1nP(Ek)P(A|Ek)

for any k = 1, 2, 3, …., n

Bayes Theorem Proof

According to the conditional probability formula,

P(EiA) = P(EiA)P(A)(1)

Using the multiplication rule of probability,

P(EiA) = P(Ei)P(AEi)(2)

Using total probability theorem,

P(A) = k=1n P(Ek)P(A|Ek)(3)

Putting the values from equations (2) and (3) in equation 1, we get

P(EiA) = P(Ei)P(AEi)k=1n P(Ek)P(A|Ek)

Note:

The following terminologies are also used when the Bayes theorem is applied:

Hypotheses: The events E1, E2,… En is called the hypotheses

Priori Probability: The probability P(Ei) is considered as the priori probability of hypothesis Ei

Posteriori Probability: The probability P(Ei|A) is considered as the posteriori probability of hypothesis Ei
Bayes’ theorem is also called the formula for the probability of “causes”. Since the Ei‘s are a partition of the sample space S, one and only one of the events Ei occurs (i.e. one of the events Ei must occur and the only one can occur). Hence, the above formula gives us the probability of a particular Ei (i.e. a “Cause”), given that the event A has occurred.

Bayes Theorem Formula

If A and B are two events, then the formula for the Bayes theorem is given by:

P(A|B)=P(B|A)P(A)P(B)whereP(B)0  

Where P(A|B) is the probability of condition when event A is occurring while event B has already occurred.

Bayes Theorem

Bayes Theorem Derivation

Bayes Theorem can be derived for events and random variables separately using the definition of conditional probability and density.

From the definition of conditional probability, Bayes theorem can be derived for events as given below:

P(A|B) = P(A ⋂ B)/ P(B), where P(B) ≠ 0

P(B|A) = P(B ⋂ A)/ P(A), where P(A) ≠ 0

Here, the joint probability P(A ⋂ B) of both events A and B being true such that,

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

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

P(A|B) = [P(B|A) P(A)]/ P(B), where P(B) ≠ 0

Similarly, from the definition of conditional density, Bayes theorem can be derived for two continuous random variables namely X and Y as given below:

fX|Y=y(x)=fX,Y(x,y)fY(y)fY|X=x(y)=fX,Y(x,y)fX(x)

Therefore, 

fX|Y=y(x)=fY|X=x(y)fX(x)fY(y)

Examples and Solutions

Some illustrations will improve the understanding of the concept.

Example 1:

A bag I contains 4 white and 6 black balls while another Bag II contains 4 white and 3 black balls. One ball is drawn at random from one of the bags, and it is found to be black. Find the probability that it was drawn from Bag I.

Solution:

Let E1 be the event of choosing bag I, E2 the event of choosing bag II, and A be the event of drawing a black ball.

Then,

P(E1) = P(E2) = 12

Also, P(A|E1) = P(drawing a black ball from Bag I) = 6/10 = 3/5

P(A|E2) = P(drawing a black ball from Bag II) = 3/7

By using Bayes’ theorem, the probability of drawing a black ball from bag I out of two bags,

P(E1|A) = P(E1)P(A|E1)P(E1)P(AE1)+P(E2)P(A|E2)

=12 × 3512 × 35 + 12 × 37

=712

Example 2:

A man is known to speak the truth 2 out of 3 times. He throws a die and reports that the number obtained is a four. Find the probability that the number obtained is actually a four.

Solution:

Let A be the event that the man reports that number four is obtained.

Let E1 be the event that four is obtained and E2 be its complementary event.

Then, P(E1) = Probability that four occurs = 1/6.

P(E2) = Probability that four does not occur = 1- P(E1) = 1 – (1/6) = 5/6.

Also, P(A|E1)= Probability that man reports four and it is actually a four = 2/3

P(A|E2) = Probability that man reports four and it is not a four = 1/3.

By using Bayes’ theorem, probability that number obtained is actually a four, P(E1|A)

=P(E1)P(A|E1)P(E1)P(AE1) + P(E2)P(A|E2) = 16 × 2316 × 23 + 56 × 13

=27

Bayes Theorem Applications

One of the many applications of Bayes’ theorem is Bayesian inference, a particular approach to statistical inference. Bayesian inference has found application in various activities, including medicine, science, philosophy, engineering, sports, law, etc. For example, we can use Bayes’ theorem to define the accuracy of medical test results by considering how likely any given person is to have a disease and the test’s overall accuracy. Bayes’ theorem relies on consolidating prior probability distributions to generate posterior probabilities. In Bayesian statistical inference, prior probability is the probability of an event before new data is collected.

Practice Problems

Solve the following problems using Bayes Theorem.

  1. A bag contains 5 red and 5 black balls. A ball is drawn at random, its colour is noted, and again the ball is returned to the bag. Also, 2 additional balls of the colour drawn are put in the bag. After that, the ball is drawn at random from the bag. What is the probability that the second ball drawn from the bag is red?
  2. Of the students in the college, 60% of the students reside in the hostel and 40% of the students are day scholars. Previous year results report that 30% of all students who stay in the hostel scored A Grade and 20% of day scholars scored A grade. At the end of the year, one student is chosen at random and found that he/she has an A grade. What is the probability that the student is a hosteler? 
  3. From the pack of 52 cards, one card is lost. From the remaining cards of a pack, two cards are drawn and both are found to be diamond cards. What is the probability that the lost card is a diamond?

Frequently Asked Questions on Bayes Theorem

Q1

What is meant by Bayes theorem in probability?

In Probability, Bayes theorem is a mathematical formula, which is used to determine the conditional probability of the given event. Conditional probability is defined as the likelihood that an event will occur, based on the occurrence of a previous outcome.

Q2

How is Bayes theorem different from conditional probability?

As we know, Bayes theorem defines the probability of an event based on the prior knowledge of the conditions related to the event. In case, if we know the conditional probability, we can easily find the reverse probabilities using the Bayes theorem.

Q3

When can we use Bayes theorem?

Bayes theorem is used to find the reverse probabilities if we know the conditional probability of an event.

Q4

What is the formula for Bayes theorem?

The formula for Bayes theorem is:
P(A|B)= [P(B|A). P(A)]/P(B)
Where P(A) and P(B) are the probabilities of events A and B.
P(A|B) is the probability of event A given B
P(B|A) is the probability of event B given A.

Q5

Where can we use Bayes theorem?

Bayes rule can be used in the condition while answering the probabilistic queries conditioned on the piece of evidence.

Comments

Popular posts from this blog

Symmetric & Skew Symmetric Matrix-Properties, Solved Examples, Class 12 Matrices Chapter Notes Study Material Download pdf

A symmetric matrix and skew-symmetric matrix both are square matrices. But the difference between them is, the symmetric matrix is equal to its transpose whereas skew-symmetric matrix is a matrix whose transpose is equal to its negative. If A is a symmetric matrix, then A = A T   and if A is a skew-symmetric matrix then A T  = – A. Table of Contents Symmetric Matrix Properties of Symmetric Matrix Skew Symmetric Matrix Properties of Skew Symmetric Matrix Determinant of Skew Symmetric Matrix Eigenvalue of Skew Symmetric Matrix Frequently Asked Questions-FAQs What is a symmetric matrix? How do you know if a matrix is symmetric? Give an Example of a Matrix Which is Symmetric but not Invertible. Is Symmetric Matrix Diagonalizable? What is skew-symmetric matrix? What is the difference between symmetric and skew-symmetric matrix? Symmetric Matrix To understand if a matrix is a symmetric matrix, it is very important to know about transpose of a matrix and how to find it. If we in...

Onto Functions(Surjective Functions)-Definition, Graph, Properties, Solved Examples, FAQs

  Onto Function is one of the many types of functions defined based on the relationship between its domain and codomain. For any function to be onto, it needs to relate two sets with a very specific mapping between elements, meaning that each element of the codomain has at least one element in the domain as its pre-image. In simple words, for any function, if all the elements of the codomain are mapped to some element of the domain, then the function is said to be an onto function.  In this article, we will discuss the concept of onto or surjective function in detail including its definition, example, and many more. We will also discuss key differences between one one, onto and into functions as well. Table of Contents What is an Onto Function? Onto Function Definition Representation for Onto Function Examples of Onto Function Properties of Onto Function Composition of Onto Function Onto Function Graph Number of Onto Functions One to One and Onto Functions Onto and Into Functi...

Transpose of a Matrix-Addition & Multiplication Property of Transpose, Solved Examples, Class 12 Matrices Chapter Notes Study Material Download pdf

Transpose of a matrix is one of the most commonly used methods in matrix transformation. For a given matrix, the transpose of a matrix is obtained by interchanging rows into columns or columns to rows. In this article, we are going to learn the definition of the transpose of a matrix, steps to find the transpose of a matrix, properties and examples with a complete explanation. Before learning how to find the transpose of a matrix, first let us learn, what a matrix is? Table of Contents What is a Matrix? Transpose of a Matrix Definition How to Find the Transpose of a Matrix? Properties of Transpose of a Matrix (i) Transpose of the Transpose Matrix (ii) Addition Property of Transpose (iii) Multiplication by Constant (iv) Multiplication Property of Transpose Transpose of a Matrix Examples Practice Problems Frequently Asked Questions What is the transpose of a matrix? How to calculate the transpose of a Matrix? What is the Addition Property of Transpose? What is the Multiplication Property...