Python small experimental mathematics (3) - Bayes 'rule (Bayes' rule) Case computing
1. Bayes 'rule (Bayes' rule)
2. Case: drug detection Case
Suppose the probability of a conventional sensitivity and reliability of the detection results are 99%, i.e., when the drug is subject, each test positive (+) was 99%. While not subject drugs, each tested negative (-) 99% probability. Suppose 0.5% employee drug.
How high is the probability of an employee tested positive for drug use? Order "D" drug, "N" for drug, "+" is a positive
Available:
Despite the high reliability of the detection results, but can only come to the following conclusion: If the test is positive, then this person is very likely probability drugs only 33% false positives.
3. understand the formula
can be understood as: under the condition B occurs, the probability of occurrence of A; or a conditional probability of occurrence of A, B occurs
Symbol Editor reference to the formula: https://www.jianshu.com/p/e74eb43960a1
(continue to add updated)