230 likes | 350 Views
Bayesian Inference I 4/23/12. Law of total probability Bayes Rule. Section 11.2 ( pdf ). Professor Kari Lock Morgan Duke University. To Do. Project 2 Paper (Wednesday, 4/25) FINAL: Monday, 4/30, 9 – 12. Comments on Projects.
E N D
Bayesian Inference I • 4/23/12 • Law of total probability • Bayes Rule Section 11.2 (pdf) Professor Kari Lock Morgan Duke University
To Do • Project 2 Paper (Wednesday, 4/25) • FINAL: Monday, 4/30, 9 – 12
Comments on Projects • Conditions apply to overall model; not each variable individually • R2 is the proportion of variability in the response that is explained by the explanatory variables (not adjusted R2) • Coefficients and significance of categorical variables are in reference to the reference level (the category left out) • Don’t take significant predictors out of your model!
FINAL • MONDAY, APRIL 30th • 9 – 12 pm • Bring: • A calculator • 3 double-sided pages of notes, prepared only by you • The final will cover material from the entire course • The format will be similar to the two in-class exams we’ve had so far, only longer • No make-up exam will be given; 0 if you do not take it • STINFs do NOT apply for the final
Disjoint and Independent Assuming that P(A) > 0 and P(B) > 0, then disjoint events are Independent Not independent Need more information to determine whether the events are also independent
Law of Total Probability • If events B1 through Bk are disjoint and together make up all possibilities, then B1 B3 B2 A
Sexual Orientation P(bisexual) = P(bisexual and male) + P(bisexual and female) = 66/5042 + 92/5042 = 158/5042
Craps • Let’s put it all together! • What’s the probability of winning at Craps?
Craps Rules • Each role consists of rolling two dice • On the first role: • You lose (crap out) if your sum is 2, 3, or 12 • You win if your sum is 7 or 11 • Otherwise, your total is your point and you keep on rolling • On subsequent roles: • You win if the sum equals your point (your total from the first role) • You lose if you role a 7 • Otherwise, you keep rolling Play a game!
Craps Option 1: Simulation Did you win? (a) Yes (b) No Option 2: Probability rules. (see handout) Is it smart to play craps? (a) Yes (b) No
Craps • 1. Find P(win if first role = ___) for each of the possibilities.
Craps • 2. Find P(win and first role = ___) for each of the possibilities.
Craps 3. Use the law of total probability to find P(win). • 4. Assuming you win the same amount you bet, is it smart to play Craps? • No. You are more likely to lose than win.
A 40-year old woman participates in routine screening and has a positive mammography. What’s the probability she has cancer? 9 • Breast Cancer Screening 0-10% 10-25% 25-50% 50-75% 75-100%
Breast Cancer Screening 1% of women at age 40 who participate in routine screening have breast cancer. 80% of women with breast cancer get positive mammographies. 9.6% of women without breast cancer get positive mammographies. A 40-year old woman participates in routine screening and has a positive mammography. What’s the probability she has cancer?
A 40-year old woman participates in routine screening and has a positive mammography. What’s the probability she has cancer? 9 • Breast Cancer Screening 0-10% 10-25% 25-50% 50-75% 75-100%
Breast Cancer Screening A 40-year old woman participates in routine screening and has a positive mammography. What’s the probability she has cancer? What is this asking for? P(cancer if positive mammography) P(positive mammography if cancer) P(positive mammography if no cancer) P(positive mammography) P(cancer)
Bayes Rule • We know P(positive mammography if cancer)… how do we get to P(cancer if positive mammography)? • How do we go from P(A if B) to P(B if A)?
Bayes Rule <- Bayes Rule
Rev. Thomas Bayes 1702 - 1761
Breast Cancer Screening • 1% of women at age 40 who participate in routine screening have breast cancer. • 80% of women with breast cancer get positive mammographies. • 9.6% of women without breast cancer get positive mammographies.
P(positive) Use the law of total probability to find P(positive). Find P(cancer if positive)