Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bayesian Inference I 4/23/12 Law of total probability Bayes Rule Section 11.2 (pdf)pdf Professor Kari Lock Morgan Duke University.

Similar presentations


Presentation on theme: "Bayesian Inference I 4/23/12 Law of total probability Bayes Rule Section 11.2 (pdf)pdf Professor Kari Lock Morgan Duke University."— Presentation transcript:

1 Bayesian Inference I 4/23/12 Law of total probability Bayes Rule Section 11.2 (pdf)pdf Professor Kari Lock Morgan Duke University

2 Project 2 Paper (Wednesday, 4/25) Project 2 Paper FINAL: Monday, 4/30, 9 – 12 To Do

3 Conditions apply to overall model; not each variable individually R 2 is the proportion of variability in the response that is explained by the explanatory variables (not adjusted R 2 ) 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! Comments on Projects

4 FINAL MONDAY, APRIL 30 th 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

5 Disjoint and Independent Assuming that P(A) > 0 and P(B) > 0, then disjoint events are a)Independent b)Not independent c)Need more information to determine whether the events are also independent

6 Law of Total Probability If events B 1 through B k are disjoint and together make up all possibilities, then A B1B1 B2B2 B3B3

7 Sexual Orientation P(bisexual) = P(bisexual and male) + P(bisexual and female) = 66/5042 + 92/5042 = 158/5042 MaleFemaleTotal Heterosexual232523484673 Homosexual10523128 Bisexual6692158 Other255883 Total2521 5042

8 Craps Let’s put it all together! What’s the probability of winning at Craps?

9 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!

10 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

11

12 Craps First Role23456789101112 P(Win if first role = ___)003/94/105/111 4/103/910 1. Find P(win if first role = ___) for each of the possibilities.

13 Craps First Role23456789101112 P(Win and first role = ___)00.028.044.063.167.063.044.028.0560 2. Find P(win and first role = ___) for each of the possibilities.

14 Craps First Role23456789101112 P(Win and first role = ___)00.028.044.063.167.063.044.028.0560 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.

15 15 A 40-year old woman participates in routine screening and has a positive mammography. What’s the probability she has cancer? a)0-10% b)10-25% c)25-50% d)50-75% e)75-100% Breast Cancer Screening

16 16 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? Breast Cancer Screening

17 17 A 40-year old woman participates in routine screening and has a positive mammography. What’s the probability she has cancer? a)0-10% b)10-25% c)25-50% d)50-75% e)75-100% Breast Cancer Screening

18 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? a)P(cancer if positive mammography) b)P(positive mammography if cancer) c)P(positive mammography if no cancer) d)P(positive mammography) e)P(cancer)

19 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)?

20 Bayes Rule <- Bayes Rule 20

21 Rev. Thomas Bayes 1702 - 1761

22 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.

23 P(positive) 1.Use the law of total probability to find P(positive). 2.Find P(cancer if positive)


Download ppt "Bayesian Inference I 4/23/12 Law of total probability Bayes Rule Section 11.2 (pdf)pdf Professor Kari Lock Morgan Duke University."

Similar presentations


Ads by Google