false negatives

advertisement
AP Statistics
February 28, 2012
AP Statistics B warm-up
Tuesday, February 28, 2012
1. Assume that after you draw from a deck of
cards, you replace the card and reshuffle.
What is the probability of your drawing:
1. 3 aces?
2. 3 hearts
3. 2 hearts and 2 spades?
2. Now assume that you do NOT replace the
cards. Calculate the probabilities using the
3 distributions above. When you are
finished, the answers are on the next slide.
Answers to warmups
Tuesday, February 28, 2012
1. Drawing WITH replacement
1. 3 aces?= (4/52) (4/52) (4/52) = (1/13) (1/13)
(1/13)=not very much
2. 3 hearts =(13/52)(13/52)(13/52)=
(1/4)(1/4)(1/4) = 1/64
3. 2 hearts and 1 spades = same as 1.2 (why?)
2. Drawing WITHOUT replacement
1. 3 aces?= (4/52) (3/51) (2/50) = hey, YOU guys
are the ones with the calculators! Why am **I**
doing the calculations????
2. 3 hearts =(13/52)(12/51)(11/50)=some small
number
3. 2 hearts and 1 spades = (13/52)(12/51)(13/52)
No narration today
• Sorry for that. The microphone has an echo on it
that I haven’t been able to resolve. I’ll be on the
phone to tech support today to get it resolved.
• This is an opportunity, however, for you to work
together as a class. Share in the reading of the
slides. Make sure you understand the material
before moving on.
• Let me know how this went today. I prefer to
narrate, if only to clarify, but maybe you prefer
silence, which is OK, too!
Topics for today
(Tuesday, February 28, 2012)
• Finish Chapter 15 (“reversing the conditioning”
• Introduction to Chapter 16 on Random variables and
the concept of “expected value”
• I have an exercise on expected value that we’ll do to
introduce the concept
• Feedback? Questions from last night’s homework you
want me to review with you tomorrow?
• Globe at Night tomorrow for 3rd period, so bring data
• No homework tonight, but turn in the homework from
yesterday.
Reversing the Conditioning
• Go to tree diagrams on pp. 355-357, and final
tree diagram on binge drinking on p. 357
• Probabilities here are probabilities of having an
accident, given that you were a certain type of
drinker, e.g.
– P(accident|binge)
– P(accident|moderate)
– P(accident|abstain)
• But what if we want to know P(binge|accident)
instead? (i.e., the probability of being a binge
drinker, give that you’ve had an accident?)
• This is “reversing the conditioning”
Using the General Multiplication Rule
• One way is to use and revise the general
multiplication rule:
P( A  B)  P( A)  P( B | A)
Now divide by P( A) to get
P( A  B)
P( B | A) 
P( A)
But we were looking for P(A|B), not
P(B|A)
• True, but it’s just a matter of substituting
P(A|B) for P(B|A) in the equation:
P( A  B)  P( B)  P( A | B)
Now divide by P( B) to get
P( A  B)
P( A | B) 
P( B)
Doing the calculation
• We already have P(accident), which is we
calculate by adding up all the probabilities of
having an accident:
– P(accident|binge)= 0.075
– P(accident|moderate)=0.033
– P(accident|abstain)=0
• P(accident), then, equals
0.075+0.033+0=0.108. This is the
DENOMINATOR of the equation
Doing the calculation (continued)
• How do we find P( Accident  Binge) ?
• We already have it as the probability of “Binge
and Accident”, which is 0.075.
• So
P( Accident  Binge)
P( Accident | Binge) 

P( Accident )
0.075
 0.694
0.108
Application: false positives in
tuberculosis (TB) testing
• New vocabulary:
– False positive
– False negative
• Examples:
– In TSA-land when you’re flying: False positive=your
mother being erroneously identified as a terrorist;
False negative=Osama bin Laden not being identified
as a terrorist
– Examinations: False positive: you pass when you
should have failed; false negative: you fail when you
should have passed
Important point!
• Determining whether something is a false
negative or false positive depends on how you
word the question
– For TB, does the test correctly identify persons
suffering from tuberculosis?
– For TSA, does the system accurately identify
terrorists?
– For examinations, does the test correctly test the
student’s mastery of the material?
• If you word the question differently, your false
positives and false negatives will be different!
TB example (p. 359)
• Demographically, only 5 out of 10,000 people
have TB. Therefore the P(TB)= 5 out of 10,000, or
0.0005.
• The probability of NOT having Tb is the
complement of having TB, i.e., P(no TB)=1-P(TB) =
1.0000-0.0005 = 0.9995
• Note: you can also calculate the non-TB rate
directly from the statistics. If only 5 out of 10,000
people have TB, then 9,995 out of 10,000 do not,
and 9,995÷10,000 = 0.9995
Calculating the false positives
• False positive rate is 1% (1 out of 100 people
who do not have TB will be incorrectly
diagnosed as having it).
• The corresponds to a 99% accuracy rate.
• Read the last paragraph on p. 358 carefully,
and then move to the next slide.
Extra care for false negatives
• This sounds like “bait and switch,” since they’re giving
you TWO different success rates (1% for false positives,
and 0.01% for false negatives)
• However, false negatives are MUCH more serious than
false positives (though maybe not if you don’t graduate
from college as the result of a false positive), so
tolerances are much narrower for false negatives
• For us, this means that we have TWO sets of data to
work with! 99%/1% for false positives, and
99.9%/0.1% for false negatives! Welcome to the real
world, my children…..
Tree of outcomes on p.359
• You calculate a tree of probabilities just like we
did last week
• Summary:
–
–
–
–
TB and tested positive: 0.0004995
TB but tested negative: 0.0000005
TB-free and tested negative: 0.989505
TB-free but tested positive: 0.009995
• Here’s we’re looking for POSITIVE outcomes
• Work out what the probabilities would be for
positive outcomes, then move to the next slide
A linguistic approach to the problem
• Sometimes worrying about the formula leads us astray.
Let’s walk through it using ordinary language.
• What results test positive? Two: those who have TB
and correctly test positive, and those who DON’T have
TB but still test positive. Remember that this is our
denominator
• Here, that’s 0.0004995 (have TB and test positive) plus
0.009995 (don’t have TB but test positive), or
0.010495.
• Numerator is those who have TB and test positive
• Answer is just under 5%: 0.047
Interpreting the result
• The book phrases the results as “the chance of
having TB even after you test positive is less
than 5%.” Do you agree with this conclusion?
• It’s still correct, because of the much higher
false-negative rate (99.9%) than the falsepositive rate (99%)
Exercise
• Do problem 44 on p 366. It follows these
examples exactly. Draw a tree. Someone
needs to share their result and show what
conclusion they reached. When you have
done so, move on to the next slide for the
answer.
Answer to problem 44
0.814
Here endeth Chapter 15
• Give any questions you have to Ms. Thien; she
will pass them on to me and I’ll answer them
tomorrow.
• Any problems on the homework, pass them
on as well.
• Other questions or comments? You know the
drill!
Introduction to Chapter 16
• Here we are dealing with “expected value,”
which usually proves a difficult concept to
understand.
• To help you, I’ve devised a game of sorts, sort
of a lottery. Rules are on the next slide.
Rules
1.
Ms. Thien has a bag full of money. Well, not real money, but 20
bills, distributed as follows:
1.
2.
3.
2.
3.
14 bills of $5
2 bills of $10
4 bills of $20.
The lottery is a “pick with replacement.” I.e., a person pays money
to reach into the bag and selects a bill at random, which he/she/it
can keep. The bill is then replaced so that you maintain the
distribution I gave you in #1 above.
What is a reasonable price to charge someone to play this game?
“Reasonable” means a price that accurately reflects the likely
outcome. Answering this question is your assignment for the day.
Move on to the next page for specific instructions.
Assignment
1.
2.
3.
4.
Work for 5-10 minutes at your table and come up with a figure.
After all tables have reached a consensus, pick someone to report
out your findings. Somebody needs to keep track of the figures on
the board.
After you have estimated the “expected value” that you would
get, let’s put it to the test. You will need your calculators and a
scorekeeper for this part of the exercise.
Ms. Thien will pass a paper bag of “money” around. Each student
should draw a bill at random, show it to the class, and put it back
in the bag (sorry, I only made so many copies).
As each student selects a bill, someone needs to be tallying it on
the board. Do not go on to the next slide until you have
completed this activity.
Work!
• Now that everybody has drawn and replaced a
bill, calculate the average pay-out that a
randomly-chosen student got.
• Compare this average to the reported
suggestions of the “expected value.”
• (It is possible that you’ll have wildly divergent
results. The Law of Large Numbers means “large
numbers,” typically more than exist in a single
class, and your figures may not converge to what
we will calculate as an expected value.)
New activity
• Ms. Thien will now give you a different bag of money,
distributed as follows:
– 15 $5-bills
– 2 $10-bills
– 3 $20-bills
• Repeat what you just did: calculating the expected
value, and having each person draw and calculate the
average payout. Be sure that somebody writes down
the conclusions for both activities and gives it to Ms.
Thien to report to me.
• When you’re done, move on to the next slide and I’ll
show you how to do the calculations more easily.
Calculating expected value
• Let’s consider an easier game.
• Suppose you had 2 $20-bills in the bag, and 18
blanks pieces of paper. What is the probability
that you’d draw a $20 bill?
• Well, clearly, there are 2 bills out of 20, so
your odds of drawing it are 2 out of 20, or
1/10, aka 10%.
Calculating expected value (part 2)
• What’s the average value of each time you
draw?
• Well, what are the possible outcomes?
• On AVERAGE, you’ll get 0 for 18 of your draws,
and $20 for 2. That’s $40 out of 20 (18 draws
you net nothing, and 2 you get $20 each time)
• Add it up, and you get $40/20 turns = $2/turn
as your average. So you should be willing to $2
per draw.
Calculating expected value (part 3)
• But there’s an easier way of calculating it
• We already know your probability of getting $20
is 0.10, and the probability of getting nothing is
0.90.
• Multiply by the probabilities and add. What do
you get?
• I hope what you got is $2/draw: ($20×0.10 )+($0
×0.90). Check the math to make sure we agree.
• You can use this same procedure to calculate the
expected value in our exercise.
Application to our first problem
• On the first problem, we had three values--$5,
$10, and $20. What you do is simply replace the 0
value we just did with THEIR value and
probability.
• Distribution: $5/$10/$20= 14/2/4
• Probabilities: 0.7 for $5, 0.1 for $10, and 0.2 for
$20
• Expected value =
($5×0.7)+($10×0.1)+($20×0.2)=$3.50+$1+$4 =
$8.50.
Application to the second problem
• Different distribution of $5/$10/$20: 15/2/3,
or in probabilities 15/20 for $5, 2/20 for $10,
and 3/20 for $20, i.e. 0.75/0.10/0.15.
• Same thing as before: multiply probabilities
by outcomes, and you should get………$7.75,
right?
Last slide
• If you have time, work through the example in
the book on pp.368-69. Somebody should
volunteer to lead the discussion.
• Don’t forget to bring your Globe at Night data
tomorrow for entry.
Download