Om Namo Bhagavate Vasudevaya
23ECE205 Foundations of
Data Science
Conditional Probability- Additional Problems
Compiled by Dr. Binoy B Nair
Note
The following problems have been compiled from various NCERT
textbooks and are for practice by students only and not for any
commercial use. They do not serve as a substitute for the
textbooks/ reference books.
Topics:
1. Basics of Probability
2. Conditional Probability
3. Bayes Theorem
Compiled by Dr. Binoy B Nair
Example 1
Q. In a leap year the probability of having 53 Sundays or 53 Mondays
is ______.
Sol.
Since a leap year has 366 days and hence 52 weeks and 2 days.
The 2 days can be SM, MT, TW, WTh, ThF, FSt, StS.
Therefore, P (53 Sundays OR 53 Mondays) =3/7.
Compiled by Dr. Binoy B Nair
Example 2
Q. Three digit numbers are formed using the digits 0, 2, 4, 6, 8. A
number is chosen at random out of these numbers. What is the
probability that this number has the same digits?
Sol.
• Since a 3-digit number cannot start with digit 0, the hundredth place
can have any of the remaining 4 digits.
• Now, the tens and units place can have all the 5 digits.
• Therefore, the total possible 3-digit numbers are 4 × 5 × 5, i.e., 100.
• The total possible 3 digit numbers having all digits same = 4
• Hence, P (3-digit number with same digits) = 4/100= 1/25 .
Compiled by Dr. Binoy B Nair
Example 3
Q. Three squares of chess board are selected at random. The probability of
getting 2 squares of one colour and other of a different colour is __________
Sol.
• In a chess board, there are 64 squares of which 32 are white and 32 are
black.
• Since 2 of one colour and 1 of other can be 2W, 1B, or 1W, 2B, the
number of ways is (32C2 × 32C1) × 2 and also, the number of ways of
choosing any 3 boxes is 64C3.
• Hence, the required probability = (32C2 × 32C1 × 2 )/ 64C3 =16/21
Compiled by Dr. Binoy B Nair
Example 4
Q Suppose that each child born is equally likely to be a boy or a girl.
Consider a family with exactly three children.
(a) List the eight elements in the sample space whose outcomes
are all possible genders of the three children.
(b) Write each of the following events as a set and find its
probability :
(i) The event that exactly one child is a girl.
(ii) The event that at least two children are girls
(iii) The event that no child is a girl
Compiled by Dr. Binoy B Nair
Example 4
Sol.
(a) All possible genders are expressed as :
S = {BBB, BBG, BGB, BGG, GBB,GBG, GGB, GGG}
(b)
(i)Let A denote the event : ‘exactly one child is a girl’
A = {BBG, BGB, GBB}
Hence P (A) = 3/8
(ii) Let B denote the event that at least two children are girls.
B = {GGB, GBG, BGG, GGG}
Hence P (B) = 4/ 8.
(iii) Let C denote the event : ‘no child is a girl’.
C = {BBB}
Hence P (C) = 1/8
Compiled by Dr. Binoy B Nair
Example 5
Q. (a) How many two-digit positive integers are multiples of 3?
(b) What is the probability that a randomly chosen two-digit positive
integer is a multiple of 3?
Sol.
(a) 2 digit positive integers which are multiples of 3 are 12, 15, 18, ... , 99.
Thus, there are 30 such integers.
(b) 2-digit positive integers are 10, 11, 12, ... , 99. Thus, there are 90 such
numbers.
Since out of these, 30 numbers are multiple of 3, therefore, the
probability that a randomly chosen positive 2-digit integer is a multiple of
3, is 30/90 = 1/3
Compiled by Dr. Binoy B Nair
Example 6
Q. A typical PIN (personal identification number) is a sequence of any
four symbols chosen from the 26 letters in the alphabet and the ten
digits. If all PINs are equally likely, what is the probability that a randomly
chosen PIN contains a repeated symbol?
Sol.
A PIN is a sequence of four symbols selected from 36 (26 letters + 10
digits) symbols.
By the fundamental principle of counting, there are 36 × 36 × 36 × 36 =
364 = 1,679,616 PINs in all.
When repetition is not allowed the multiplication rule can be applied to
conclude that there are 36 × 35 × 34 × 33 = 1,413,720 different PINs
Compiled by Dr. Binoy B Nair
Example 6
Sol. Contd..
The number of PINs that contain at least one repeated symbol
= 1,679,616 – 1,413,720 = 2,65,896
Thus, the probability that a randomly chosen PIN contains a
repeated symbol is:
265,896/1,679,616 = 0.1583
Compiled by Dr. Binoy B Nair
Example 7
Q. Probability that a truck stopped at a roadblock will have faulty brakes or
badly worn tires are 0.23 and 0.24, respectively. Also, the probability is 0.38
that a truck stopped at the roadblock will have faulty brakes and/or badly
working tires. What is the probability that a truck stopped at this roadblock
will have faulty breaks as well as badly worn tires?
Sol.
Let B be the event that a truck stopped at the roadblock will have faulty
brakes and T be the event that it will have badly worn tires.
We have P (B) = 0.23, P (T) = 0.24 and P (B U T) = 0.38
and P (B U T) = P (B) + P (T) – P (B ∩ T)
So 0.38 = 0.23 + 0.24 – P (B ∩ T)
Hence P (B ∩ T) = 0.23 + 0.24 – 0.38 = 0.09
Compiled by Dr. Binoy B Nair
Example 8
Q. If a person visits his dentist, suppose the probability that he will
have his teeth cleaned is 0.48, the probability that he will have a
cavity filled is 0.25, the probability that he will have a tooth
extracted is 0.20, the probability that he will have a teeth cleaned
and a cavity filled is 0.09, the probability that he will have his teeth
cleaned and a tooth extracted is 0.12, the probability that he will
have a cavity filled and a tooth extracted is 0.07, and the probability
that he will have his teeth cleaned, a cavity filled, and a tooth
extracted is 0.03. What is the probability that a person visiting his
dentist will have at least one of these things done to him?
Compiled by Dr. Binoy B Nair
Example 8
Sol.
Let C be the event that the person will have his teeth cleaned and F and E
be the event of getting cavity filled or tooth extracted, respectively.
We are given
P(C) = 0.48, P (F) = 0.25, P (E) = 0.20, P (C∩F) = 0.09,
P (C ∩ E) = 0.12, P (E ∩ F) = 0.07 and P (C ∩ F ∩ E) = 0.03
Now, P(C U F U E)=P(C)+P(F)+P(E)–P(C∩F)–P(C∩E)–P(F∩E)+P(C∩F∩E)
= 0.48 + 0.25 + 0.20 – 0.09 – 0.12 – 0.07 + 0.03
= 0.68
Compiled by Dr. Binoy B Nair
Example 9
Q. A pot contains twenty white slips of paper numbered from 1 through
20, ten red slips of paper numbered from 1 through 10, forty yellow slips
of paper numbered from 1 through 40, and ten blue slips of paper
numbered from 1 through 10. If these 80 slips of paper are thoroughly
shuffled so that each slip has the same probability of being drawn. Find
the probabilities of drawing a slip of paper that is:
(a) blue or white
(b) numbered 1, 2, 3, 4 or 5
(c) red or yellow and numbered 1, 2, 3 or 4
(d) numbered 5, 15, 25, or 35;
(e) white and numbered higher than 12 or yellow and numbered higher
than 26.
Compiled by Dr. Binoy B Nair
Example 9
Sol.
(a) P (Blue or White) = P(Blue) + P(White)
= 10/80 + 20/80 = 30/80 = 3/8
(b) P (numbered 1, 2, 3, 4 or 5) = P (1 of any colour) + P (2 of any colour) +
P (3 of any colour) + P (4 of any colour) + P (5 of any colour)
= 4/80 + 4/ 80 +4/ 80 + 4/80 + 4/ 80
= 20/ 80 = 2/8 = 1/4
(c) P (Red or yellow and numbered 1, 2, 3 or 4) = P (Red numbered 1, 2, 3
or 4) + P (yellow numbered 1, 2, 3 or 4)
=4/80+4/80= 8/80= 1/10
Compiled by Dr. Binoy B Nair
Example 9
(d) P (numbered 5, 15, 25 or 35)
= P (5) + P (15) + P (25) + P (35)
= P (5 of White, Red, Yellow, Blue)+P(15 of White, Yellow)+P(25 of
Yellow)+P(35 of Yellow)
= 4/80+ 2/80+1/80+1/80= 8/80= 1/10
(e) P (White and numbered higher than 12 or Yellow and numbered higher
than 26)
= P (White and numbered higher than 12) + P (Yellow and numbered
higher than 26)
= 8/80 +14/ 80 +22/ 80 =11/40
Compiled by Dr. Binoy B Nair
Example 10
Q. A and B are two candidates seeking admission in a college. The probability
that A is selected is 0.7 and the probability that exactly one of them is selected
is 0.6. Find the probability that B is selected.
Sol. Let p be the probability that B gets selected.
P (Exactly one of A, B is selected) = 0.6 (given)
P (A is selected, B is not selected; B is selected, A is not selected) = 0.6
P (A∩B’)+P(A’∩B) = 0.6
P (A)P(B’) + P(A’) P(B) = 0.6
(0.7) (1 – p) + (0.3) p = 0.6
Hence p = 0.25
Thus, the probability that B gets selected is 0.25.
Compiled by Dr. Binoy B Nair
Example 11
Q. The probability of simultaneous occurrence of at least one of two events A and B is p. If the
probability that exactly one of A, B occurs is q, then prove that P (A’)+P(B’) = 2 – 2p + q.
Sol. Since P (exactly one of A, B occurs) = q (given), we get
P (AUB) – P(A∩B) = q
p – P (A∩B) = q
P (A∩B) = p – q
1 – P (A’U B’) = p – q
P (A’UB’) = 1 – p + q
P (A’) + P (B’) – P (A’∩ B’) = 1 – p + q
P (A’) + P (B’) = (1 – p + q) + P (A’∩ B’)
= (1 – p + q) + (1 – P (AUB))
= (1 – p + q) + (1 – p)
= 2 – 2p + q.
Compiled by Dr. Binoy B Nair
Example 12
Q. 10% of the bulbs produced in a factory are of red colour and 2%
are red and defective. If one bulb is picked up at random, determine
the probability of its being defective if it is red.
Sol.
Let A and B be the events that the bulb is red and defective,
respectively.
P (A) = 10/100 =1/10
P (A∩B)= 2/100= 1/50
P(B|A)= P (A∩B)/P(A) =(1/50)/(1/10) =1/5
Compiled by Dr. Binoy B Nair
Example 13
Q. Two dice are thrown together. Let A be the event ‘getting 6 on the first die’ and B be
the event ‘getting 2 on the second die’. Are the events A and B independent?
Sol.
A = {(6, 1), (6, 2), (6, 3), (6, 4), (6, 5), (6, 6)}
B = {(1, 2), (2, 2), (3, 2), (4, 2), (5, 2), (6, 2)}
A ∩ B = {(6, 2)}
P(A) = 6/36 =1/6
P(B) = 1/ 6
P(A∩B) =1/36
Events A and B will be independent if P (A ∩B) = P(A) P(B)
i.e., LHS=P(A∩B) , RHS = P(A) P(B) =1/6*1/6=1/36
Hence, A and B are independent.
Compiled by Dr. Binoy B Nair
Example 14
Q. A committee of 4 students is selected at random from a group consisting 8 boys and 4 girls.
Given that there is at least one girl on the committee, calculate the probability that there are
exactly 2 girls on the committee.
Sol.
Let A denote the event that at least one girl will be chosen, and B the event that exactly 2 girls
will be chosen. We require P (B | A).
Since A denotes the event that at least one girl will be chosen, A’ denotes that no girl is chosen,
i.e., 4 boys are chosen.
Then
P(A’) = 8C4 / 12C4 = 70/495 = 14/99
Hence, P(A) =1-P(A’) = 1-14/99 = 85/99
Now P (A ∩ B) = P (2 boys and 2 girls) = 8C4 * 4C2 / 12C4 = 6*28/495 =56/165
Thus P (B|A) =P(A∩B)/ P(A) = 56/165* 99/85= 168/425
Compiled by Dr. Binoy B Nair
Example 15
Q. A car manufacturing factory has two plants, X and Y. Plant X
manufactures 70% of cars and plant Y manufactures 30%. 80% of
the cars at plant X and 90% of the cars at plant Y are rated of
standard quality. A car is chosen at random and is found to be of
standard quality. What is the probability that it has come from plant
X?
Compiled by Dr. Binoy B Nair
Example 15
Sol. Let E be the event that the car is of standard quality. Let B1 and B2 be the events that
the car is manufactured in plants X and Y, respectively. Now
70 7
𝑃(𝐵1) = =
100 10
30 3
𝑃(𝐵2) = =
100 10
80 8
𝑃(𝐸|𝐵1) = Probability that a standard quality car is manufactured in plant = =
100 10
90 9
𝑃(𝐸|𝐵2) = =
100 10
𝑃(𝐵1|𝐸) = Probability that a standard quality car has come from plant X
7 8
𝑃 𝐵1 ∗ 𝑃 𝐸 𝐵1 ∗ 𝟓𝟔
= = 10 10 =
𝑃 𝐵1 ∗ 𝑃 𝐸 𝐵1 + 𝑃 𝐵2 ∗ 𝑃 𝐸 𝐵2 7 8 3 9 𝟖𝟑
∗ + ∗
10 10 10 10
Compiled by Dr. Binoy B Nair
Example 16
Q. Let A and B be two events. If P (A) = 0.2, P (B) = 0.4, P (AUB) = 0.6,
then P (A | B) is equal to ________
Sol.
From the given data P (A) + P (B) = P (AUB).
This shows that P (A∩B) = 0.
𝑃 𝐴∩𝐵
Thus 𝑃(𝐴|𝐵) = = 𝟎
𝑃 𝐵
Compiled by Dr. Binoy B Nair
Example 17
Q. Let A and B be two events such that P (A) = 0.6, P (B) = 0.2, and P
(A|B) = 0.5. Then P (A’|B’) equals ______
Sol.
𝑃(𝐴 ∩ 𝐵) = 𝑃(𝐴|𝐵)𝑃(𝐵) = 0.5 × 0.2 = 0.1
𝑃 𝐴’∩𝐵’ 𝑃 𝐴𝑈𝐵’ 1– 𝑃 𝐴𝑈𝐵
𝑃 𝐴’ 𝐵’ = = =
𝑃 𝐵 𝑃 𝐵’ 1– 𝑃 𝐵
1– 𝑃 𝐴 – 𝑃 𝐵 + 𝑃 𝐴∩𝐵 𝟑
= =
1– 0.2 𝟖
Compiled by Dr. Binoy B Nair
Example 18
Q. Ten cards numbered 1 to 10 are placed in a box, mixed up thoroughly and
then one card is drawn randomly. If it is known that the number on the drawn
card is more than 3, what is the probability that it is an even number?
Sol. Let A be the event ‘the number on the card drawn is even’ and B be the
event ‘the number on the card drawn is greater than 3’. We have to find P(A|B).
• Now, the sample space of the experiment is S = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}
• Then A = {2, 4, 6, 8, 10}, B = {4, 5, 6, 7, 8, 9, 10}
• And A ∩ B = {4, 6, 8, 10}
• Also P(A) = 5/10 , P(B) = 7/10 and P(A∩B)= 4/10
4
𝑃 𝐴∩𝐵
• Then 𝑃(𝐴|𝐵) = = 10
7 = 𝟒/𝟕
𝑃 𝐵
10
Compiled by Dr. Binoy B Nair
Example 19
Q. A die is thrown three times. Events A and B are defined as below:
• A : 4 on the third throw
• B : 6 on the first and 5 on the second throw
• Find the probability of A given that B has already occurred.
Sol. The sample space has 216 outcomes.
(1,1,4) (1,2,4) ... (1,6,4) (2,1,4) (2,2,4) ... (2,6,4)
Now 𝐴 = (3,1,4) (3,2,4) ... (3,6,4) (4,1,4) (4,2,4) ...(4,6,4)
(5,1,4) (5,2,4) ... (5,6,4) (6,1,4) (6,2,4) ...(6,6,4)
B = {(6,5,1), (6,5,2), (6,5,3), (6,5,4), (6,5,5), (6,5,6)}
And A ∩ B = {(6,5,4)}.
6 1
Now 𝑃 𝐵 = and 𝑃(𝐴 ∩ 𝐵) =
216 1 216
𝑃 𝐴∩𝐵 1
Then 𝑃 𝐴 𝐵 = = 216
6 =
𝑃(𝐵) 6
216
Compiled by Dr. Binoy B Nair
Example 20
Q. A die is thrown twice and the sum of the numbers appearing is observed to be 6. What is the
conditional probability that the number 4 has appeared at least once?
Sol. Let E be the event that ‘number 4 appears at least once’ and F be the event that ‘the sum
of the numbers appearing is 6’.
Then, E = {(4,1), (4,2), (4,3), (4,4), (4,5), (4,6), (1,4), (2,4), (3,4), (5,4), (6,4)}
and F = {(1,5), (2,4), (3,3), (4,2), (5,1)}
We have P(E) =11/36 and P(F) = 5/36
Also E∩F = {(2,4), (4,2)}
Therefore P(E∩F) =2/36
Hence, the required probability
2
𝑃 𝐸∩𝐹 36 𝟐
𝑃 𝐸𝐹 = = 5 =
𝑃 𝐹 𝟓
36
Compiled by Dr. Binoy B Nair
Example 21
Q. Three cards are drawn successively, without replacement from a pack of 52 well-shuffled
cards. What is the probability that first two cards are kings and the third card drawn is an ace?
Sol. Let K denote the event that the card drawn is king and A be the event that the card drawn is
an ace. Clearly, we have to find P (KKA)
Now P(K) = 4/52
Also, P(K|K) is the probability of second king with the condition that one king has already been
drawn. Now there are three kings in (52−1) = 51 cards.
Therefore P(K|K) = 3/ 51
Lastly, P(A|KK) is the probability of third drawn card to be an ace, with the condition that two
kings have already been drawn. Now there are four aces in left 50 cards.
Therefore P(A|KK) = 4/ 50
By multiplication law of probability, we have
4 3 4 𝟐
𝑃 𝐾𝐾𝐴 = 𝑃 𝐾 ∗ 𝑃 𝐾 𝐾 ∗ 𝑃 𝐴 𝐾𝐾 = ∗ ∗ =
52 51 50 𝟓𝟓𝟐𝟓
Compiled by Dr. Binoy B Nair
Example 22
Q. An unbiased die is thrown twice. Let the event A be ‘odd number on
the first throw’ and B the event ‘odd number on the second throw’. Check
the independence of the events A and B.
Sol. If all the 36 elementary events of the experiment are considered to
be equally likely, we have
• P(A) = 18/ 36 = ½ and P(B)=18/ 36=1/2
• Also P(A∩B) = P (odd number on both throws)
= 9/36 =1/4
• Now P(A)*P(B)= ½*½ = ¼
• Clearly P(A∩B) = P(A) × P(B)
• Thus, A and B are independent events
Compiled by Dr. Binoy B Nair
Example 23
Q. A person has undertaken a construction job. The probabilities are 0.65 that there will be
strike, 0.80 that the construction job will be completed on time if there is no strike, and 0.32
that the construction job will be completed on time if there is a strike. Determine the
probability that the construction job will be completed on time.
Sol. Let A be the event that the construction job will be completed on time, and B be the event
that there will be a strike. We have to find P(A).
We have
P(B) = 0.65, P(no strike) = P(B’) = 1 − P(B) = 1 − 0.65 = 0.35
P(A|B) = 0.32, P(A|B’) = 0.80
Since events B and B’ form a partition of the sample space S, therefore, by theorem on total
probability, we have
P(A) = P(B) P(A|B) + P(B’) P(A|B’)
= 0.65 × 0.32 + 0.35 × 0.8
= 0.208 + 0.28 = 0.488
Thus, the probability that the construction job will be completed in time is 0.488.
Compiled by Dr. Binoy B Nair
Example 24
Q. Bag I contains 3 red and 4 black balls while another Bag II contains 5 red and 6 black balls.
One ball is drawn at random from one of the bags and it is found to be red. Find the probability
that it was drawn from Bag II.
Sol. Let E1 be the event of choosing the bag I, E2 the event of choosing the bag II and A be the
event of drawing a red ball.
Then P(E1) = P(E2) = 1/2
Also P(A|E1) = P(drawing a red ball from Bag I) = 3/7
and P(A|E2) = P(drawing a red ball from Bag II) = 5/ 11
Now, the probability of drawing a ball from Bag II, being given that it is red, is P(E2|A)
By using Bayes' theorem, we have
1 5
𝑃 𝐸2 𝑃 𝐴 𝐸2 ∗ 𝟑𝟓
2 11
𝑃 𝐸2 𝐴 = = =
𝑃 𝐸1 𝑃 𝐴 𝐸1 + 𝑃 𝐸2 𝑃 𝐴 𝐸2 1 3 1 5 𝟔𝟖
∗ + ∗
2 7 2 11
Compiled by Dr. Binoy B Nair
Example 25
Q. Given three identical boxes I, II and III, each containing two coins. In box I, both coins are gold coins, in box II,
both are silver coins and in the box III, there is one gold and one silver coin. A person chooses a box at random
and takes out a coin. If the coin is of gold, what is the probability that the other coin in the box is also of gold?
Sol. Let E1, E2 and E3 be the events that boxes I, II and III are chosen, respectively.
Then P(E1) = P(E2) = P(E3) = 1/3
Also, let A be the event that ‘the coin drawn is of gold’
Then P(A|E1) = P(a gold coin from bag I) = 2/2 = 1
P(A|E2) = P(a gold coin from bag II) = 0
P(A|E3) = P(a gold coin from bag III) = 1/2
Now, the probability that the other coin in the box is of gold
= the probability that gold coin is drawn from the box I.
= P(E1|A)
By Bayes' theorem, we know that
1
𝑃 𝐸1 𝑃 𝐴 𝐸1 ∗1 2
𝑃 𝐸1 𝐴 = = 3 =
𝑃 𝐸1 𝑃 𝐴 𝐸1 + 𝑃 𝐸2 𝑃 𝐴 𝐸2 + 𝑃 𝐸3 𝑃 𝐴 𝐸3 1 1 1 1 3
3∗1+3∗0+3∗2
Compiled by Dr. Binoy B Nair
Example 26
Q. A man is known to speak truth 3 out of 4 times. He throws a die and reports that it is a six. Find the probability that it is actually a six.
Sol. Let E be the event that the man reports that six occurs in the throwing of the die and let S1 be the event that six occurs and S2 be
the event that six does not occur.
Then P(S1) = Probability that six occurs = 1/ 6
P(S2) = Probability that six does not occur = 5/6
P(E|S1) = Probability that the man reports that six occurs when six has actually occurred on the die
= Probability that the man speaks the truth =3/ 4
P(E|S2) = Probability that the man reports that six occurs when six has not actually occurred on the die
= Probability that the man does not speak the truth = 1-3/4 =1/4
Thus, by Bayes' theorem, we get
P(S1|E) = Probability that the report of the man that six has occurred is actually a six:
𝑃 𝑆 𝑃 𝐸𝑆
=
𝑃 𝑆 𝑃 𝐸 𝑆 +𝑃 𝑆 𝑃 𝐸 𝑆
1 3
∗ 1 24 3
= 6 4 = ∗ =
1 3 5 1 8 8 8
∗ + ∗
6 4 6 4
Hence, the required probability is 3/8
Compiled by Dr. Binoy B Nair