120 likes | 250 Vues
This text explores Bayes' Theorem, focusing on how to determine conditional probabilities when some are known. Using examples from medical diagnostics and spam filtering, it illustrates the calculations of probabilities like P(have disease|test positive) and P(didn't study|failed). By creating tree diagrams and analyzing medical test accuracy and word detection in spam messages, we demonstrate the practical applications of Bayes' Theorem in real-life scenarios. Gain insights into how Bayes' Theorem can clarify uncertain situations.
E N D
We can use Bayes Theorem… • …when we know some conditional probabilities, but wish to know others. • For example: We know P(test positive|have disease), and we wish to know P(have disease|test positive)
Ex. 1 (book ex 2- p. 419) • Suppose that one person in 100,000 has a particular rare disease for which there is a fairly accurate diagnostic test. This test is correct 99% of the times for someone who has the disease and 99.5%% of the time for someone who does not.
Define E, F, E’, F’ Let F=event one has the disease E=event one tests positive We know that P(F) = 1/100,000 = .00001 P(E|F)= P(positive|disease) = .99 and P(E’ |F’ ) = P(negative| don’t have disease) = .995 Determine P(F|E) = P(has disease|test positive) = ___ and P ( F’ |E’ )= P(does not have disease |test negative)= ___
Find P(F|E) and P(F’| E’) • P(F|E) = = 0.002 • P(F’ | E’)= = 0.9999999
Ex. 2: F=studied for final, E=passed class Assume: P(F) = P(studied)=.8 P(E|F)= P(passed|studied)=.9 and P(E|F ’ ) = P(passed|didn’t study)=.2 Find P(F|E) = P(studied|passed)= ___ P (F’ | E’ )= P(didn’t study | failed) = ___
Spam filters Ex. 3: Spam filters Idea: spam has words like “offer”, “special”, “opportunity”, “Rolex”, … Non-spam has words like “mom”, “lunch”,… False negatives: when we fail to detect spam False positives: when non-spam is seen as spam Let S=spam E=has a certain word Assume P(S)=0.5
Given a message says “Rolex”, find probability it is spam Consider that “Rolex” occurs in 250/2000= .125 spam messages and in 5/1000=.005 non-spam messages. Assume P(S)=0.5 Ex: P(S|uses word “Rolex”) = = .962