Random Thoughts 2012 (COMP 066) Jan-Michael Frahm Jared Heinly source: fivethirtyeight.com.
Random Thoughts 2012 (COMP 066)
description
Transcript of Random Thoughts 2012 (COMP 066)
![Page 1: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/1.jpg)
Random Thoughts 2012(COMP 066)
Jan-Michael FrahmJared Heinly
![Page 2: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/2.jpg)
2
Assignment• Calculate the probability of being pregnant with
a positive pregnancy test for a women with age 27 and for a women of age 44 in 2008. Use the Bayes rule to compute the probability.
• Read in the Moldinov book chapter 6.
![Page 3: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/3.jpg)
3
Pregnancy rate by age group
![Page 4: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/4.jpg)
4
Bayes Rule• Bayes rule
![Page 5: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/5.jpg)
5
Bayes Rule for Pregnancy Test
Age 27: [99.99%, 84.16%]Age 44: [ 99.96%, 37.67%]
![Page 6: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/6.jpg)
6
Spam filtering• Often done based on black list
too restrictive easy to evade by putting false sender e-mail
• Bayes rule can be used to perform spam filtering
• Filtering based on words in the e-mail “viagra” has high probability of spam “Bayes-rule” has low probability of spam
• can be learned from e-mails
![Page 7: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/7.jpg)
7
Probability Rules• Probability of event = p
ex. probability of rolling a 1 on a die: p = 1/6
• Probability of event not happening = 1 – p ex. probability of not rolling a 1: p = 5/6
• Probability of event happening n times in a row = pn
ex. probability of rolling five 1s in a row: p = (1/6)5
• Probability of event happening at least once during n attempts = Inverse of probability of event not happening n times in a row = 1 – (1 – p)n
ex. probability of rolling a 1 at least once in 5 rolls: p = 1 – (5/6)5
![Page 8: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/8.jpg)
8
Probability Rules• Probability of event happening k times in n attempts
Binomial
• Can only add probabilities when you want to know if any one of a set of outcomes occurred and it is impossible for the outcomes to occur at the same time ex. probability of rolling a 1 or a 2 on a die: p = 2/6
![Page 9: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/9.jpg)
9
Expected Value• Expected value = probability of event * value of event
• Ex: pay $1 to play a game, 10% chance of winning $5, 40% chance of winning $1
• Expected Value = -1 + 0.1 * 5 + 0.4 * 1 = $-0.10
Σ
![Page 10: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/10.jpg)
10
Perceptual Pitfalls• The probability that two events will occur can
never be greater than the probability that each will occur individually. “a good story is often less probable than a less
satisfying … [explanation]”
• Missing information• Availability bias
recallable prior knowledge influences our estimates
![Page 11: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/11.jpg)
11
Odds vs. Probability Odds vs Probability
![Page 12: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/12.jpg)
12
Binomial distribution• Binomial distribution: For events with K
successes in N trials
• Properties of a Binomial distribution:1) Fixed number of trials2) Only outcomes are success and fail?3) Same probability for success in each trial4) Independent trials (no influence of previous trials
to current trial)
![Page 13: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/13.jpg)
13
Description of Data• Mean
Average• Median
Middle value• Standard deviation
Variability or spread of the data• Percentile
Position within ordered list of values
![Page 14: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/14.jpg)
14
Confidence Interval• Margin of error of N samples
z*=
Number of samples needed:
![Page 15: Random Thoughts 2012 (COMP 066)](https://reader035.fdocuments.us/reader035/viewer/2022081520/5681682e550346895dddd0ad/html5/thumbnails/15.jpg)
15
How many trials?• Margin of error for a population proportion
Depends on proportion in the population that had the characteristic we searched for