Unit-1: Introduction to Probability
Basic Definitions:
Experiment:
It is defined as an operation which can produce some well-defined outcomes (or results).
Random Experiment:
Random experiment is the one in which each trial conducted under identical condition where
the outcome is not predictable.
Example: Tossing of coin, Throwing of dice.
Sample space and events in probability:
In probability, the sample space is the set of all possible outcomes of a random experiment.
Generally a sample space is denoted by S. An event is a subset of the sample space,
representing a specific outcome or a collection of outcomes. Generally an event is denoted by
E.
Any subset of a sample space is called an event. For example, E ={H} is a subset of S={H,T}
Therefore, it is called event.
Note: If A and B are two sets, then A is a subset of B (written as A ⊆ B) if every element of A is
also an element of B. That is, A subset of set A, if it can be derived from set B.
Types of Subsets:
1. Proper Subset (A ⊂ B): A is a subset of B, but A ≠ B.
2. Improper Subset: A subset that is equal to the original set (A = B).
3. Empty Set (∅) is a subset of every set.
Impossible Event
The Subset 𝜙 of a sample space 𝑆 is called the impossible event.
Certain (Sure) Event
The Subset 𝑆 of a sample space 𝑆 is called certain event.
Simple (Primary) Event
A single term subset of a sample space 𝑆 is called primary event; that is, the event has single
possible outcome of a random experiment.
Compound Event
The joint occurrence of two or more simple events is called a compound event.
Complementary Event
If S is the sample space and event A ∈𝑆 then𝐴′ = S-A is said to be a complementary event.
Union Event
Let 𝑆 be a sample space, and 𝐴 and 𝐵 be any two events of 𝑆, then the subset of 𝑆 containing
of those elements which are either in 𝐴 or in 𝐵 is called the union of events 𝐴 and 𝐵. It is
denoted by 𝐴 ∪ 𝐵.
Intersection Event
Let 𝑆 be a sample space, and 𝐴 and 𝐵 be any two events of 𝑆, then the subset of 𝑆 containing
of those elements which are either in 𝐴 as well as in 𝐵 is called the intersection of events 𝐴
and 𝐵. It is denoted by 𝐴 ∩ 𝐵.
Difference Event
Let 𝑆 be a sample space, and 𝐴 and 𝐵 be any two events of 𝑆, then the subset of 𝑆 containing
of those elements which are either in 𝐴 but not in 𝐵 is called the difference of events 𝐴 and
𝐵. It is denoted by 𝐴 − 𝐵.
Independent Event
The events are said to be independent if the happening of one event does not depend upon the
happening or non-happening of the other event. Inthe other case it is said to be dependent
events.
Mutually Exclusive Events
Let 𝑆 be a sample space, and 𝐴 and 𝐵 be any two events of 𝑆. Then 𝐴 and 𝐵 are called
mutually exclusive events, if 𝐴 ∩ 𝐵 = 𝜙. It means that occurrence of 𝐴 prevents the
occurance of 𝐵 and vice versa.
Exhaustive Events
Let 𝑆 be a sample space, and 𝐴 and 𝐵 be any two events of 𝑆. Then 𝐴 and 𝐵 are called
exhaustive events, if 𝐴 ∪ 𝐵 = 𝑈.
Equiprobable Events
If the probability of occurrence of each event in the sample space are equal then it is known
as Equiprobable events.
Favourable Events
Favourable outcomes are those outcomes that satisfy the condition of an event and
probability means how likely something is to happen.
Permutation and Combination
Permutation
Suppose that we are given ‘𝑛’ distinct objects and wish to arrange ‘𝑟’ of these objects in
aline. Since there are ‘𝑛’ ways of choosing the 1st object, after this is done ‘𝑛 − 1’ ways
ofchoosing the 2nd object and finally 𝑛 − 𝑟 + 1 ways of choosing the 𝑟 𝑡ℎ object, it follows
by thefundamental principle of counting that the number of different arrangement
(orPERMUTATIONS) is given by
𝑛!
𝑛𝑃𝑟 = 𝑛 𝑛 − 1 𝑛 − 2 … … … 𝑛 − 𝑟 + 1 =
𝑛 − 𝑟 !
Note
Suppose that a set consists of 𝑛 objects, out of which 𝑛1 are of one type, 𝑛2 are of second
type,… …, and 𝑛𝑘 are of 𝑘 𝑡ℎ type. Here 𝑛 = 𝑛1 + 𝑛2 + ⋯ + 𝑛𝑘 . Then the number of
differentpermutations of the objects is
𝑛!
𝑛1 ! 𝑛2 ! … 𝑛𝑘 !
If 𝑟 objects are to be arranged out of 𝑛 objects and if repetition of an object is allowed then
the total number of permutations is
𝑛𝑟
Combination
A combination is a selection of items from a set that has distinct members, such that the
order of selection does not matter (unlike permutations).
For example, given three fruits, say an apple, an orange and a pear, there are three
combinations of two that can be drawn from this set: an apple and a pear; an apple and an
orange; or a pear and an orange.
The total number of combination (selections) of ‘r’ objects selected from ‘n’ objects
isdenoted and defined by
𝑛𝑃𝑟 𝑛!
𝑛𝐶𝑟 = =
𝑟! 𝑟! 𝑛 − 𝑟 !
Definitions of probability:
(1): The chance that a given event will occur.
(2): The ratio of the number of outcomes in an exhaustive set of equally likely outcomes that
produce a given event to the total number of possible outcomes.
Mathematically probability is defined by:
No. of favourable outcomes
𝑃 𝐴 =
Total no. of Outcomes
As number of outcomes 𝑚 favourable to the events 𝐴 cannot be greater than the
total number of Outcomes, therefore 0 ≤ 𝑃 𝐴 ≤ 1
Properties of probability:
1. The probability of an event E is defined as P(E) = [Number of favourable outcomes of E]/[
total number of possible outcomes of E].
2. The probability of a sure event or certain event is 1.
3. The probability of an impossible event is 0.
4. The probability of an event E is a number P(E) such that 0 ≤ P (E) ≤ 1. Probability is
always a positive number.
5. If A and B are 2 events that are mutually exclusive, then P(A⋃B) = P(A) + P(B).
6. An elementary event is an event having only one outcome. The sum of the probabilities of
such events of an experiment is 1.
7. The sum of probabilities of an event and its complementary event is 1. P(A) + P(A’) = 1.
8. P(A⋃B) = P(A) + P(B) – P(A⋂B).
9. P(A⋂B) = P(A) + P(B) – P(A⋃B) .
10. If A1, A2, A3 ,………, An are mutually exclusive events, then P(A1 ⋃ A2 ⋃ A3… ⋃ An) =
P(A1) + P(A2 ) + ………. + P(An)
Theorems on Probability
If 𝐴 and 𝐵 are any two events in the sample space 𝑆 then
𝐴 ⊂ 𝐵 then 𝑃 𝐴 ≤ 𝑃(𝐵)
𝑃 𝐴′ = 1 − 𝑃(𝐴)
𝑃 𝐵 − 𝐴 = 𝑃 𝐵 − 𝑃(𝐴) where 𝐴 ⊂ 𝐵
𝑃 𝐴 ∩ 𝐵 ′ = 𝑃 𝐴 − 𝑃(𝐴 ∩ 𝐵)
𝑃 𝐴 ∪ 𝐵 = 𝑃 𝐴 + 𝑃 𝐵 − 𝑃(𝐴 ∩ 𝐵)
𝑃 𝐴′ ∩ 𝐵 ′ = 1 − 𝑃 𝐴′ ∩ 𝐵 ′ ′
= 1 − 𝑃(𝐴 ∪ 𝐵)
𝑃 𝐴′ ∪ 𝐵 ′ = 1 − 𝑃 𝐴′ ∪ 𝐵 ′ ′
= 1 − 𝑃(𝐴 ∩ 𝐵)
𝑃 𝐴 ∪ 𝐵 ∪ 𝐶 = 𝑃 𝐴 + 𝑃 𝐵 + 𝑃 𝐶 − 𝑃 𝐴 ∩ 𝐵 − 𝑃 𝐵 ∩ 𝐶 − 𝑃 𝐴 ∩ 𝐶 + 𝑃(𝐴 ∩ 𝐵 ∩ 𝐶)
Example1: A fair dice is thrown, then what is the probability of getting
(i) at least 4, (ii) at most 5.
Example 2: An unbiased coin is tossed 3 times. Find the probability of exactly two heads.
Example 3: A bag contains 5 white and 10 black balls. Three balls are taken out at random.
Find the probability that all three balls drawn are black.
Example 4: A bag contains 8 white, 4 red balls, now 5 balls are drawn at random find the
probability that 2 of them are white and 3 are red.
Example 5: Single throw of two dice find the probability of getting (i)Total of seven, (ii)
Total of an even number, (iii) Total of an odd number.
Example 6: If 𝐴 and 𝐵 are mutually exclusive events and 𝑃 𝐴 = 0.30 and P(B) = 0.45 then
find the probability of the following events. (a) 𝐴′ (b) 𝐴 ∩ 𝐵 (c) 𝐴 ∪ 𝐵 (d) 𝐴′ ∩ 𝐵′
Conditional probability:
Conditional probability is the probability of an event A occurring given that another event
B has already occurred.
P(A∩B)
P(A∣B) = ; 𝑃(𝐵) > 0
𝑃(𝐵)
This reads as:
"The probability of A given B equals the probability of A and B both happening divided by
the probability of B."
Note:
𝑃 𝐴∩𝐵
𝑃(𝐵|𝐴) = ;𝑃 𝐴 > 0
𝑃 𝐴
𝑃 𝐴1 ∪ 𝐴2 𝐵 = 𝑃 𝐴1 𝐵 + 𝑃 𝐴2 𝐵 − 𝑃 𝐴1 ∩ 𝐴2 𝐵 ; 𝑃 𝐵 > 0
𝑃 𝐴′ 𝐵 = 1 − 𝑃 𝐴 𝐵 ; 𝑃 𝐵 > 0
Example 7: Suppose we have a deck of 52 playing cards.
Let:
Event A: Drawing a King
Event B: Drawing a Spade
We want to find:
What is the probability that a card is a King, given that it is a Spade?
There are:
13 Spades (So, P(B)=13/52=1/4)
1 King of Spades (so P(A∩B)= 1/52
𝑃(𝐾𝑖𝑛𝑔 ∩𝑆𝑝𝑎𝑑𝑒 ) 1/52
P(King∣Spade)= =13/52 P(King∣Spade)= 1/13
P(Spade )
The Law of Total Probability
Let 𝐵1 and 𝐵2 be two mutually exclusive and exhaustive events of a sample space 𝑆 out of
which one definitely occurs and then the event 𝐴 occurs. Then the probability of the
occurrence of the event 𝐴 is
𝑃 𝐴 = 𝑃 𝐵1 𝑃 𝐴|𝐵1 + 𝑃 𝐵2 𝑃(𝐴|𝐵2 )
Graphical Representation of the Law of Total Probability:
Multiplication Rule
Let 𝑆 be a sample space, and 𝐴 and 𝐵 be any two events in 𝑆, then
𝑃 𝐴 ∩ 𝐵 = 𝑃 𝐴 𝑃 𝐵|𝐴 = 𝑃 𝐵 𝑃 𝐴|𝐵 ; 𝑃 𝐴 > 0, 𝑃 𝐵 > 0
Note
Let 𝑆 be a sample space, and 𝐴,𝐵 and 𝐶 be any three events in 𝑆, then
𝑃 𝐴 ∩ 𝐵 ∩ 𝐶 = 𝑃 𝐴 𝑃 𝐵|𝐴 𝑃(𝐶|(𝐴 ∩ 𝐵))
Bayes’ Theorem
Bayes’ Theorem is a way to update probabilities based on new information. It relates
conditional probabilities of two events.
𝑃(𝐵 ∣ 𝐴) ⋅ 𝑃(𝐴)
𝑃(𝐴 ∣ 𝐵) =
P(B)
Where:
P(A∣B) = Posterior: Probability of event A given B has occurred (updated belief)
P(B∣A) = Likelihood: Probability of B given A is true
P(A) = Prior: Initial probability of A
P(B) = Evidence: Total probability of B
Let 𝐴1 , 𝐴2 , … , 𝐴𝑛 are mutually exclusive and exhaustive events of sample space 𝑆 and 𝐵 is
any event then
𝑷 𝑨𝒊 𝑷 𝑩 𝑨𝒊
𝑷 𝑨𝒊 𝑩 =
𝑷 𝑨𝟏 𝑷 𝑩 𝑨𝟏 + 𝑷 𝑨𝟐 𝑷 𝑩 𝑨𝟐 + − − − + 𝑷 𝑨𝒏 𝑷 𝑩 𝑨𝒏
Independence and Bayes' Theorem
Two events A and B are independent if:
P(A∣B)=P(A) and P(B∣A)=P(B) ……(1)
This means happening of event B does not affect the happening of event A.
Also from the theory of Conditional probability we know that:
P(A∩B)
P(A∣B) = ……(2)
𝑃(𝐵)
From Eq.(1) and Eq.(2) we get-
P A ∩ B = P A . P(B) ……(3)
So, if two events A and B are independent then either we can use Eq.(1) or we can use Eq.(3),
both equations are equivalent.
Example-8: Suppose:
1% of people have a disease → P(D)=0.01
Test is 99% accurate →
o P(Positive∣D)=0.99 (True Positive)
o P(Positive∣No D)=0.01
o P(Positive∣No D)=0.01 (False Positive)
You test positive. What’s the probability you actually have the disease?
Solution-8: Let’s define:
D = has disease
+ = tests positive
We use Bayes’ theorem:
𝑃(+∣ 𝐷) ⋅ 𝑃(𝐷)
𝑃(𝐷 ∣ +) =
P(+)
Now compute P(+) by using the law of total probability:
P(+)=P(+∣D)⋅P(D)+P(+∣No D)⋅P(No D) =0.99⋅0.01+0.01⋅0.99=0.0099+0.0099=0.0198
Now plug into Bayes’ theorem:
P(D∣+)=0.99⋅0.010.0198=0.00990.0198=0.5
So even after testing positive, the chance you actually have the disease is only 50%.
Example-9: (Medical Test):
Let:
A: Person has disease
B: Test is positive
Suppose:
P(A)=0.01 (1% have the disease)
P(B∣A)=0.95 (95% chance test is positive if disease is present) (True Positive)
P(B∣no A)=0.05 (5% False Positive)
Then use Bayes' Theorem to calculate P(A∣B), the probability a person has the disease given
a positive test.
Solution-9: P(not A)=0.99
P(B) = P(B∣A)⋅P(A)+P(B∣not A)⋅P(not A)
Example 10: Let 𝐴 and 𝐵 be two events where 𝑃 𝐴 = 3/8 and 𝑃 𝐵 = 7/8 and 𝑃 𝐴 ∪
𝐵 = 3/4 then find 𝑃(𝐴|𝐵) and 𝑃(𝐵|𝐴) and decide which event is possible?
Solution-10:
Example 11: Let 𝐴 means the screw is too slim and 𝐵 means screw is too short. Let 𝑃 𝐴 =
0.1 and the conditional probability of screw is too short over screw is too slim is 0.2. What is
the probability that we pick any screws randomly from the lot and it will be both too slim and
too short?
Solution-11:
Example-13: In a box, 100 bulbs are supplied out of which 10 bulbs have defect of type A, 5
bulbs have defect of type B and 2 bulbs have defect of both the types. Find the probability of
(i) (𝐵|𝐴) and (ii) (𝐵|𝐴 ).
Solution-13: Given: P A = 0.1, P B = 0.05, P A ∩ B = 0.02
P(B∩A) P(A∩B) Number with both A and B 0.02 2
(i) To find: P B|A = = = = = 10 = 0.2
𝑃(𝐴) 𝑃(𝐴) Number with A 0.1
P(𝐴 ∩𝐵 )
(ii) 𝑃(𝐵|𝐴 ) = 𝑃(𝐴 )
So, to find 𝑃(𝐵|𝐴 ) we have to find P(𝐴 ∩ 𝐵 )
This is the probability that a bulb does not have defect B, given that it does not have defect A.
n A = 10, n 𝐴 = 90, 𝑛 𝐵 𝑜𝑛𝑙𝑦 = 𝑛 𝐵 − 𝑛 𝐴 𝑎𝑛𝑑 𝐵 = 3
𝐴 ∩ 𝐵 = 𝑆 − (A ∪ B)
𝑛 𝐴 ∩ 𝐵 = 𝑛 𝑆 − 𝑛 A ∪ B = 𝑛 𝑆 − 𝑛 A) + 𝑛(B − n A ∩ B = 100 − 10 + 5 − 2
= 87
P(𝐴 ∩𝐵 ) n(𝐴 ∩𝐵 ) 87 29
Hence, 𝑃(𝐵|𝐴 ) = = = 90 = 30 = 0.9667
𝑃(𝐴 ) 𝑛 (𝐴 )
Example 14: Three machines A, B and C produce 30%, 45% and 25% of the products
respectively. It is known from the past experiences that 2%, 3% and 2% of the products made
by these machines are defective respectively. Suppose that a finished product is randomly
selected then find the probability that it is defective.
Solution-14: Given: P A = 0.3, P D|A = 0.02
Hint for solution: Using the Law of Total Probability:
𝑃 𝐷 = P D|A . P A + P D|B . P B + P D|C . P C = 0.0245
Note:
Let A and B be any two events of a sample space S then A and B are called independent
if 𝑃 (𝐴 ∩ 𝐵) = 𝑃(𝐴) ∙ 𝑃(𝐵)
In the case of independent event,𝑃(𝐴|𝐵) = 𝑃(𝐴) and 𝑃(𝐵|𝐴) = 𝑃(𝐵)
Example 15: If A and B are two independent events and 𝑃(𝐴) = 3/4 and 𝑃(𝐵) = 2/3
then find P(A∪𝐵).
Solution-15: Since A and B are independent, we have:
3 2 1
P(A∩B)=P(A)⋅P(B)= 4 . 3 = 2
3 2 1 11
We know that: P(A∪B)=P(A)+P(B)−P(A∩B)= 4
+3−2 = 12
Example 16: A problem of statistics is given to 3 students 𝐴, 𝐵 and 𝐶 whose chances of
solving each are 1/3, 1/4 and 1/2 respectively. What is the probability that the problem will be
solved individually?
1
Solution-16: Given: Probability that A solves the problem = P(A)= 3
1
Probability that B solves the problem = P(B)= 4
1
Probability that C solves the problem = P(C)= 2
We are asked to find the probability that the problem is solved by at least one of them — i.e., the
problem is solved individually, meaning by any of the three students (possibly more than one).
𝑃 𝐴 𝑜𝑟 𝐵 𝑜𝑟 𝐶 = 𝑃 𝐴 ∪ 𝐵 ∪ 𝐶 = P at least one solves = 1 − P none solve
2 3 1 3
= 1 −𝑃 𝐴 ∩ 𝐵 ∩ 𝐶 = 1 − 𝑃 𝐴 .𝑃 𝐵 .𝑃 𝐶 = 1 − . . =
3 4 2 4
Example 17: Three machines 𝐴, 𝐵 and 𝐶 are producing the products independently as in the
rate of 1/5, 1/7 and 1/8. Find the probability of the product that will be produced by 𝐴 or 𝐵 or
𝐶. (Assignment: Q.5)
Solution-17: Using the inclusion-exclusion principle, and assuming that the production of the
product by machines A, B, and C is independent.
𝑃 𝐴 ∪ 𝐵 ∪ 𝐶 = 𝑃 𝐴 + 𝑃 𝐵 + 𝑃 𝐶 − 𝑃 A ∩ B − 𝑃 B ∩ C − 𝑃 C ∩ A + 𝑃 A ∩ B ∩ C = 0.4
Note-1:
What will be the answer if the production of the product by machines A, B, and C is NOT
independent?
If the production of the product by machines A, B, and C is not independent, then we
cannot use the multiplication rule for independent events (i.e., P(A∩B)=P(A)⋅P(B), etc.) —
instead, we would need more information about the joint probabilities.
You provided:
P(A)=1/5
P(B)=1/7
P(C)=1/8
And asked: What is P(A∪B∪C) without assuming independence?
General Formula for Inclusion–Exclusion Principle is:
For any three events, whether dependent or independent:
P(A∪B∪C)=P(A)+P(B)+P(C)−P(A∩B)−P(B∩C)−P(C∩A)+P(A∩B∩C)
So, to compute this without assuming independence, we must know:
P(A∩B)
P(B∩C)
P(C∩A)
P(A∩B∩C)
But since only the individual probabilities are given, and no information about the
intersections or conditional probabilities is provided, we cannot calculate an exact value
for P(A∪B∪C) in the dependent case.
Conclusion:
When A, B, and C are not independent, the probability:
P(A∪B∪C) cannot be determined from just P(A),P(B),P(C) unless you are also given:
The joint probabilities (e.g., P(A∩B), etc.),
Or the conditional probabilities (e.g., P(A∣B), etc.)
So, 𝑃 𝐴 ∪ 𝐵 ∪ 𝐶 cannot be determined without additional information on dependence.
Example 18: Three boxes contain 10%, 20% and 30% of defective joints. A joint is selected
random which is defective then determine the probability that it comes from (i) first box, (ii)
second box, (iii) third box.
Solution-18: Let the three boxes be A, B, and C.
Then 𝑃 𝐴 = 𝑃 𝐵 = 𝑃 𝐶 = 1/3 (Since a box is selected at random).
Given: 𝑃 𝐷|𝐴 = 0.1, 𝑃 𝐷|𝐵 = 0.2, 𝑃 𝐷|𝐶 = 0.3
To find: 𝑃 𝐴|𝐷 =?, 𝑃 𝐵|𝐷 =?, 𝑃 𝐶|𝐷 =?
Using Bayes’ Theorem:
𝑃 𝐷 𝐴𝑖 𝑃 𝐴𝑖
𝑃 𝐴𝑖 𝐷 =
𝑃 𝐷
𝑃 𝐷 𝐴𝑖 𝑃 𝐴𝑖
𝑃 𝐴𝑖 𝐷 = 𝑛
𝑖=1 𝑃 𝐴𝑖 𝑃 𝐷 𝐴𝑖
𝑃 𝐷 𝐴𝑖 𝑃 𝐴𝑖
𝑃 𝐴𝑖 𝐷 =
𝑃 𝐴1 𝑃 𝐷 𝐴1 + 𝑃 𝐴2 𝑃 𝐷 𝐴2 + − − − + 𝑃 𝐴𝑛 𝑃 𝐷 𝐴𝑛
𝑃 𝐷 = 𝑃 𝐷 𝐴1 𝑃 𝐴1 + 𝑃 𝐷 𝐴2 𝑃 𝐴2 + 𝑃 𝐷 𝐴3 𝑃 𝐴3 = 0.2
𝑃 𝐷𝐴 𝑃 𝐴 0.1 ∗ 1/3 1
𝑃 𝐴|𝐷 = = =
𝑃𝐷 0.2 6
Similarly
𝑃 𝐷𝐵𝑃 𝐵 1
𝑃 𝐵|𝐷 = = =
𝑃𝐷 3
𝑃 𝐷𝐶𝑃 𝐶 1
𝑃 𝐶|𝐷 = = =
𝑃𝐷 2
Example 19: Three hospitals contain 10%, 20% and 30% of diabetes patients. A Patient is
selected at random who is diabetes patient. Determine the probability that this patient comes
from first hospital.
Solution-19: This is a Bayes' Theorem problem.
Let the three hospitals be H1, H2, H3.
Example 20: In a computer engineering class, 5% of the boys and 10% of the girls have an
IQ of more than 150. In this class, 60% of students are boys. If a student is selected random
and found to have IQ more than 150, find the probability that the student is a boy.
Solution-20: