0% found this document useful (0 votes)
13 views21 pages

Math Project 5

This document is a project on Conditional Probability, Total Probability, and Bayes' Theorem submitted by Shreya Mahajan from Smt. Sulochanadevi Singhania School. It includes acknowledgments, an index, definitions, formulas, examples, and explanations of the key concepts in probability theory. The project aims to provide a comprehensive understanding of these probability concepts and their applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views21 pages

Math Project 5

This document is a project on Conditional Probability, Total Probability, and Bayes' Theorem submitted by Shreya Mahajan from Smt. Sulochanadevi Singhania School. It includes acknowledgments, an index, definitions, formulas, examples, and explanations of the key concepts in probability theory. The project aims to provide a comprehensive understanding of these probability concepts and their applications.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Smt.

Sulochanadevi Singhania School, Thane

Mathematics Section A Project


On

Conditional Probability
Total Probability
Bayes’ Theorem

Submitted By:
Shreya Mahajan
12th C
Acknowledgement
I would like to express a deep sense of thanks and gratitude to our Principal and
Director Mrs. Revathi Srinivasan for her co-ordination in extending every possible
support for the completion of this project.

I would also like to thank our mathematics teacher Mrs. Geeta Menon for guiding me
immensely throughout the course of the project. Her constructive advice and constant
motivation have been responsible for the successful completion of this project.

I also would like to thank my parents and family members for their motivation and
support.

Last but not the least; I would like to thank all my friends for their timely help and
support for compilation of this project.
Index

PAGE
S.NO CONTENT
NO

1 Aim and Introduction 1

2. Probability 2

3. Conditional Probability 3

4. Total Probability Theorem 9

5. Bayes' Theorem 11

6. Conclusion 17

7. Bibliography 18
Aim and Introduction
Conditional probability refers to the chances that some outcome occurs given that

another event has also occurred.

Probability is the likelihood of an event. The probability of an event going to happen is

1 and for an impossible event is 0. In probability theory, there exists a fundamental rule

that relates to the marginal probability and the conditional probability, which is called

the formula or the law of total probability. Through several distinct events, it expresses

the total probability of an event.

1
Probability:

Probability means possibility. It is a branch of mathematics that deals with the


occurrence of a random event. The value is expressed from zero to one. Probability has
been introduced in Maths to predict how likely events are to happen. The meaning of
probability is basically the extent to which something is likely to happen. This is the
basic probability theory.
Probability Definition in Math
Probability is a measure of the likelihood of an event to occur. Many events cannot be
predicted with total certainty. We can predict only the chance of an event to occur i.e.
how likely they are to happen, using it. Probability can range in from 0 to 1, where 0
means the event to be an impossible one and 1 indicates a certain event. The
probability of all the events in a sample space adds up to 1.
For example, when we toss a coin, either we get Head OR Tail, only two possible
outcomes are possible (H, T). But if we toss two coins in the air, there could be three
possibilities of events to occur, such as both the coins show heads or both show tails or
one shows heads and one tail, i.e.(H, H), (H, T),(T, T).

2
Conditional Probability
Conditional probability is described as the possibility of occurrence of an event or
outcome, based on the eventuality of a preceding event or outcome. The concept of
conditional probability function is one of the ideal theories of probability mathematics.
It is chiefly associated with Bayes’ theorem, which is again one of the most dominant
concepts in statistics. To calculate Conditional probability— multiply the probability of
the previous event by the new or updated probability of the subsequent, or conditional,
event.

Conditional Probability Definition


The probability of occurrence of any event A when another event B in relation to A has
already occurred is known as conditional probability. It is depicted by P(A|B).

As depicted by above diagram, sample space is given by S and there are two events A
and B. In a situation where event B has already occurred, then our sample space
S naturally gets reduced to B because now the chances of occurrence of an event will
lie inside B.
As we have to figure out the chances of occurrence of event A, only portion common to
both A and B is enough to represent the probability of occurrence of A, when B has
already occurred. Common portion of the events is depicted by the intersection of both
the events A and B i.e. A ∩ B.
This explains the concept of conditional probability problems i.e. occurrence of any
event when another event in relation to has already occurred.

Conditional Probability Formula


Mathematically this can be represented as,

P(A|B) = N(A∩B)/N(B)
Where P(A|B) represents the probability of occurrence of A given B has occurred.
N(A ∩ B) is the number of elements common to both A and B.
N(B) is the number of elements in B and it cannot be equal to zero.
3
Conditional Probability Examples
Example 1:

A bag contains 9 identical discs, numbered from 1 to 9. One disc is drawn from the bag.
Let A = the event that ‘an odd number is drawn.’ Let B = the event ‘a number less than
5 is drawn’

