We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- Artificial Intelligence
- Probability & Statistics - Foundations
- Day 3: Basic Probability Puzzles #7
- Discussions
Day 3: Basic Probability Puzzles #7
Day 3: Basic Probability Puzzles #7
Sort by
recency
|
16 Discussions
|
Please Login in order to post a comment
from fractions import Fraction
a = Fraction(5, 1000) b = Fraction(8, 1000) c = Fraction(10, 1000)
prob_a = ((a*500)/3500) prob_b = ((b*1000)/3500) prob_c = ((c*2000)/3500)
prob = Fraction(prob_a/(prob_a + prob_b + prob_c))
print(prob)
Python I multiplied every production 2 times cause in A there are 2.5 defective units, times 2 --> 5 units
I got a different answer. P(A|defect)=P(A and defect)/P(defect) P(A and defect) is 5/1000 P(defect)=(0.005*500+0.008*1000+0.01*2000)/3500 = 61/7000
so P(A|defect) = 5/1000 / 61/7000 = 35/61 ??
hey there....i exactly know how to solve this problem... the thing i don't know is test case...it is clearly given in problem that we need to find probability of selecting defective pipe from A and for that we can directly print the results without any input... i don't know what to do apart from getting that result... could anyone over here can help me out please..