Использование программирования R для поиска ответа
About 1 out of 1,000 items made on a production line is defective. There is a test to check whether the item is defective. The test is quite accurate. In particular, we know that the probability that the test result is positive (suggesting the item is defective), given that the item is not defective, is only 2 percent, and the probability that the test result is negative (suggesting the item is not defective), given that the item is actually defective, is only 1 percent. A random item gets tested for defect and the result comes back positive. What is the probability that the item is defective?
Что я уже пробовал:
#D = продукт неисправен
#ND=продукт не является дефектным
#P = результат положительный
#НП = результат отрицательный
Д=0.01
Р=0,02
# Prob(P, given = D)
# Prob(D, given = P)
Приор = с(0,01,0,02)
как = с(0.99,20.9)
Patrice T
а у вас есть вопрос ?