Lecture 3
Lecture 3
● Counting Methods
● Probability
● Conditional Probability
● Independence of Events
A printed circuit board (PCB) is assembled in a factory using multiple automated machines, each
performing a specific task. The manufacturing process consists of five stages:
• Component Placement – A machine places electronic components onto the PCB.
• Soldering – The components are soldered to ensure electrical connections.
• Inspection – The PCB is checked for defects using automated inspection systems.
• Coating – A protective coating is applied to shield the PCB from moisture and dust.
• Testing – The PCB undergoes functional testing to verify proper operation.
To optimize production, the factory uses multiple machines at each stage: 4 component
placement machines, 3 soldering machines, 5 inspection machines, 6 coating machines, and 7
testing machines. Each PCB is assigned a tracking code that records which machines were used
in its production. How many unique pathways can a PCB follow through the manufacturing
process? 4 × 3 × 5 × 6 × 7 = 2520
Counting Methods
Permutations & Combinations
A company has 6 engineers, and a manager needs to select 3 of them for specific roles: lead
engineer, assistant engineer, and analyst. In how many different ways can the manager assign
engineers to these specific roles?
6! 6 5 4 3!
𝑃 = = = 120
6−3 ! 3!
An electronics manufacturer produces 500 microchips per batch. The quality control team
needs to randomly select 5 microchips for inspection. In how many ways can the team make the
selection?
A civil engineer tests 3 bridges, recording whether each meets load capacity (M) or
fails (F).
𝑆 = {(𝑀, 𝑀, 𝑀), (𝑀, 𝑀, 𝐹), (𝑀, 𝐹, 𝑀), (𝐹, 𝑀, 𝑀), (𝑀, 𝐹, 𝐹), (𝐹, 𝑀, 𝐹), (𝐹, 𝐹, 𝑀), (𝐹, 𝐹, 𝐹)}
If 𝐴 is the event that “at least two bridges fail”, then
𝐴 = {(𝑀, 𝐹, 𝐹), (𝐹, 𝑀, 𝐹), (𝐹, 𝐹, 𝑀), (𝐹, 𝐹, 𝐹)}
Basics Concepts of Probability
Let 𝐴 and 𝐵 be two events in the sample space 𝑆.
𝐴 𝐵 𝐴 𝐵
𝑆 𝑆
𝐴∩𝐵 𝐴∪𝐵
𝐴= "Transformer 1 fails"
𝐵= "Transformer 2 fails"
𝐴 ∪ 𝐵= "At least one transformer fails"
𝑆 𝐴 ∩ 𝐵= "Both transformers fail"
𝐴 = "Transformer 1 does not fail"
𝐴
Basics Concepts of Probability
Let 𝐴 and 𝐵 be two events in the sample space 𝑆.
𝐴 and 𝐵 are said to be mutually exclusive if they have no outcomes in common.
𝐴∩𝐵 = ∅
𝐴 ∪𝐴 ∪⋯∪𝐴 = 𝑆
Basics Concepts of Probability
A partition of 𝑆 consists of mutually exclusive and collectively exhaustive events.
𝑨𝟓 𝑨𝟏 𝑨𝟓 𝑨𝟒 𝑨𝟏 𝑨𝟓
𝑨𝟏 𝑨𝟒 𝑨𝟒
𝑨𝟐 𝑨𝟑 𝑨𝟐 𝑨𝟑 𝑨𝟐 𝑨𝟑
Probability of an event 𝐴, assuming all outcomes in the sample space are equally likely, is
calculated by
𝑛 𝐴
𝑃 𝐴 = ,
𝑛 𝑆
where 𝑛 𝐴 is the number of outcomes that satisfy the condition of event 𝐴 and 𝑛 𝑆 is
the total number of outcomes in the sample space.
If the outcomes are not equally likely, the formula above cannot be used.
Example: A fair coin is tossed twice. What is the probability
that at least one head appears?
𝑛 𝐴 3
𝑃 𝐴 = = = 0.75
𝑛 𝑆 4
Example: A factory produces two types of circuit boards: Type X and Type Y.
There are five circuit boards in total, with three of Type X and two of Type Y. A
quality control engineer randomly selects two boards for inspection.
a) List the sample space of all possible selections.
b) List the elements in the event "One Type X and one Type Y board are selected"
c) What is the probability that one Type X and one Type Y board are selected?
a) 𝑆 = 𝑋 𝑋 , 𝑋 𝑋 , 𝑋 𝑋 , 𝑌 𝑌 , 𝑋 𝑌 , 𝑋 𝑌 , 𝑋 𝑌 , 𝑋 𝑌 , 𝑋 𝑌 , 𝑋 𝑌
b) 𝐴 = "One Type X and one Type Y board are selected"
= 𝑋 𝑌 ,𝑋 𝑌 ,𝑋 𝑌 ,𝑋 𝑌 ,𝑋 𝑌 ,𝑋 𝑌
c) 𝑛 𝑆 = 10, 𝑛 𝐴 = 6 ⇒ 𝑃 𝐴 = = = 0.6
Example: Suppose that there are ten Type X, five Type Y, and four Type Z
circuit boards and three of them will be chosen at random. What is the
probability that two of them will be Type X and one will be Type Z?
𝐴 = "Two X and one Type Z board are selected"
𝑛 𝑆 = = 969, 𝑛 𝐴 = = 45 4 = 180 ⇒ 𝑃 𝐴 = = 0.1856
Axioms of Probability
1 For any event ,
𝑛 𝐴 6
𝑃 𝐴 = = = 0.1667
𝑛 𝑆 36
Example: A pair of fair dice is rolled, and we observe that one die shows a 3. Under this condition,
what is the probability that the sum of the upturned faces is equal to 7?
Let
𝑆 = "Customer prefers SMS support"
𝐼 = "Customer prefers internet support"
Then 𝑃 𝑆 = 0.75, 𝑃 𝐼 = 0.80, and 𝑃 𝑆 ∩ 𝐼 = 0.65.
∩ .
a) 𝑃 𝐼|𝑆 = = = 0.8667
.
∩ .
b) 𝑃 𝑆|𝐼 = = = 0.8125
.
Example: A high-precision milling machine is used to
shape metal components. The probability that the
machine starts operating correctly is 0.90, the probability
that it completes a part within the required tolerance
limits is 0.85, and the probability that it both starts
correctly and produces a part within tolerance limits is
0.80. Find the probability that
a) the machine produces a part within tolerance limits, given that it started correctly. 0.8889
b) the machine started correctly, given that it produced a part within tolerance limits. 0. 9412
c) the machine produces a part within tolerance limits, given that it did not start correctly. 0.5
Example: The Indian state Kerala is one of the few states which are usually badly hit by monsoons
every year. The following contingency table is obtained from a data set containing the monthly
rainfall data from years 1901 to 2018 for Kerala. The table contains the information for the month of
June.
CONTINGENCY Rain more than 500 mm: Rain more than 500 mm:
TABLE No Yes
Flood: No 19 39
Flood: Yes 6 54
a) Find the probability of flooding given it rained more than 500 mm. 0.581
b) If a flooding is observed, what’s the probability that it rained less than 500 mm? 0.1
Multiplicative Rule
For any two events and , Additive Rule
It is obvious that 𝐷 = 𝐷 ∩ 𝐷 ∪ 𝑁 ∩ 𝐷
Then 𝑃 𝐷 = 𝑃 𝐷 ∩ 𝐷 ∪ 𝑁 ∩ 𝐷
=𝑃 𝐷 ∩𝐷 +𝑃 𝑁 ∩𝐷
= 𝑃 𝐷 |𝐷 𝑃 𝐷 + 𝑃 𝐷 |𝑁 𝑃 𝑁 = = 0.6032
6 3 5 4
9 7 9 7
Independence of Events
Let 𝐴 and 𝐵 be two events in the sample space 𝑆.
Let 𝐹 = "Generator 1 fails" and 𝐹 = "Generator 2 fails". Then 𝑃 𝐹 = 0.05 and 𝑃 𝐹 = 0.08.
𝐹 and 𝐹 are independent
𝑃 𝐴 ≠ 0.75
𝑃 𝐵∩𝐴 𝑃 𝐵|𝐴 𝑃 𝐴
Bayes’ Rule: 𝑃 𝐴 |𝐵 = = for 𝑗 = 1,2, … , 𝑛
𝑃 𝐵 ∑ 𝑃 𝐵|𝐴 𝑃 𝐴
Example: A power company installs three types of transformers in its
electrical grid. The transformers differ in capacity, and each has a
different probability of failure within the first five years. Of all transformes,
40% are low-capacity, 35% are medium-capacity, and 25% are high-
capacity. Of low-capacity transformers, 8% fail within the first five years
of purchase, while 10% of medium-capacity and 14% of high-capacity fail.
a) What is the probability that a randomly selected transformer will fail within five years?
b) If a transformer in the grid has failed within five years, what is the probability that it was a
high-capacity transformer?
Also,
𝑃 𝐹|𝐿 = 0.08, 𝑃 𝐹|𝑀 = 0.10, 𝑃 𝐹|𝐻 = 0.14
Example: A In a large city, 8% of the inhabitants have contracted a
particular disease. A test for this disease is positive in 80% of people
who have the disease and is negative in 80% of people who do not have
the disease.
a) What is the probability that a person has a negative test result? 0.752
b) What is the probability that a person for whom the test result is
positive has the disease? 0.258
[email protected]
CREDITS: This presentation template was created by Slidesgo, and includes icons by Flaticon, and infographics & images by Freepik