(i) What is the probability that the number drawn is less than 5 given that it is odd i.e.
P(B|A)?

(ii) P(A|B) = probability that the number drawn is odd given that it is less than 5

Example 2 A game is played with 12 cards, 5 of the cards are red {1, 7, 8, 11, 12} and
7 are yellow. The cards are numbered from 1 to 12.

(i) Given that a card is red what is the probability that the number on it is even?

Solution: P(E|R) = probability that the number drawn is even given that it is red.

4
(ii) Given that a card is red what is the probability that the number on it is odd? Work
out this answer in 2 ways. 1 2 3 4 5 6 7 8 9 10 11 12 Work out this answer in 2 ways.

Solution: P(O|R) = probability that the number drawn is odd given that it is red.

(iii) Given that the number on the card is even what is the probability that it is red?

Solution: P(R|E) = probability that the number drawn is red given that it is even.

(iv) Is P(E|R) = P(R|E) where E means card has an even number on it and R means that
the card is red?

Solution:

5
(v) Is P(E|R) = P(E)? What does your answer tell you about the events of being red and
being even?

Solution:

Example 3: A piggy bank contains 3 coins. Of which 2 are regular coins and 1 is a
fake-headed coin. {P (H) = 1}.
A. You randomly picked a coin and tossed it. What is the probability that it will fetch up
heads?

Solution:
Let’s assume A1 be the condition that you select a regular coin, and A 2 be the condition
that you select the 2-headed coin. Keep in mind that A1 and A2 develop a sample space
partition.
Now,
P {H|A1) = 0.5
P {H|A2} =1
Here, applying the principle of probability, we write
P {H} = P {H|A1} P {A1} + P {H|A2} P {A2}
= ½ x 2/3 + 1 x 1/3 = 2/3
Hence, you get the probability = 2/3.
6
Example 4:
A piggy bank contains 3 coins. Of which 2 are regular coins and 1 is a fake-headed
coin. {P (H) = 1 P (H) =1}.
B. You randomly picked a coin and tossed it, and you got heads. What is the probability
that the coin will be a two-headed coin?
Solution:
Let A be the event coin 1 is selected
Let B be the event coin 2 is selected.
Let C be the event coin 3, that is the coin with both the faces head is selected.
Let H be the event that we get a head.
You pick a coin at random and toss it, and get heads. We want to know the probability
that the coin picked up is C or the biased coin.
It can be represented as P(C|H)
Using the formula for conditional probability, we get this as
P(C|H) = P(H∩C) x P(H)
P(H) is the probability of getting heads
We can get head in three different ways. We select A and get head or we select B and
get head or we select C and get a head
⇒P(H) = P(HA)P(A)+P(HB)P(B)+P(HC)P(C)
= ½ × 1/3 + ½ × 1/3 + 1 × 1/3
= 2/3 −−−−−−−−−−(1)
P(H∩C) can be calculated using the expression for finding P(H|C)
P(H|C)=P(H∩C) / P(C)
⇒P(H∩C)=P(C)×P(H|C)
P(H|C) is the probability of getting head given that we chose coin C. Since coin C is
biased, we get P(H|C)=1
⇒P(H∩C)=1/3 × 1
=1/3 −−−−−−−−−−−(2)
Using (1) and (2) we get
P(C|H) = P(H∩C) / P(H)
= (1/3) / (2/3)
= 1/2

7
Chain rule for conditional probability:
Let us write the formula for conditional probability in the following format

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

This format is particularly useful in situations when we know the conditional


probability, but we are interested in the probability of the intersection. We can interpret
this formula using a tree diagram such as the one shown in the following figure. In this
figure, we obtain the probability at each point by multiplying probabilities on the
branches leading to that point. This type of diagram can be very useful for some
problems.

Now we can extend this formula to three or more events:

P(A∩B∩C) = P(A∩(B∩C)) = P(A) x P(B∩C|A) eq.(b)

From Equation (a)

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

Conditioning both sides on A, we obtain

P(B∩C|A) = P(B|A) x P(C|A,B) eq.(c)

Combining Equation (b) and (c) we obtain the following chain rule:

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

A general statement of the chain rule for n events is as follows:

P(A1∩A2∩⋯∩An) = P(A1) x P(A2|A1) x P(A3|A2,A1) x ⋯ x P(An|An−1An−2⋯A1)

8
Total Probability Theorem:
In probability theory, there exists a fundamental rule that relates to the marginal
probability and the conditional probability, which is called the formula or the law of
total probability. Through several distinct events, it expresses the total probability of an
event.
Law of Total Probability
For two events A and B associated with a sample space S, the sample space can be
divided into a set A ∩ B′, A ∩ B, A′ ∩ B, A′ ∩ B′. This set is said to be mutually
disjoint or pairwise disjoint because any pair of sets in it is disjoint. Elements of this set
are better known as a partition of sample space.
This can be represented by the Venn diagram as shown below. In cases where the
probability of occurrence of one event depends on the occurrence of other events, we
use the law of total probability theorem.

