Chapter #2
Chapter #2
Chapter #2
Institute of Technology
"March 2024"
1
Contents
2. Introduction to Probability .......................................................................................................... 3
2
2. Introduction to Probability
What is probability?
What is an experiment?
➔ In a given random experiment, there exists an outcome, sample space, and an event.
→ Sample space: The set of all possible outcomes of a random experiment is known as
the sample space of the experiment and is usually denoted by S (or Ω). If S contains
only a finite number of elements, it is termed a finite sample space. If S contains a
countable number of elements, S may be called a countable sample space or discrete
sample space. Otherwise, S is called an uncountable sample space.
→ Event: Any subset of the sample space, and usually denoted by an upper-case English
alphabet such as A, B, C, …, Z.
3
Example 1: Tossing a coin and getting a head. In this experiment;
Number of event 1
P(getting a head) = =
Number of sample space 2
Exercise 1: In flipping two coins simultaneously, find the probability of the following.
(a) Getting at least one head, (b) Getting at most one head
Exercise 2: Find the probability of getting the sum of the faces is five in rolling two dice
simultaneously.
Example 2: Suppose a study is conducted on all families with one or two children. The possible
outcomes, in the order of births, are: boy only, girl only, boy and girl, girl and boy, both are boys
and both are girls. Then, the sample space is S = {b, g, bg, gb, bb, gg}. It is also a finite sample
space. Here, ‘b’ represents the child is a boy, and ‘g’ represents the child is a girl.
→ In this example, the event that the eldest child in the families is a girl is represented as:
A = {g, gb, gg}
→ The event that the families have one boy is represented as B = {b, bg}.
Example 3: Consider a certain bag contains 4 blue marbles, 5 red marbles, 1 green marble, and 2
black marbles inside. Suppose you select one marble at random, find the probability of getting the
following marbles.
a) Black d) Blue
4
Directions (Examples 4 - 6): An urn contains some balls colored white, blue and green. The
probability of choosing a white ball is 4/15 and the probability of choosing a green ball is
2/5. There are 10 blue balls.
Solution:
Solution
Probability of choosing one blue ball is 1/3 and total blue balls are 10. So with 10/30, we get
probability as 1/3. So total balls must be 30.
5
Example 6: If the balls are numbered 1, 2, …. up to number of balls in the urn, what is the
probability of choosing a ball containing a multiple of 2 or 3?
Solution
There are 30 balls in the urn. Multiples of 2 up to 30 = 30/2 = 15. Multiples of 3 up to 30 = 30/3 =
10 (take only whole number before the decimal part)
Or,
15 10 5 20 2
P(2or3) = P(2) + P(3) − P(2 and 3) = + − = =
30 30 30 30 3
Example 8: Amen has five identical toys and one of them is underweight. His brother, Kaleb,
chooses one of these toys at random. Find the probability for Kaleb to choose an underweight toy.
Solution
It is seen from the figure above that, the sample space is given as S = {a1 , a2 , a3 , a4 , a5 }. The
events are A1, A2, A3, A4 and A5.
n(A) 1
Let A is Kaleb chooses the underweight toy, then: P(A) = =5
n(S)
1
Therefore, the probability for Kaleb to choose an underweight toy is 5.
Exercise 3: If 2 dice are thrown simultaneously, determine the probability of getting the following
events.
6
→ The sum of numbers on the two dice is 13
→ The first die is 7?
→ The sum of the numbers on the two dice is an even number?
→ Two or more events are said to be mutually exclusive when the occurrence of any one
event excludes the occurrence of another event.
→ Mutually exclusive events cannot occur simultaneously.
→ In particular, events A and B are said to be mutually exclusive if they are disjoint, that
is, A ∩ B = Ø.
Example: Consider the case of rolling a die. Let A = {1, 2, 3} and B = {4, 5, 6} be two events.
Then we find A ∩ B = Ø. Hence A and B are said to be mutually exclusive events.
Example 1: If we roll a red die and then roll a white die, the outcome of the second die roll is not
influenced by the first. These two events are independent.
Example 2: If we roll a die and then flip a coin, the outcome of the coin flip is not influenced by
the die roll. These two events are independent.
Example 3: If we draw a card from a deck, and then draw a second card (without replacing the
first card), the outcome of the second draw is dependent on the first draw.
➔ For two independent experiments, each with an associated event, the probability of both
events occurring is the product of the probabilities of each of the events. For a sequence of
7
multiple independent experiments, each with an associated event, the probability of all the
events occurring is the product of the probabilities of each of the events.
Example 4: Suppose we roll a die and flip a coin. What is the probability of rolling a 6 and flipping
heads?
1
These two experiments are independent. The probability of rolling a 6 is 6, and the
1
probability of flipping heads is 2. Hence, the probability of both happening is:
1 1 1
( )( ) =
6 2 12
Example 5: Suppose we roll a die, flip a coin, and draw a card from a deck. What is the probability
of rolling a 1, flipping tails, and drawing the number 2 of hearts?
1
These three experiments are independent. The probability of rolling a 1 is 6. The probability
1 1
of flipping tails is 2. The probability of drawing the number 2 of hearts is . Hence, the
52
probability of all three events occurring is:
1 1 1 1
( )( )( ) =
6 2 52 624
➔ In general, two events A and B are said to be independent of one another, if P(A ∩ B) =
P(A)P(B).
➔ For any two events A and B of a random experiment, if P(A/B) = P(A), then knowledge of
event B does not change the probability of the occurrence of event A. Such events are called
independent events.
From conditional probability, we have:
P(A ∩ B) = P(A)P(B)
P(A|B) = = P(A)
P(B) P(B)
Similarly, P(B|A) = P(B) also indicates the independence of the events A and B.
8
Note: Consider the events A1, A2, …, An,
a) If they are mutually exclusive, then;
n n
P (⋃ Ai ) = ∑ P(Ai )
i=1 i=1
P (⋂ Ai ) = ∏ P(Ai )
i=1 i=1
Example 6: In tossing a fair coin twice, let the events A and B be defined as A: getting head on
the first toss, B: getting head on the second toss. Prove that A and B are independent events.
Solution:
The event of getting heads in both the tosses is represented by A ∩ B. The outcome of the
experiment in favor of the occurrence of this event is HH. Hence, P(A ∩ B) = 1/4.
P(A ∩ B) = P(A)P(B) holds true. Thus, events A and B are independent events.
Example 7: In the experiment of rolling a pair of dice, the events A, B, and C are defined as A:
getting 2 on the first die, B: getting 2 on the second die, and C: sum of the faces of dice is an even
number. Prove that the events are pairwise independent but not mutually independent.
Solution
S = {(1,1), (1,2), (1,3), (1,4), (1,5), (1,6), (2,1), (2,2), (2,3), (2,4), (2,5), (2,6), (3,1), (3,2), (3,3),
(3,4), (3,5), (3,6), (4,1), (4,2), (4,3), (4,4), (4,5), (4,6), (5,1), (5,2), (5,3), (5,4), (5,5), (5,6), (6,1),
(6,2), (6,3), (6,4), (6,5), (6,6)}
n(S) = 36
The outcomes which are favorable to the occurrence of these events can be listed below:
9
B = {(1,2), (2,2), (3,2), (4,2), (5,2), (6,2)}; n(B) = 6
C = {(1,1), (1,3), (1,5), (2,2), (2,4), (2,6), (3,1), (3,3), (3,5), (4,2), (4,4), (4,6), (5,1), (5,3), (5,5),
(6,2), (6,4), (6,6)}; n (C) = 18, P(C) = 18/36 = 1/2
Hence, the above relations show that when the events A, B, and C are considered in pairs, they are
independent. But, when all three events are considered together, they are not independent.
10
2.4. Axiomatic Approachs to Probability
Let S be the sample space of a random experiment. If a number P(A) assigned to each event A ∈
S satisfies the following axioms, then P(A) is called the probability of A.
→ Axiom-1: P (A) ≥ 0
→ Axiom-2: P (S) = 1
→ Axiom-3: If {A1, A2, …} is a sequence of mutually exclusive events i.e., Ai ∩ Aj = ϕ
when i ≠ j, then:
Axiom-3 also holds for a set of a finite number of mutually exclusive events. If A1, A2 … , and An
are mutually exclusive events in S and ‘n’ is a finite positive integer, then P(A1 ∪ A2 … An ) =
P(A1 ) + P(A2 ) + … + P(An )
Proof:
Hence, P(ϕ) = 0
Theorem 2: If S is the sample space and A is any event of the experiment, then
̅) = 1 − P(A)
P(A
Proof:
P(B) – P(A) ≥ 0
11
2.6. Conditional Probability
P(A ∩ B)
P(A|B) = for P(B) > 0
P(B)
Similarly,
P(B ∩ A)
P(B|A) = for P(A) > 0
P(A)
Example 1: A number is selected randomly from the digits 11 through 19. Consider the events
are given as: A = {11, 14, 16, 18, 19}, B = {12, 14, 18, 19}, C = {13, 15, 18, 19},
→ P(A/B)
→ P(A/C)
→ P(B/C)
→ P (B/A)
Solution
Given: A = {11, 14, 16, 18, 19}, B = {12, 14, 18, 19}, C = {13, 15, 18, 19}
5 4
P(A) = , P(B) =
9 9
3 2
P(A ∩ B) = , P(A ∩ C) = P(B ∩ C) =
9 9
Therefore, the probability for the occurrence of A given that B has occurred is:
P(A ∩ B) 3
P(A|B) = =
P(B) 4
The probability for the occurrence of A given that C has occurred is:
P(A ∩ C) 1
P(A|C) = =
P(C) 2
12
Similarly, the conditional probability of B given C is:
P(B ∩ C) 1
P(B|C) = =
P(C) 2
P(B ∩ A) 3
P(B|A) = =
P(A) 5
Example 2: A pair of dice is rolled and the faces are noted. Let A be the sum of the faces is odd, B
be the sum of the faces exceeds 8, and C be the faces are different, then find (i) P (A/C) (ii) P (B/C).
Solution:
A = {(1,2), (1,4), (1,6), (2,1), (2,3), (2,5), (3,2), (3,4), (3,6), (4,1), (4,3), (4,5), (5,2), (5,4), (5,6),
(6,1), (6,3), (6,5)}
B = {(3,6), (4,5), (4,6), (5,4), (5,5), (5,6), (6,3), (6,4), (6,5), (6,6)}
C = {(1,2), (1,3), (1,4), (1,5), (1,6), (2,1), (2,3), (2,4), (2,5), (2,6), (3,1), (3,2), (3,4), (3,5), (3,6),
(4,1), (4,2), (4,3), (4,5), (4,6), (5,1), (5,2), (5,3), (5,4), (5,6), (6,1), (6,2), (6,3), (6,4), (6,5)}
Hence, the probability for the sum of the faces is an odd number given that the faces are different
is given by:
13
Similarly, the probability for the sum of the faces exceeds 8 given that the faces are different is
Exercise
[1] In rolling a die, consider the events are: A = {1, 2, 3, 4, 5}, and B = {3, 4, 5, 6}, find
P(A|B).
[2] A six-sided die is rolled, find the probability of getting the number is 5 given that an odd
number has occurred.
[3] Suppose two six-sided dice are rolled. What is the probability of the event that the sum of
the two dice is 7 given that the first die is 4?
➔ The conditional probabilities also must satisfy the same axioms introduced earlier.
➔ If S is the sample space of a random experiment and B is an event in the experiment, then
→ Axiom 1: P(A/B) ≥ 0 for any event A of S.
→ Axiom 2: P(S/B) = 1
→ Axiom 3: If A1, A2, … is a sequence of mutually exclusive events, then
➔ In statistics and probability theory, the “Bayes’ theorem” which is also known as the
“Bayes’ rule” is a mathematical formula used to determine the conditional probability of
events.
➔ Essentially, 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 the English
statistician, Thomas Baye.
➔ The conditional probability for two events A and B are given in the earlier section:
𝑃(𝐴 ∩ 𝐵)
𝑃(𝐴|𝐵) = 𝑓𝑜𝑟 𝑃(𝐵) > 0
𝑃(𝐵)
𝑃(𝐴 ∩ 𝐵) = 𝑃(𝐵)𝑃(𝐴|𝐵) … … … … … … … … … . . … (1)
14
And similarly,
𝑃(𝐵 ∩ 𝐴)
𝑃(𝐵|𝐴) = 𝑓𝑜𝑟 𝑃(𝐴) > 0
𝑃(𝐴)
𝑃(𝐵 ∩ 𝐴) = 𝑃(𝐴 ∩ 𝐵) = 𝑃(𝐴)𝑃(𝐵|𝐴) … … … … . . (2)
𝑃(𝐵 ∩ 𝐴) 𝑃(𝐴 ∩ 𝐵)
𝑃(𝐵|𝐴) = = … … … … … … . . (3)
𝑃(𝐴) 𝑃(𝐴)
𝑃(𝐴 ∩ 𝐵) 𝑃(𝐵)𝑃(𝐴|𝐵)
𝑃(𝐵|𝐴) = = … … … … … (4)
𝑃(𝐴) 𝑃(𝐴)
Similarly,
𝑃(𝐴 ∩ 𝐵) 𝑃(𝐴)𝑃(𝐵|𝐴)
𝑃(𝐴|𝐵) = = … … … … . . (5)
𝑃(𝐵) 𝑃(𝐵)
Where; 𝑃(𝐴|𝐵) – Probability of event A occurring given that event B has occurred
In probability theory, the law of total probability is a useful way to find the probability of some
event A when we don’t directly know the probability of A but we do know that events B1, B2, B3…
form a partition of the sample space S.
➔ The law states that; If B1, B2, B3… form a partition of the sample space S, then we can
calculate the probability of event A as:
15
Or,
Example 1: Suppose there are two bags in a box, which contain the following marbles:
If we randomly select one of the bags and then randomly select one marble from that bag, what is
the probability that it’s a green marble?
16
Solution
In this example, let P(G) = probability of choosing a green marble. This is the probability that
we’re interested in, but we can’t compute it directly.
Instead we need to use the conditional probability of G, given some events B where the Bi‘s form
a partition of the sample space S. In this example, we have the following conditional probabilities:
Thus, using the law of total probability we can calculate the probability of choosing a green marble
as:
→ P(G) = Σ{P(G|Bi)*P(Bi)}
→ P(G) = P(G|B1)*P(B1) + P(G|B2)*P(B2)
→ P(G) = (0.3)*(0.5) + (0.8)*(0.5) = 0.55
Hence, If we randomly select one of the bags and then randomly select one marble from that bag,
the probability we choose a green marble is 0.55.
Example 2: Company A supplies 80% of widgets for a car shop and only 1% of their widgets turn
out to be defective. Company B supplies the remaining 20% of widgets for the car shop and 3%
of their widgets turn out to be defective.
If a customer randomly purchases a widget from the car shop, what is the probability that it will
be defective?
17
Solution
If we let P(D) = the probability of a widget being defective and P(Bi) be the probability that the
widget came from one of the companies, then we can compute the probability of buying a defective
widget as:
→ P(D) = ΣP(D|Bi)*P(Bi)
→ P(D) = P(D|B1)*P(B1) + P(D|B2)*P(B2)
→ P(D) = (0.01)*(0.80) + (0.03)*(0.20)
→ P(D) = 0.014
If we randomly buy a widget from this car shop, the probability that it will be defective is 0.014.
Solution:
𝐏(𝐀) = 𝟎. 𝟕 − − − 𝐏(𝐅|𝐀) = 𝟎. 𝟎𝟐
𝐏(𝐁) = 𝟎. 𝟏𝟖 − − − 𝐏(𝐅|𝐁) = 𝟎. 𝟏
𝐏(𝐂) = 𝟎. 𝟏𝟐 − − − 𝐏(𝐅|𝐂) = 𝟎. 𝟏𝟖
Question: 𝐏(𝐁|𝐅) = ?
18
(𝟎. 𝟏𝟖)(𝟎. 𝟏)
𝐏(𝐁|𝐅) = = 𝟎. 𝟑𝟑𝟓𝟖
(𝟎. 𝟎𝟐)(𝟎. 𝟕) + (𝟎. 𝟏)(𝟎. 𝟏𝟖) + (𝟎. 𝟏𝟐)(𝟎. 𝟏𝟖)
Exercise 1: Suppose in a certain bolt factory; machines A, B, and C manufacture total bolts of
about 25%, 35%, and 40% respectively. Of their outputs, 5%, 4%, and 2% are respectively
defective bolts. A bolt is drawn at random from the product. If the bolt drawn is found defective,
what is the probability that it is manufactured from machine A? Ans: P(A|D) = 0.36
Exercise 2: A student buys 1000 ICs from supplier A, 2000 ICs from supplier B, and 3000 ICs
from supplier C. He tested the ICs and found that the conditional probability of an IC being
defective depends on the supplier from whom bought. Specifically; given that an IC came from
supplier A, the probability that it is defective is 0.05; given that an IC came from supplier B, the
probability that it is defective is 0.1; and given that an IC came from supplier C, the probability
that it is defective is 0.1. If the ICs from the three suppliers are mixed and one is selected at random,
(b) What is the probability that it came from supplier A given that a randomly selected IC is
defective? Ans: 𝐏(𝐀|𝐃) = 𝟎. 𝟎𝟗𝟏
19