Statistics for Data Science – Digital Assignment
Question 1
Digital assignment - Statistics for data science
1. A factory produces bulbs from three machines A, B, and C.
a) Machine A produces 30% of the bulbs, B produces 45%, and C produces 25%.
b) The percentage of defective bulbs produced by A, B, and C are 2%, 3%, and 5%
respectively.
If a bulb is selected at random and found to be defective, find the probability that it
was produced by Machine B.
Introduction
Probability theory plays an important role in Statistics and Data Science for analyzing
uncertain events and making decisions based on available information. Bayes’
Theorem is one of the fundamental concepts used to calculate conditional
probabilities.
In this problem, a factory manufactures bulbs using three different machines. Each
machine produces a certain percentage of bulbs and has a different defective rate.
Using Bayes’ Theorem, the probability that a defective bulb was produced
specifically by Machine B is determined.
Objective
To understand conditional probability.
To apply Bayes’ Theorem in real-life manufacturing problems.
To calculate the probability of a defective bulb originating from a particular
machine.
To analyze statistical data systematically.
Given Data
Percentage of Bulbs Produced
Machine Percentage Produced
A
30%
Machine Percentage Produced
B
45%
C
25%
Percentage of Defective Bulbs
Machine Defective Percentage
A
2%
B
3%
C
5%
Formula Used
Bayes’ Theorem:
P(B\mid D)=\frac{P(B)P(D\mid B)}{P(A)P(D\mid A)+P(B)P(D\mid B)+P(C)P(D\mid C)}
Where:
(P(B|D)) = Probability that the defective bulb came from Machine B.
(P(B)) = Probability that a bulb is produced by Machine B.
(P(D|B)) = Probability that a bulb produced by Machine B is defective.
Calculations
Given:
[
P(A)=0.30
]
[
P(B)=0.45
]
[
P(C)=0.25
]
[
P(D|A)=0.02
]
[
P(D|B)=0.03
]
[
P(D|C)=0.05
]
Substituting the values into Bayes’ Theorem:
[
P(B|D)=\frac{0.45 \times 0.03}{(0.30 \times 0.02)+(0.45 \times 0.03)+(0.25 \times
0.05)}
]
[
=\frac{0.0135}{0.006+0.0135+0.0125}
]
[
=\frac{0.0135}{0.032}
]
[
=0.421875
]
[
\boxed{P(B|D)=0.422}
]
Final Answer
The probability that a randomly selected defective bulb was produced by Machine B
is:
[
\boxed{0.422}
]
or
[
\boxed{42.2%}
]
Explanation
1. The production percentages of Machines A, B, and C are converted into
probabilities.
2. The defective percentages are treated as conditional probabilities.
3. Bayes’ Theorem is applied to calculate the probability that a defective bulb
originated from Machine B.
4. The final probability obtained is 0.422, which means there is a 42.2% chance
that the defective bulb came from Machine B.
Conclusion
This problem demonstrates the practical application of Bayes’ Theorem in industrial
quality control and statistical analysis. By using conditional probability, it is possible
to determine the likelihood that a defective product originated from a particular
machine. Such statistical methods are widely used in manufacturing, machine
learning, and decision-making systems.