Law of Total Probability Statement


Let events C1, C2 . . . Cn form partitions of the sample space S, where all the events have
a non-zero probability of occurrence. For any event, A associated with S, according to
the total probability theorem,

9
Total Probability Theorem Examples:
A person has undertaken a mining job. The probabilities of completion of the job on
time with and without rain are 0.42 and 0.90 respectively. If the probability that it will
rain is 0.45, then determine the probability that the mining job will be completed on
time.
Solution:
Let A be the event that the mining job will be completed on time and B be the event that
it rains. We have,
P(B) = 0.45,
P(no rain) = P(B′) = 1 − P(B) = 1 − 0.45 = 0.55
By multiplication law of probability,
P(A|B) = 0.42
P(A|B′) = 0.90
Since, events B and B′ form partitions of the sample space S, by total probability
theorem, we have
P(A) = P(B) P(A|B) + P(B′) P(A|B′)
=0.45 × 0.42 + 0.55 × 0.9
= 0.189 + 0.495
= 0.684
So, the probability that the job will be completed on time is 0.684.

10
Bayes' Theorem
In statistics and probability theory, the Bayes’ theorem (also known as the Bayes’ rule)
is a mathematical formula used to determine the conditional probability of events.
Essentially, the Bayes’ theorem describes the probability of an event based on prior
knowledge of the conditions that might be relevant to the event.

The theorem is named after English statistician, Thomas Bayes, who discovered the
formula in 1763. It is considered the foundation of the special statistical inference
approach called the Bayes’ inference.

Where:

• P(A|B) – the probability of event A occurring, given event B has occurred


• P(B|A) – the probability of event B occurring, given event A has occurred
• P(A) – the probability of event A
• P(B) – the probability of event B

Note that events A and B are independent events (i.e., the probability of the outcome of
event A does not depend on the probability of the outcome of event B).

A special case of the Bayes’ theorem is when event A is a binary variable. In such a
case, the theorem is expressed in the following way:

Where:

• P(B|A–) – the probability of event B occurring given that event A– has occurred
• P(B|A+) – the probability of event B occurring given that event A + has occurred

11
In the special case above, events A– and A+ are mutually exclusive outcomes of event A.

Bayes' Theorem Examples:


Example 1 : Amy has two bags. Bag I has 7 red and 2 blue balls and bag II has 5 red
and 9 blue balls. Amy draws a ball at random and it turns out to be red. Determine the
probability that the ball was from the bag I using the Bayes theorem.

Solution: Let X and Y be the events that the ball is from the bag I and bag II,
respectively. Assume A to be the event of drawing a red ball. We know that the
probability of choosing a bag for drawing a ball is 1/2, that is,
P(X) = P(Y) = ½

Since there are 7 red balls out of a total of 11 balls in the bag I, therefore, P(drawing a
red ball from the bag I) = P(A|X) = 7/11

Similarly, P(drawing a red ball from bag II) = P(A|Y) = 5/14

We need to determine the value of P(the ball drawn is from the bag I given that it is a
red ball), that is, P(X|A). To determine this we will use Bayes Theorem. Using Bayes
theorem, we have the following:

Answer: Hence, the probability that the ball is drawn is from bag I is 0.64

Example 2: Assume that the chances of a person having a skin disease are 40%.
Assuming that skin creams and drinking enough water reduces the risk of skin disease
by 30% and prescription of a certain drug reduces its chance by 20%. At a time, a
patient can choose any one of the two options with equal probabilities. It is given that
after picking one of the options, the patient selected at random has the skin disease. Find
the probability that the patient picked the option of skin screams and drinking enough
water using the Bayes theorem.

Solution: Assume E1: The patient uses skin creams and drinks enough water; E2: The
patient uses the drug; A: The selected patient has the skin disease

P(E1) = P(E2) = ½

Using the probabilities known to us, we have

P(A|E1) = 0.4 × (1-0.3) = 0.28


12
P(A|E2) = 0.4 × (1-0.2) = 0.32

Using Bayes Theorem, the probability that the selected patient uses skin creams and
drinks enough water is given by,

Answer: The probability that the patient picked the first option is 0.47

Example 3: A man is known to speak the truth ¾ times. He draws a card and reports it
is king. Find the probability that it is actually a king.

Solution:

Let E be the event that the man reports that king is drawn from the pack of cards

A be the event that the king is drawn

