Академический Документы
Профессиональный Документы
Культура Документы
Psyc 339
02/07/2006
Outline
Sample problems
Bayes’ Theorem
History of Bayes’ Theorem
Applications
Practice questions
One Example
This is a hypothetical problem
Suppose 1% of the population has HIV
A test for HIV is said to be 90% accurate
If a person has HIV, the test can identify 90% of the times
correctly
If a person does not have HIV, the test can reject 90% of the
times correctly.
If someone gets back a positive test, what’s the
probability that he/she has HIV?
Choices: A. Below 10%; B. 10%~30%; C. 30%~50%;
D.50%~70%; E. 70%~90%; F. 90%; G.90%~100%
One approach to calculate…
Consider 1000 people
0.1 Negative: 1
HIV:
0.01 10
0.9 Positive: 9
108
Positive:99
No 0.1
0.99 HIV:
990
0.9
Negative: 891
P(H|+)=9/(99+9)=0.083
Or, look at the problem this
way…
Test + Test -
False Correct
People
Alarm Rejection
without HIV
10% 90%
Bayes' Theorem
p(+ | H) p(H)
p(H | +) =
p(+ | H) p(H) + p(+ | H) p(H)
(0.9)(0.1)
p(H | +) = = 0.083
(0.9)(0.1) + (0.1)(0.99)
Bayesian Calculators:
• http://psych.rice.edu/online_stat/
• http://psych.fullerton.edu/mbirnbaum/calculators/Bayes
Calc.htm
Base Rate Neglect
In the HIV example, if your guesstimate is way
over 8.3%, then you probably neglect the base
rate.
p(Db | Hc )p(Hc )
p(Hc | Db ) =
p(Db )
p(Db | Hc )p(Hc )
=
p(Db | Ha )p(Ha ) + p(Db | Hb )p(Hb ) + p(Db | Hc )p(Hc )
(1)(1/3)
= = 2/3
(1/2)(1/3) + (0)(1/3) + (1)(1/3)
For those who don’t believe…
Here is the simulation for Monty Hall problem.
http://psych.rice.edu/online_stat/
Bayes' Theorem History
The theorem was named
after Thomas Bayes'
(1702-1761), who first
recognized the
importance of personal
probability.
Application: Spam filter
Bayesian spam filters calculate the probability of a
message being spam based on its contents.
Unlike simple content-based filters, Bayesian spam
filter does not classify an email as spam rigidly.
Bayesian spam filters can also learn from spam and
from good mails and returns hardly any false
positives.
Other Applications:
Microsoft Office Assistant
Google Search Engine
Autonomy Systems
Modeling how neurons behave in very
complicated systems
Any other applications?
Practice Question 1
A manufacturer claims that its drug test will detect
steroid use (that is, show positive for an athlete who
uses steroids) 95% of the time. Your friend on the
basketball team has just tested positive. The probability
that he uses steroids is:
A. 0.95
B. At most 0.95
C. At least 0.95
D. Not possible to say, based on the information
Practice Question 2
In a population, 70% of the people have a certain
condition. A test is developed that has a 40%
chance of detecting the condition in a person who
has it and a 10% chance of falsely indicating it in a
person who does not have it. If a person gets a
positive test result, roughly what is the probability
they have the condition?
Box1 Box2
p(box1) = .5 p(box2) = .5
p(red ball | box1) = .4 p(red ball | box2) = .5
p(blue ball | box1) = .6 p(blue ball | box2) = .5
Key to Q3
p(box1) = .5 p(box2) = .5
P(red ball | box1) = .4 P(red ball | box2) = .5
P(blue ball | box1) = .6 P(blue ball | box2) = .5