B be the event that the king is not drawn.

Then we have P(A) = probability that king is drawn = ¼

P(B) = probability that king is drawn = ¾

P(E/A) = Probability that the man says the truth that king is drawn when actually king is
drawn = P(truth) = ¾

P(E/B)= Probability that the man lies that king is drawn when actually king is drawn =
P(lie) = ¼

Then according to Bayes theorem, the probability that it is actually a king = P(A/E)

13
Answer: Thus the probability that the drawn card is actually a king = 0

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.

Example: Picnic Day

You are planning a picnic today, but the morning is cloudy

• 50% of all rainy days start off cloudy


• But cloudy mornings are common (about 40% of days start cloudy)
• And this is usually a dry month (only 3 of 30 days tend to be rainy, or 10%)

What is the chance of rain during the day?


We will use Rain to mean rain during the day, and Cloud to mean cloudy morning.
The chance of Rain given Cloud is written P(Rain|Cloud)

So let's put that in the formula:

P(Rain|Cloud) = P(Rain) P(Cloud|Rain)P(Cloud)


• P(Rain) is Probability of Rain = 10%
• P(Cloud|Rain) is Probability of Cloud, given that Rain happens = 50%
• P(Cloud) is Probability of Cloud = 40%

P(Rain|Cloud) = 0.1 x 0.5 x 0.4 = 0.125


14
Or a 12.5% chance of rain. Not too bad, let's have a picnic!

Example: Allergy or not?

Hunter says she is itchy. There is a test for Allergy to Cats, but this test is not
always right:

• For people that really do have the allergy, the test says "Yes" 80% of the time
• For people that do not have the allergy, the test says "Yes" 10% of the time
("false positive")

If 1% of the population have the allergy, and Hunter's test says "Yes", what are the
chances that Hunter really has the allergy?

We want to know the chance of having the allergy when test says "Yes",
written P(Allergy|Yes)

Let's get our formula:

P(Allergy|Yes) = P(Allergy) P(Yes|Allergy)P(Yes)

• P(Allergy) is Probability of Allergy = 1%


• P(Yes|Allergy) is Probability of test saying "Yes" for people with allergy = 80%
• P(Yes) is Probability of test saying "Yes" (to anyone) = ??%

We don't know what the general chance of the test saying "Yes" is but we can
calculate it by adding up those with, and those without the allergy:

• 1% have the allergy, and the test says "Yes" to 80% of them
• 99% do not have the allergy and the test says "Yes" to 10% of them

Let's add that up:

P(Yes) = 1% × 80% + 99% × 10% = 10.7%

Which means that about 10.7% of the population will get a "Yes" result.

So now we can complete our formula:

P(Allergy|Yes) = 1% x 80% x 10.7% = 7.48%

P(Allergy|Yes) = about 7%

This is the same result we got on False Positives and False Negatives.

In fact we can write a special version of the Bayes' formula just for things like this:

P(A|B) = P(A)P(B|A) + P(not A)P(B|not A)

15
Example: The Art Competition has entries from three painters: Pam, Pia and Pablo

• Pam put in 15 paintings, 4% of her works have won First Prize.


• Pia put in 5 paintings, 6% of her works have won First Prize.
• Pablo put in 10 paintings, 3% of his works have won First Prize.

What is the chance that Pam will win First Prize?

P(Pam|First) = P(Pam)P(First|Pam) + P(Pia)P(First|Pia) + P(Pablo)P(First|Pablo)

Put in the values:

P(Pam|First) =(15/30) × 4% (15/30) × 4% + (5/30) × 6% + (10/30) × 3%

Multiply all by 30 (makes calculation easier):

P(Pam|First) =15 × 4% 15 × 4% + 5 × 6% + 10 × 3%

=0.60.6 + 0.3 + 0.3

=50%

A good chance!

Pam isn't the most successful artist, but she did put in lots of entries.

16
Conclusion:
Probability usually helps to define the probabilities of an event to occur. It is easy to
know the probability of an event to occur in simple examples such as coin flipped or
dice thrown as it may seem obvious. However for many other situations, it is more
ambiguous.

For example: How do we determine the probability of an event that occurs only once or
how do we determine the probability of an event that concerns a (possibly infinite) set
of considerations such as the probability of a given person getting into a car accident
beyond that how do our personal beliefs and experiences factor into probabilities?

17
Bibliography:
1. https://byjus.com/

2. https://www.probabilitycourse.com/chapter1/1_4_2_total_probability

3. https://www.statisticshowto.com/total-probability-rule

4. https://www.geeksforgeeks.org/mathematics-law-of-total-probability/

5. https://www.vedantu.com/maths/total-probability-theorem

18

You might also like