26
Prediction and Odds 18.05 Spring 2014 January 1, 2017 1 / 26

Prediction and Odds - MIT OpenCourseWare · Probabilistic prediction: “Tomorrow it will rain with probability 60% (and not rain with probability 40%).” Examples: ... 3 coins with

  • Upload
    tranthu

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Prediction and Odds 1805 Spring 2014

January 1 2017 1 26

Probabilistic Prediction

Also called probabilistic forecasting Assign a probability to each outcome of a future experiment

Prediction ldquoIt will rain tomorrowrdquo

Probabilistic prediction ldquoTomorrow it will rain with probability 60 (and not rain with probability 40)rdquo

Examples medical treatment outcomes weather forecasting climate change sports betting elections

January 1 2017 2 26

Words of estimative probability (WEP) WEP Prediction ldquoIt is likely to rain tomorrowrdquo

Memo Bin Laden Determined to Strike in US

See httpenwikipediaorgwikiWords_of_Estimative_Probability

ldquoThe language used in the [Bin Laden] memo lacks words of estimative probability (WEP) that reduce uncertainty thus preventing the President and his decision makers from implementing measures directed at stopping al Qaedarsquos actionsrdquo

ldquoIntelligence analysts would rather use words than numbers to describe how confident we are in our analysisrdquo a senior CIA officer whorsquos served for more than 20 years told me Moreover ldquomost consumers of intelligence arenrsquot particularly sophisticated when it comes to probabilistic analysis They like words and pictures too My experience is that [they] prefer briefings that donrsquot center on numerical calculationrdquo

January 1 2017 3 26

WEP versus Probabilities medical consent

No common standard for converting WEP to numbers

Suggestion for potential risks of a medical procedure

Word Likely

Frequent Occasional

Rare

Probability Will happen to more than 50 of patients Will happen to 10-50 of patients Will happen to 1-10 of patients Will happen to less than 1 of patients

From same Wikipedia article

January 1 2017 4 26

Example Three types of coins

Type A coins are fair with probability 05 of heads Type B coins have probability 06 of heads Type C coins have probability 09 of heads

A drawer contains one coin of each type You pick one at random

Prior predictive probability Before taking data what is the probability a toss will land heads Tails

Take data say the first toss lands heads

Posterior predictive probability After taking data What is the probability the next toss lands heads Tails

January 1 2017 5 26

Solution 1

1 Use the law of total probability (A probability tree is an excellent way to visualize this You should draw one before reading on)

Let D1H = lsquotoss 1 is headsrsquo D1T = lsquotoss 1 is tailsrsquo

P(D1H ) = P(D1H |A)P(A) + P(D1H |B)P(B) + P(D1H |C )P(C ) = 05 middot 03333 + 06 middot 03333 + 09 middot 03333 = 06667

P(D1T ) = 1 minus P(D1H ) = 03333

January 1 2017 6 26

Solution 2 2 We are given the data D1H First update the probabilities for the type of coin

Let D2H = lsquotoss 2 is headsrsquo D2T = lsquotoss 2 is tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D1H |H) P(D1H |H)P(H) P(H|D1H ) A B C

13 13 13

05 06 09

01667 02 03

025 03 045

total 1 06667 1

Next use the law of total probability

P(D2H |D1H ) = P(D2H |A)P(A|D1H ) + P(D2H |B)P(B |D1H ) +P(D2H |C )P(C |D1H )

= 071

P(D2T |D1H ) = 029 January 1 2017 7 26

Three coins continued

As before 3 coins with probabilities 05 06 and 09 of heads

Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Concept question Whatrsquos your best guess for the probability of heads on the next toss

(a) 01 (b) 02 (c) 03 (d) 04

(e) 05 (f) 06 (g) 07 (h) 08

(i) 09 (j) 10

January 1 2017 8 26

Board question three coins

Same setup 3 coins with probabilities 05 06 and 09 of heads Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Compute the posterior probabilities for the type of coin and the posterior predictive probabilities for the results of the next toss

1 Specify clearly the set of hypotheses and the prior probabilities

2 Compute the prior and posterior predictive distributions ie give the probabilities of all possible outcomes

answer See next slide

January 1 2017 9 26

Solution

Data = lsquo1 head and 4 tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D|H)P P P(D|H)P(H) P(H|D ) A B C

13 13 13

5 1 05

5 P5 1 P 06 middot 44P5

1 P09 middot 14

00521 00256 000015

0669 0329 0002

total 1 00778 1

So

P(heads|D) = 0669 middot 05 + 0329 middot 06 + 0002 middot 09 = 053366 P(tails|D) = 1 minus P(heads|D) = 046634

January 1 2017 10 26

Concept Question

Does the order of the 1 head and 4 tails affect the posterior distribution of the coin type

1 Yes 2 No

Does the order of the 1 head and 4 tails affect the posterior predictive distribution of the next flip

1 Yes 2 No

answer No for both questions

January 1 2017 11 26

Odds

Definition The odds of an event are

P(E )O(E ) =

P(E c )

Usually for two choices E and not E Can split multiple outcomes into two groups Can do odds of A vs B = P(A)P(B) Our Bayesian focus Updating the odds of a hypothesis H given data D

January 1 2017 12 26

Examples

A fair coin has O(heads) = 05 05

= 1

We say lsquo1 to 1rsquo or lsquofifty-fiftyrsquo

The odds of rolling a 4 with a six-sided die are

We say lsquo1 to 5 forrsquo or lsquo5 to 1 againstrsquo

16 56

= 1 5

For event E if P(E ) = p then O(E ) = p

1 minus p

If an event is rare then P(E ) asymp O(E )

January 1 2017 13 26

Bayesian framework Marfanrsquos Syndrome

Marfanrsquos syndrome (M) is a genetic disease of connective tissue The main ocular features (F) of Marfan syndrome include bilateral ectopia lentis (lens dislocation) myopia and retinal detachment

P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

If a person has the main ocular features F what is the probability they have Marfanrsquos syndrome

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(F |H) P(F |H)P(H) P(H|F ) M 0000067 07 00000467 000066 Mc 0999933 007 0069995 099933 total 1 007004 1

January 1 2017 14 26

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Probabilistic Prediction

Also called probabilistic forecasting Assign a probability to each outcome of a future experiment

Prediction ldquoIt will rain tomorrowrdquo

Probabilistic prediction ldquoTomorrow it will rain with probability 60 (and not rain with probability 40)rdquo

Examples medical treatment outcomes weather forecasting climate change sports betting elections

January 1 2017 2 26

Words of estimative probability (WEP) WEP Prediction ldquoIt is likely to rain tomorrowrdquo

Memo Bin Laden Determined to Strike in US

See httpenwikipediaorgwikiWords_of_Estimative_Probability

ldquoThe language used in the [Bin Laden] memo lacks words of estimative probability (WEP) that reduce uncertainty thus preventing the President and his decision makers from implementing measures directed at stopping al Qaedarsquos actionsrdquo

ldquoIntelligence analysts would rather use words than numbers to describe how confident we are in our analysisrdquo a senior CIA officer whorsquos served for more than 20 years told me Moreover ldquomost consumers of intelligence arenrsquot particularly sophisticated when it comes to probabilistic analysis They like words and pictures too My experience is that [they] prefer briefings that donrsquot center on numerical calculationrdquo

January 1 2017 3 26

WEP versus Probabilities medical consent

No common standard for converting WEP to numbers

Suggestion for potential risks of a medical procedure

Word Likely

Frequent Occasional

Rare

Probability Will happen to more than 50 of patients Will happen to 10-50 of patients Will happen to 1-10 of patients Will happen to less than 1 of patients

From same Wikipedia article

January 1 2017 4 26

Example Three types of coins

Type A coins are fair with probability 05 of heads Type B coins have probability 06 of heads Type C coins have probability 09 of heads

A drawer contains one coin of each type You pick one at random

Prior predictive probability Before taking data what is the probability a toss will land heads Tails

Take data say the first toss lands heads

Posterior predictive probability After taking data What is the probability the next toss lands heads Tails

January 1 2017 5 26

Solution 1

1 Use the law of total probability (A probability tree is an excellent way to visualize this You should draw one before reading on)

Let D1H = lsquotoss 1 is headsrsquo D1T = lsquotoss 1 is tailsrsquo

P(D1H ) = P(D1H |A)P(A) + P(D1H |B)P(B) + P(D1H |C )P(C ) = 05 middot 03333 + 06 middot 03333 + 09 middot 03333 = 06667

P(D1T ) = 1 minus P(D1H ) = 03333

January 1 2017 6 26

Solution 2 2 We are given the data D1H First update the probabilities for the type of coin

Let D2H = lsquotoss 2 is headsrsquo D2T = lsquotoss 2 is tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D1H |H) P(D1H |H)P(H) P(H|D1H ) A B C

13 13 13

05 06 09

01667 02 03

025 03 045

total 1 06667 1

Next use the law of total probability

P(D2H |D1H ) = P(D2H |A)P(A|D1H ) + P(D2H |B)P(B |D1H ) +P(D2H |C )P(C |D1H )

= 071

P(D2T |D1H ) = 029 January 1 2017 7 26

Three coins continued

As before 3 coins with probabilities 05 06 and 09 of heads

Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Concept question Whatrsquos your best guess for the probability of heads on the next toss

(a) 01 (b) 02 (c) 03 (d) 04

(e) 05 (f) 06 (g) 07 (h) 08

(i) 09 (j) 10

January 1 2017 8 26

Board question three coins

Same setup 3 coins with probabilities 05 06 and 09 of heads Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Compute the posterior probabilities for the type of coin and the posterior predictive probabilities for the results of the next toss

1 Specify clearly the set of hypotheses and the prior probabilities

2 Compute the prior and posterior predictive distributions ie give the probabilities of all possible outcomes

answer See next slide

January 1 2017 9 26

Solution

Data = lsquo1 head and 4 tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D|H)P P P(D|H)P(H) P(H|D ) A B C

13 13 13

5 1 05

5 P5 1 P 06 middot 44P5

1 P09 middot 14

00521 00256 000015

0669 0329 0002

total 1 00778 1

So

P(heads|D) = 0669 middot 05 + 0329 middot 06 + 0002 middot 09 = 053366 P(tails|D) = 1 minus P(heads|D) = 046634

January 1 2017 10 26

Concept Question

Does the order of the 1 head and 4 tails affect the posterior distribution of the coin type

1 Yes 2 No

Does the order of the 1 head and 4 tails affect the posterior predictive distribution of the next flip

1 Yes 2 No

answer No for both questions

January 1 2017 11 26

Odds

Definition The odds of an event are

P(E )O(E ) =

P(E c )

Usually for two choices E and not E Can split multiple outcomes into two groups Can do odds of A vs B = P(A)P(B) Our Bayesian focus Updating the odds of a hypothesis H given data D

January 1 2017 12 26

Examples

A fair coin has O(heads) = 05 05

= 1

We say lsquo1 to 1rsquo or lsquofifty-fiftyrsquo

The odds of rolling a 4 with a six-sided die are

We say lsquo1 to 5 forrsquo or lsquo5 to 1 againstrsquo

16 56

= 1 5

For event E if P(E ) = p then O(E ) = p

1 minus p

If an event is rare then P(E ) asymp O(E )

January 1 2017 13 26

Bayesian framework Marfanrsquos Syndrome

Marfanrsquos syndrome (M) is a genetic disease of connective tissue The main ocular features (F) of Marfan syndrome include bilateral ectopia lentis (lens dislocation) myopia and retinal detachment

P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

If a person has the main ocular features F what is the probability they have Marfanrsquos syndrome

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(F |H) P(F |H)P(H) P(H|F ) M 0000067 07 00000467 000066 Mc 0999933 007 0069995 099933 total 1 007004 1

January 1 2017 14 26

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Words of estimative probability (WEP) WEP Prediction ldquoIt is likely to rain tomorrowrdquo

Memo Bin Laden Determined to Strike in US

See httpenwikipediaorgwikiWords_of_Estimative_Probability

ldquoThe language used in the [Bin Laden] memo lacks words of estimative probability (WEP) that reduce uncertainty thus preventing the President and his decision makers from implementing measures directed at stopping al Qaedarsquos actionsrdquo

ldquoIntelligence analysts would rather use words than numbers to describe how confident we are in our analysisrdquo a senior CIA officer whorsquos served for more than 20 years told me Moreover ldquomost consumers of intelligence arenrsquot particularly sophisticated when it comes to probabilistic analysis They like words and pictures too My experience is that [they] prefer briefings that donrsquot center on numerical calculationrdquo

January 1 2017 3 26

WEP versus Probabilities medical consent

No common standard for converting WEP to numbers

Suggestion for potential risks of a medical procedure

Word Likely

Frequent Occasional

Rare

Probability Will happen to more than 50 of patients Will happen to 10-50 of patients Will happen to 1-10 of patients Will happen to less than 1 of patients

From same Wikipedia article

January 1 2017 4 26

Example Three types of coins

Type A coins are fair with probability 05 of heads Type B coins have probability 06 of heads Type C coins have probability 09 of heads

A drawer contains one coin of each type You pick one at random

Prior predictive probability Before taking data what is the probability a toss will land heads Tails

Take data say the first toss lands heads

Posterior predictive probability After taking data What is the probability the next toss lands heads Tails

January 1 2017 5 26

Solution 1

1 Use the law of total probability (A probability tree is an excellent way to visualize this You should draw one before reading on)

Let D1H = lsquotoss 1 is headsrsquo D1T = lsquotoss 1 is tailsrsquo

P(D1H ) = P(D1H |A)P(A) + P(D1H |B)P(B) + P(D1H |C )P(C ) = 05 middot 03333 + 06 middot 03333 + 09 middot 03333 = 06667

P(D1T ) = 1 minus P(D1H ) = 03333

January 1 2017 6 26

Solution 2 2 We are given the data D1H First update the probabilities for the type of coin

Let D2H = lsquotoss 2 is headsrsquo D2T = lsquotoss 2 is tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D1H |H) P(D1H |H)P(H) P(H|D1H ) A B C

13 13 13

05 06 09

01667 02 03

025 03 045

total 1 06667 1

Next use the law of total probability

P(D2H |D1H ) = P(D2H |A)P(A|D1H ) + P(D2H |B)P(B |D1H ) +P(D2H |C )P(C |D1H )

= 071

P(D2T |D1H ) = 029 January 1 2017 7 26

Three coins continued

As before 3 coins with probabilities 05 06 and 09 of heads

Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Concept question Whatrsquos your best guess for the probability of heads on the next toss

(a) 01 (b) 02 (c) 03 (d) 04

(e) 05 (f) 06 (g) 07 (h) 08

(i) 09 (j) 10

January 1 2017 8 26

Board question three coins

Same setup 3 coins with probabilities 05 06 and 09 of heads Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Compute the posterior probabilities for the type of coin and the posterior predictive probabilities for the results of the next toss

1 Specify clearly the set of hypotheses and the prior probabilities

2 Compute the prior and posterior predictive distributions ie give the probabilities of all possible outcomes

answer See next slide

January 1 2017 9 26

Solution

Data = lsquo1 head and 4 tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D|H)P P P(D|H)P(H) P(H|D ) A B C

13 13 13

5 1 05

5 P5 1 P 06 middot 44P5

1 P09 middot 14

00521 00256 000015

0669 0329 0002

total 1 00778 1

So

P(heads|D) = 0669 middot 05 + 0329 middot 06 + 0002 middot 09 = 053366 P(tails|D) = 1 minus P(heads|D) = 046634

January 1 2017 10 26

Concept Question

Does the order of the 1 head and 4 tails affect the posterior distribution of the coin type

1 Yes 2 No

Does the order of the 1 head and 4 tails affect the posterior predictive distribution of the next flip

1 Yes 2 No

answer No for both questions

January 1 2017 11 26

Odds

Definition The odds of an event are

P(E )O(E ) =

P(E c )

Usually for two choices E and not E Can split multiple outcomes into two groups Can do odds of A vs B = P(A)P(B) Our Bayesian focus Updating the odds of a hypothesis H given data D

January 1 2017 12 26

Examples

A fair coin has O(heads) = 05 05

= 1

We say lsquo1 to 1rsquo or lsquofifty-fiftyrsquo

The odds of rolling a 4 with a six-sided die are

We say lsquo1 to 5 forrsquo or lsquo5 to 1 againstrsquo

16 56

= 1 5

For event E if P(E ) = p then O(E ) = p

1 minus p

If an event is rare then P(E ) asymp O(E )

January 1 2017 13 26

Bayesian framework Marfanrsquos Syndrome

Marfanrsquos syndrome (M) is a genetic disease of connective tissue The main ocular features (F) of Marfan syndrome include bilateral ectopia lentis (lens dislocation) myopia and retinal detachment

P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

If a person has the main ocular features F what is the probability they have Marfanrsquos syndrome

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(F |H) P(F |H)P(H) P(H|F ) M 0000067 07 00000467 000066 Mc 0999933 007 0069995 099933 total 1 007004 1

January 1 2017 14 26

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

WEP versus Probabilities medical consent

No common standard for converting WEP to numbers

Suggestion for potential risks of a medical procedure

Word Likely

Frequent Occasional

Rare

Probability Will happen to more than 50 of patients Will happen to 10-50 of patients Will happen to 1-10 of patients Will happen to less than 1 of patients

From same Wikipedia article

January 1 2017 4 26

Example Three types of coins

Type A coins are fair with probability 05 of heads Type B coins have probability 06 of heads Type C coins have probability 09 of heads

A drawer contains one coin of each type You pick one at random

Prior predictive probability Before taking data what is the probability a toss will land heads Tails

Take data say the first toss lands heads

Posterior predictive probability After taking data What is the probability the next toss lands heads Tails

January 1 2017 5 26

Solution 1

1 Use the law of total probability (A probability tree is an excellent way to visualize this You should draw one before reading on)

Let D1H = lsquotoss 1 is headsrsquo D1T = lsquotoss 1 is tailsrsquo

P(D1H ) = P(D1H |A)P(A) + P(D1H |B)P(B) + P(D1H |C )P(C ) = 05 middot 03333 + 06 middot 03333 + 09 middot 03333 = 06667

P(D1T ) = 1 minus P(D1H ) = 03333

January 1 2017 6 26

Solution 2 2 We are given the data D1H First update the probabilities for the type of coin

Let D2H = lsquotoss 2 is headsrsquo D2T = lsquotoss 2 is tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D1H |H) P(D1H |H)P(H) P(H|D1H ) A B C

13 13 13

05 06 09

01667 02 03

025 03 045

total 1 06667 1

Next use the law of total probability

P(D2H |D1H ) = P(D2H |A)P(A|D1H ) + P(D2H |B)P(B |D1H ) +P(D2H |C )P(C |D1H )

= 071

P(D2T |D1H ) = 029 January 1 2017 7 26

Three coins continued

As before 3 coins with probabilities 05 06 and 09 of heads

Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Concept question Whatrsquos your best guess for the probability of heads on the next toss

(a) 01 (b) 02 (c) 03 (d) 04

(e) 05 (f) 06 (g) 07 (h) 08

(i) 09 (j) 10

January 1 2017 8 26

Board question three coins

Same setup 3 coins with probabilities 05 06 and 09 of heads Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Compute the posterior probabilities for the type of coin and the posterior predictive probabilities for the results of the next toss

1 Specify clearly the set of hypotheses and the prior probabilities

2 Compute the prior and posterior predictive distributions ie give the probabilities of all possible outcomes

answer See next slide

January 1 2017 9 26

Solution

Data = lsquo1 head and 4 tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D|H)P P P(D|H)P(H) P(H|D ) A B C

13 13 13

5 1 05

5 P5 1 P 06 middot 44P5

1 P09 middot 14

00521 00256 000015

0669 0329 0002

total 1 00778 1

So

P(heads|D) = 0669 middot 05 + 0329 middot 06 + 0002 middot 09 = 053366 P(tails|D) = 1 minus P(heads|D) = 046634

January 1 2017 10 26

Concept Question

Does the order of the 1 head and 4 tails affect the posterior distribution of the coin type

1 Yes 2 No

Does the order of the 1 head and 4 tails affect the posterior predictive distribution of the next flip

1 Yes 2 No

answer No for both questions

January 1 2017 11 26

Odds

Definition The odds of an event are

P(E )O(E ) =

P(E c )

Usually for two choices E and not E Can split multiple outcomes into two groups Can do odds of A vs B = P(A)P(B) Our Bayesian focus Updating the odds of a hypothesis H given data D

January 1 2017 12 26

Examples

A fair coin has O(heads) = 05 05

= 1

We say lsquo1 to 1rsquo or lsquofifty-fiftyrsquo

The odds of rolling a 4 with a six-sided die are

We say lsquo1 to 5 forrsquo or lsquo5 to 1 againstrsquo

16 56

= 1 5

For event E if P(E ) = p then O(E ) = p

1 minus p

If an event is rare then P(E ) asymp O(E )

January 1 2017 13 26

Bayesian framework Marfanrsquos Syndrome

Marfanrsquos syndrome (M) is a genetic disease of connective tissue The main ocular features (F) of Marfan syndrome include bilateral ectopia lentis (lens dislocation) myopia and retinal detachment

P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

If a person has the main ocular features F what is the probability they have Marfanrsquos syndrome

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(F |H) P(F |H)P(H) P(H|F ) M 0000067 07 00000467 000066 Mc 0999933 007 0069995 099933 total 1 007004 1

January 1 2017 14 26

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Example Three types of coins

Type A coins are fair with probability 05 of heads Type B coins have probability 06 of heads Type C coins have probability 09 of heads

A drawer contains one coin of each type You pick one at random

Prior predictive probability Before taking data what is the probability a toss will land heads Tails

Take data say the first toss lands heads

Posterior predictive probability After taking data What is the probability the next toss lands heads Tails

January 1 2017 5 26

Solution 1

1 Use the law of total probability (A probability tree is an excellent way to visualize this You should draw one before reading on)

Let D1H = lsquotoss 1 is headsrsquo D1T = lsquotoss 1 is tailsrsquo

P(D1H ) = P(D1H |A)P(A) + P(D1H |B)P(B) + P(D1H |C )P(C ) = 05 middot 03333 + 06 middot 03333 + 09 middot 03333 = 06667

P(D1T ) = 1 minus P(D1H ) = 03333

January 1 2017 6 26

Solution 2 2 We are given the data D1H First update the probabilities for the type of coin

Let D2H = lsquotoss 2 is headsrsquo D2T = lsquotoss 2 is tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D1H |H) P(D1H |H)P(H) P(H|D1H ) A B C

13 13 13

05 06 09

01667 02 03

025 03 045

total 1 06667 1

Next use the law of total probability

P(D2H |D1H ) = P(D2H |A)P(A|D1H ) + P(D2H |B)P(B |D1H ) +P(D2H |C )P(C |D1H )

= 071

P(D2T |D1H ) = 029 January 1 2017 7 26

Three coins continued

As before 3 coins with probabilities 05 06 and 09 of heads

Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Concept question Whatrsquos your best guess for the probability of heads on the next toss

(a) 01 (b) 02 (c) 03 (d) 04

(e) 05 (f) 06 (g) 07 (h) 08

(i) 09 (j) 10

January 1 2017 8 26

Board question three coins

Same setup 3 coins with probabilities 05 06 and 09 of heads Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Compute the posterior probabilities for the type of coin and the posterior predictive probabilities for the results of the next toss

1 Specify clearly the set of hypotheses and the prior probabilities

2 Compute the prior and posterior predictive distributions ie give the probabilities of all possible outcomes

answer See next slide

January 1 2017 9 26

Solution

Data = lsquo1 head and 4 tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D|H)P P P(D|H)P(H) P(H|D ) A B C

13 13 13

5 1 05

5 P5 1 P 06 middot 44P5

1 P09 middot 14

00521 00256 000015

0669 0329 0002

total 1 00778 1

So

P(heads|D) = 0669 middot 05 + 0329 middot 06 + 0002 middot 09 = 053366 P(tails|D) = 1 minus P(heads|D) = 046634

January 1 2017 10 26

Concept Question

Does the order of the 1 head and 4 tails affect the posterior distribution of the coin type

1 Yes 2 No

Does the order of the 1 head and 4 tails affect the posterior predictive distribution of the next flip

1 Yes 2 No

answer No for both questions

January 1 2017 11 26

Odds

Definition The odds of an event are

P(E )O(E ) =

P(E c )

Usually for two choices E and not E Can split multiple outcomes into two groups Can do odds of A vs B = P(A)P(B) Our Bayesian focus Updating the odds of a hypothesis H given data D

January 1 2017 12 26

Examples

A fair coin has O(heads) = 05 05

= 1

We say lsquo1 to 1rsquo or lsquofifty-fiftyrsquo

The odds of rolling a 4 with a six-sided die are

We say lsquo1 to 5 forrsquo or lsquo5 to 1 againstrsquo

16 56

= 1 5

For event E if P(E ) = p then O(E ) = p

1 minus p

If an event is rare then P(E ) asymp O(E )

January 1 2017 13 26

Bayesian framework Marfanrsquos Syndrome

Marfanrsquos syndrome (M) is a genetic disease of connective tissue The main ocular features (F) of Marfan syndrome include bilateral ectopia lentis (lens dislocation) myopia and retinal detachment

P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

If a person has the main ocular features F what is the probability they have Marfanrsquos syndrome

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(F |H) P(F |H)P(H) P(H|F ) M 0000067 07 00000467 000066 Mc 0999933 007 0069995 099933 total 1 007004 1

January 1 2017 14 26

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Solution 1

1 Use the law of total probability (A probability tree is an excellent way to visualize this You should draw one before reading on)

Let D1H = lsquotoss 1 is headsrsquo D1T = lsquotoss 1 is tailsrsquo

P(D1H ) = P(D1H |A)P(A) + P(D1H |B)P(B) + P(D1H |C )P(C ) = 05 middot 03333 + 06 middot 03333 + 09 middot 03333 = 06667

P(D1T ) = 1 minus P(D1H ) = 03333

January 1 2017 6 26

Solution 2 2 We are given the data D1H First update the probabilities for the type of coin

Let D2H = lsquotoss 2 is headsrsquo D2T = lsquotoss 2 is tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D1H |H) P(D1H |H)P(H) P(H|D1H ) A B C

13 13 13

05 06 09

01667 02 03

025 03 045

total 1 06667 1

Next use the law of total probability

P(D2H |D1H ) = P(D2H |A)P(A|D1H ) + P(D2H |B)P(B |D1H ) +P(D2H |C )P(C |D1H )

= 071

P(D2T |D1H ) = 029 January 1 2017 7 26

Three coins continued

As before 3 coins with probabilities 05 06 and 09 of heads

Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Concept question Whatrsquos your best guess for the probability of heads on the next toss

(a) 01 (b) 02 (c) 03 (d) 04

(e) 05 (f) 06 (g) 07 (h) 08

(i) 09 (j) 10

January 1 2017 8 26

Board question three coins

Same setup 3 coins with probabilities 05 06 and 09 of heads Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Compute the posterior probabilities for the type of coin and the posterior predictive probabilities for the results of the next toss

1 Specify clearly the set of hypotheses and the prior probabilities

2 Compute the prior and posterior predictive distributions ie give the probabilities of all possible outcomes

answer See next slide

January 1 2017 9 26

Solution

Data = lsquo1 head and 4 tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D|H)P P P(D|H)P(H) P(H|D ) A B C

13 13 13

5 1 05

5 P5 1 P 06 middot 44P5

1 P09 middot 14

00521 00256 000015

0669 0329 0002

total 1 00778 1

So

P(heads|D) = 0669 middot 05 + 0329 middot 06 + 0002 middot 09 = 053366 P(tails|D) = 1 minus P(heads|D) = 046634

January 1 2017 10 26

Concept Question

Does the order of the 1 head and 4 tails affect the posterior distribution of the coin type

1 Yes 2 No

Does the order of the 1 head and 4 tails affect the posterior predictive distribution of the next flip

1 Yes 2 No

answer No for both questions

January 1 2017 11 26

Odds

Definition The odds of an event are

P(E )O(E ) =

P(E c )

Usually for two choices E and not E Can split multiple outcomes into two groups Can do odds of A vs B = P(A)P(B) Our Bayesian focus Updating the odds of a hypothesis H given data D

January 1 2017 12 26

Examples

A fair coin has O(heads) = 05 05

= 1

We say lsquo1 to 1rsquo or lsquofifty-fiftyrsquo

The odds of rolling a 4 with a six-sided die are

We say lsquo1 to 5 forrsquo or lsquo5 to 1 againstrsquo

16 56

= 1 5

For event E if P(E ) = p then O(E ) = p

1 minus p

If an event is rare then P(E ) asymp O(E )

January 1 2017 13 26

Bayesian framework Marfanrsquos Syndrome

Marfanrsquos syndrome (M) is a genetic disease of connective tissue The main ocular features (F) of Marfan syndrome include bilateral ectopia lentis (lens dislocation) myopia and retinal detachment

P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

If a person has the main ocular features F what is the probability they have Marfanrsquos syndrome

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(F |H) P(F |H)P(H) P(H|F ) M 0000067 07 00000467 000066 Mc 0999933 007 0069995 099933 total 1 007004 1

January 1 2017 14 26

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Solution 2 2 We are given the data D1H First update the probabilities for the type of coin

Let D2H = lsquotoss 2 is headsrsquo D2T = lsquotoss 2 is tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D1H |H) P(D1H |H)P(H) P(H|D1H ) A B C

13 13 13

05 06 09

01667 02 03

025 03 045

total 1 06667 1

Next use the law of total probability

P(D2H |D1H ) = P(D2H |A)P(A|D1H ) + P(D2H |B)P(B |D1H ) +P(D2H |C )P(C |D1H )

= 071

P(D2T |D1H ) = 029 January 1 2017 7 26

Three coins continued

As before 3 coins with probabilities 05 06 and 09 of heads

Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Concept question Whatrsquos your best guess for the probability of heads on the next toss

(a) 01 (b) 02 (c) 03 (d) 04

(e) 05 (f) 06 (g) 07 (h) 08

(i) 09 (j) 10

January 1 2017 8 26

Board question three coins

Same setup 3 coins with probabilities 05 06 and 09 of heads Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Compute the posterior probabilities for the type of coin and the posterior predictive probabilities for the results of the next toss

1 Specify clearly the set of hypotheses and the prior probabilities

2 Compute the prior and posterior predictive distributions ie give the probabilities of all possible outcomes

answer See next slide

January 1 2017 9 26

Solution

Data = lsquo1 head and 4 tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D|H)P P P(D|H)P(H) P(H|D ) A B C

13 13 13

5 1 05

5 P5 1 P 06 middot 44P5

1 P09 middot 14

00521 00256 000015

0669 0329 0002

total 1 00778 1

So

P(heads|D) = 0669 middot 05 + 0329 middot 06 + 0002 middot 09 = 053366 P(tails|D) = 1 minus P(heads|D) = 046634

January 1 2017 10 26

Concept Question

Does the order of the 1 head and 4 tails affect the posterior distribution of the coin type

1 Yes 2 No

Does the order of the 1 head and 4 tails affect the posterior predictive distribution of the next flip

1 Yes 2 No

answer No for both questions

January 1 2017 11 26

Odds

Definition The odds of an event are

P(E )O(E ) =

P(E c )

Usually for two choices E and not E Can split multiple outcomes into two groups Can do odds of A vs B = P(A)P(B) Our Bayesian focus Updating the odds of a hypothesis H given data D

January 1 2017 12 26

Examples

A fair coin has O(heads) = 05 05

= 1

We say lsquo1 to 1rsquo or lsquofifty-fiftyrsquo

The odds of rolling a 4 with a six-sided die are

We say lsquo1 to 5 forrsquo or lsquo5 to 1 againstrsquo

16 56

= 1 5

For event E if P(E ) = p then O(E ) = p

1 minus p

If an event is rare then P(E ) asymp O(E )

January 1 2017 13 26

Bayesian framework Marfanrsquos Syndrome

Marfanrsquos syndrome (M) is a genetic disease of connective tissue The main ocular features (F) of Marfan syndrome include bilateral ectopia lentis (lens dislocation) myopia and retinal detachment

P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

If a person has the main ocular features F what is the probability they have Marfanrsquos syndrome

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(F |H) P(F |H)P(H) P(H|F ) M 0000067 07 00000467 000066 Mc 0999933 007 0069995 099933 total 1 007004 1

January 1 2017 14 26

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Three coins continued

As before 3 coins with probabilities 05 06 and 09 of heads

Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Concept question Whatrsquos your best guess for the probability of heads on the next toss

(a) 01 (b) 02 (c) 03 (d) 04

(e) 05 (f) 06 (g) 07 (h) 08

(i) 09 (j) 10

January 1 2017 8 26

Board question three coins

Same setup 3 coins with probabilities 05 06 and 09 of heads Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Compute the posterior probabilities for the type of coin and the posterior predictive probabilities for the results of the next toss

1 Specify clearly the set of hypotheses and the prior probabilities

2 Compute the prior and posterior predictive distributions ie give the probabilities of all possible outcomes

answer See next slide

January 1 2017 9 26

Solution

Data = lsquo1 head and 4 tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D|H)P P P(D|H)P(H) P(H|D ) A B C

13 13 13

5 1 05

5 P5 1 P 06 middot 44P5

1 P09 middot 14

00521 00256 000015

0669 0329 0002

total 1 00778 1

So

P(heads|D) = 0669 middot 05 + 0329 middot 06 + 0002 middot 09 = 053366 P(tails|D) = 1 minus P(heads|D) = 046634

January 1 2017 10 26

Concept Question

Does the order of the 1 head and 4 tails affect the posterior distribution of the coin type

1 Yes 2 No

Does the order of the 1 head and 4 tails affect the posterior predictive distribution of the next flip

1 Yes 2 No

answer No for both questions

January 1 2017 11 26

Odds

Definition The odds of an event are

P(E )O(E ) =

P(E c )

Usually for two choices E and not E Can split multiple outcomes into two groups Can do odds of A vs B = P(A)P(B) Our Bayesian focus Updating the odds of a hypothesis H given data D

January 1 2017 12 26

Examples

A fair coin has O(heads) = 05 05

= 1

We say lsquo1 to 1rsquo or lsquofifty-fiftyrsquo

The odds of rolling a 4 with a six-sided die are

We say lsquo1 to 5 forrsquo or lsquo5 to 1 againstrsquo

16 56

= 1 5

For event E if P(E ) = p then O(E ) = p

1 minus p

If an event is rare then P(E ) asymp O(E )

January 1 2017 13 26

Bayesian framework Marfanrsquos Syndrome

Marfanrsquos syndrome (M) is a genetic disease of connective tissue The main ocular features (F) of Marfan syndrome include bilateral ectopia lentis (lens dislocation) myopia and retinal detachment

P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

If a person has the main ocular features F what is the probability they have Marfanrsquos syndrome

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(F |H) P(F |H)P(H) P(H|F ) M 0000067 07 00000467 000066 Mc 0999933 007 0069995 099933 total 1 007004 1

January 1 2017 14 26

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Board question three coins

Same setup 3 coins with probabilities 05 06 and 09 of heads Pick one toss 5 times Suppose you get 1 head out of 5 tosses

Compute the posterior probabilities for the type of coin and the posterior predictive probabilities for the results of the next toss

1 Specify clearly the set of hypotheses and the prior probabilities

2 Compute the prior and posterior predictive distributions ie give the probabilities of all possible outcomes

answer See next slide

January 1 2017 9 26

Solution

Data = lsquo1 head and 4 tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D|H)P P P(D|H)P(H) P(H|D ) A B C

13 13 13

5 1 05

5 P5 1 P 06 middot 44P5

1 P09 middot 14

00521 00256 000015

0669 0329 0002

total 1 00778 1

So

P(heads|D) = 0669 middot 05 + 0329 middot 06 + 0002 middot 09 = 053366 P(tails|D) = 1 minus P(heads|D) = 046634

January 1 2017 10 26

Concept Question

Does the order of the 1 head and 4 tails affect the posterior distribution of the coin type

1 Yes 2 No

Does the order of the 1 head and 4 tails affect the posterior predictive distribution of the next flip

1 Yes 2 No

answer No for both questions

January 1 2017 11 26

Odds

Definition The odds of an event are

P(E )O(E ) =

P(E c )

Usually for two choices E and not E Can split multiple outcomes into two groups Can do odds of A vs B = P(A)P(B) Our Bayesian focus Updating the odds of a hypothesis H given data D

January 1 2017 12 26

Examples

A fair coin has O(heads) = 05 05

= 1

We say lsquo1 to 1rsquo or lsquofifty-fiftyrsquo

The odds of rolling a 4 with a six-sided die are

We say lsquo1 to 5 forrsquo or lsquo5 to 1 againstrsquo

16 56

= 1 5

For event E if P(E ) = p then O(E ) = p

1 minus p

If an event is rare then P(E ) asymp O(E )

January 1 2017 13 26

Bayesian framework Marfanrsquos Syndrome

Marfanrsquos syndrome (M) is a genetic disease of connective tissue The main ocular features (F) of Marfan syndrome include bilateral ectopia lentis (lens dislocation) myopia and retinal detachment

P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

If a person has the main ocular features F what is the probability they have Marfanrsquos syndrome

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(F |H) P(F |H)P(H) P(H|F ) M 0000067 07 00000467 000066 Mc 0999933 007 0069995 099933 total 1 007004 1

January 1 2017 14 26

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Solution

Data = lsquo1 head and 4 tailsrsquo

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(D|H)P P P(D|H)P(H) P(H|D ) A B C

13 13 13

5 1 05

5 P5 1 P 06 middot 44P5

1 P09 middot 14

00521 00256 000015

0669 0329 0002

total 1 00778 1

So

P(heads|D) = 0669 middot 05 + 0329 middot 06 + 0002 middot 09 = 053366 P(tails|D) = 1 minus P(heads|D) = 046634

January 1 2017 10 26

Concept Question

Does the order of the 1 head and 4 tails affect the posterior distribution of the coin type

1 Yes 2 No

Does the order of the 1 head and 4 tails affect the posterior predictive distribution of the next flip

1 Yes 2 No

answer No for both questions

January 1 2017 11 26

Odds

Definition The odds of an event are

P(E )O(E ) =

P(E c )

Usually for two choices E and not E Can split multiple outcomes into two groups Can do odds of A vs B = P(A)P(B) Our Bayesian focus Updating the odds of a hypothesis H given data D

January 1 2017 12 26

Examples

A fair coin has O(heads) = 05 05

= 1

We say lsquo1 to 1rsquo or lsquofifty-fiftyrsquo

The odds of rolling a 4 with a six-sided die are

We say lsquo1 to 5 forrsquo or lsquo5 to 1 againstrsquo

16 56

= 1 5

For event E if P(E ) = p then O(E ) = p

1 minus p

If an event is rare then P(E ) asymp O(E )

January 1 2017 13 26

Bayesian framework Marfanrsquos Syndrome

Marfanrsquos syndrome (M) is a genetic disease of connective tissue The main ocular features (F) of Marfan syndrome include bilateral ectopia lentis (lens dislocation) myopia and retinal detachment

P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

If a person has the main ocular features F what is the probability they have Marfanrsquos syndrome

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(F |H) P(F |H)P(H) P(H|F ) M 0000067 07 00000467 000066 Mc 0999933 007 0069995 099933 total 1 007004 1

January 1 2017 14 26

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Concept Question

Does the order of the 1 head and 4 tails affect the posterior distribution of the coin type

1 Yes 2 No

Does the order of the 1 head and 4 tails affect the posterior predictive distribution of the next flip

1 Yes 2 No

answer No for both questions

January 1 2017 11 26

Odds

Definition The odds of an event are

P(E )O(E ) =

P(E c )

Usually for two choices E and not E Can split multiple outcomes into two groups Can do odds of A vs B = P(A)P(B) Our Bayesian focus Updating the odds of a hypothesis H given data D

January 1 2017 12 26

Examples

A fair coin has O(heads) = 05 05

= 1

We say lsquo1 to 1rsquo or lsquofifty-fiftyrsquo

The odds of rolling a 4 with a six-sided die are

We say lsquo1 to 5 forrsquo or lsquo5 to 1 againstrsquo

16 56

= 1 5

For event E if P(E ) = p then O(E ) = p

1 minus p

If an event is rare then P(E ) asymp O(E )

January 1 2017 13 26

Bayesian framework Marfanrsquos Syndrome

Marfanrsquos syndrome (M) is a genetic disease of connective tissue The main ocular features (F) of Marfan syndrome include bilateral ectopia lentis (lens dislocation) myopia and retinal detachment

P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

If a person has the main ocular features F what is the probability they have Marfanrsquos syndrome

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(F |H) P(F |H)P(H) P(H|F ) M 0000067 07 00000467 000066 Mc 0999933 007 0069995 099933 total 1 007004 1

January 1 2017 14 26

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Odds

Definition The odds of an event are

P(E )O(E ) =

P(E c )

Usually for two choices E and not E Can split multiple outcomes into two groups Can do odds of A vs B = P(A)P(B) Our Bayesian focus Updating the odds of a hypothesis H given data D

January 1 2017 12 26

Examples

A fair coin has O(heads) = 05 05

= 1

We say lsquo1 to 1rsquo or lsquofifty-fiftyrsquo

The odds of rolling a 4 with a six-sided die are

We say lsquo1 to 5 forrsquo or lsquo5 to 1 againstrsquo

16 56

= 1 5

For event E if P(E ) = p then O(E ) = p

1 minus p

If an event is rare then P(E ) asymp O(E )

January 1 2017 13 26

Bayesian framework Marfanrsquos Syndrome

Marfanrsquos syndrome (M) is a genetic disease of connective tissue The main ocular features (F) of Marfan syndrome include bilateral ectopia lentis (lens dislocation) myopia and retinal detachment

P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

If a person has the main ocular features F what is the probability they have Marfanrsquos syndrome

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(F |H) P(F |H)P(H) P(H|F ) M 0000067 07 00000467 000066 Mc 0999933 007 0069995 099933 total 1 007004 1

January 1 2017 14 26

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Examples

A fair coin has O(heads) = 05 05

= 1

We say lsquo1 to 1rsquo or lsquofifty-fiftyrsquo

The odds of rolling a 4 with a six-sided die are

We say lsquo1 to 5 forrsquo or lsquo5 to 1 againstrsquo

16 56

= 1 5

For event E if P(E ) = p then O(E ) = p

1 minus p

If an event is rare then P(E ) asymp O(E )

January 1 2017 13 26

Bayesian framework Marfanrsquos Syndrome

Marfanrsquos syndrome (M) is a genetic disease of connective tissue The main ocular features (F) of Marfan syndrome include bilateral ectopia lentis (lens dislocation) myopia and retinal detachment

P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

If a person has the main ocular features F what is the probability they have Marfanrsquos syndrome

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(F |H) P(F |H)P(H) P(H|F ) M 0000067 07 00000467 000066 Mc 0999933 007 0069995 099933 total 1 007004 1

January 1 2017 14 26

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Bayesian framework Marfanrsquos Syndrome

Marfanrsquos syndrome (M) is a genetic disease of connective tissue The main ocular features (F) of Marfan syndrome include bilateral ectopia lentis (lens dislocation) myopia and retinal detachment

P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

If a person has the main ocular features F what is the probability they have Marfanrsquos syndrome

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(F |H) P(F |H)P(H) P(H|F ) M 0000067 07 00000467 000066 Mc 0999933 007 0069995 099933 total 1 007004 1

January 1 2017 14 26

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Odds form P(M) = 115000 P(F |M) = 07 P(F |Mc ) = 007

Prior odds

P(M) 115000 1 O(M) = = = = 0000067

P(Mc ) 1499915000 14999

Note O(M) asymp P(M) since P(M) is small

Posterior odds can use the Bayes numerator

P(M |F ) P(F |M)P(M)O(M |F ) = = = 0000667

P(Mc |F ) P(F |Mc )P(Mc )

The posterior odds is a product of factors

P(F |M) P(M) 07 O(M |F ) = middot = middot O(M)

P(F |Mc ) P(Mc ) 007

January 1 2017 15 26

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Bayes factors

P(F |M) P(M)O(M |F ) = middot

P(F |Mc ) P(Mc )

P(F |M) = middot O(M)

P(F |Mc )

posterior odds = Bayes factor middot prior odds

The Bayes factor is the ratio of the likelihoods The Bayes factor gives the strength of the lsquoevidencersquo provided by the data A large Bayes factor times small prior odds can be small (or large or in between) The Bayes factor for ocular features is 07007 = 10

January 1 2017 16 26

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Board Question screening tests A disease is present in 0005 of the population

A screening test has a 005 false positive rate and a 002 false negative rate

1 Give the prior odds a patient has the disease

Assume the patient tests positive

2 What is the Bayes factor for this data

3 What are the posterior odds they have the disease

4 Based on your answers to (1) and (2) would you say a positive test (the data) provides strong or weak evidence for the presence of the disease

answer See next slide January 1 2017 17 26

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Solution Let H+ = lsquohas diseasersquo and Hminus = lsquodoesnrsquotrsquo Let T+ = positive test

P(H+) 0005 1 O(H+) = = = 000503

P(Hminus) 0995 Likelihood table

Hypotheses

Possible data T+ Tminus

H+ 098 002 Hminus 005 095

P(T+|H+) 098 2 Bayes factor = ratio of likelihoods = = = 196

P(T+|Hminus) 005 3 Posterior odds = Bayes factor times prior odds = 196 times 000504 = 00985

4 Yes a Bayes factor of 196 indicates a positive test is strong evidence the patient has the disease The posterior odds are still small because the prior odds are extremely small More on next slide

January 1 2017 18 26

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Solution continued

Of course we can compute the posterior odds by computing the posterior probabilities using a Bayesian update table

hypothesis prior likelihood Bayes

numerator posterior H P(H) P(T+|H) P(T+|H)P(H) P(H|T+) H+ 0005 098 000490 00897 Hminus 0995 005 004975 09103 total 1 005474 1

00897 Posterior odds O(H+|T+) = = 00985

09103

January 1 2017 19 26

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Board Question CSI Blood Types Crime scene the two perpetrators left blood one of type O and one of type AB In population 60 are type O and 1 are type AB

1 Suspect Oliver is tested and has type O blood Compute the Bayes factor and posterior odds that Oliver was one of the perpetrators Is the data evidence for or against the hypothesis that Oliver is guilty

2 Same question for suspect Alberto who has type AB blood

Show helpful hint on next slide

From lsquoInformation Theory Inference and Learning Algorithmsrsquo by David J C Mackay

January 1 2017 20 26

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Helpful hint

Population 60 type O 1 type AB

For the question about Oliver we have

Hypotheses S = lsquoOliver and another unknown person were at the scenersquo Sc = lsquotwo unknown people were at the scenersquo

Data D = lsquotype lsquoOrsquo and lsquoABrsquo blood were found Oliver is type Orsquo

January 1 2017 21 26

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Solution to CSI Blood Types

For Oliver

P(D|S) 001 Bayes factor = = = 083

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 083 times prior odds (O(S |D) = 083 middot O(S)) Since the odds of his presence decreased this is (weak) evidence of his innocence

For Alberto

P(D|S) 06 Bayes factor = = = 50

P(D|Sc ) 2 middot 06 middot 001

Therefore the posterior odds = 50 times prior odds (O(S |D) = 50 middot O(S)) Since the odds of his presence increased this is (strong) evidence of his presence at the scene

January 1 2017 22 26

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Legal Thoughts

David Mackay

ldquoIn my view a juryrsquos task should generally be to multiply together carefully evaluated likelihood ratios from each independent piece of admissible evidence with an equally carefully reasoned prior probability This view is shared by many statisticians but learned British appeal judges recently disagreed and actually overturned the verdict of a trial because the jurors had been taught to use Bayesrsquo theorem to handle complicated DNA evidencerdquo

January 1 2017 23 26

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Updating again and again

Collect data D1 D2

Posterior odds to D1 become prior odds to D2 So

P(D1|H) P(D2|H)O(H |D1 D2) = O(H) middot middot

P(D1|Hc ) P(D2|Hc )

= O(H) middot BF1 middot BF2

Independence assumption D1 and D2 are conditionally independent

P(D1 D2|H) = P(D1|H)P(D2|H)

January 1 2017 24 26

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

Marfanrsquos Symptoms The Bayes factor for ocular features (F) is

P(F |M) 07 BFF = = = 10

P(F |Mc ) 007 The wrist sign (W) is the ability to wrap one hand around your other wrist to cover your pinky nail with your thumb Assume 10 of the population have the wrist sign while 90 of people with Marfanrsquos have it So

P(W |M) 09 BFW = = = 9

P(W |Mc ) 01 1 6

O(M |F W ) = O(M) middot BFF middot BFW = middot 10 middot 9 asymp 14999 1000

We can convert posterior odds back to probability but since the odds are so small the result is nearly the same

6 P(M |F W ) asymp asymp 0596

1000 + 6

January 1 2017 25 26

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms

MIT OpenCourseWarehttpsocwmitedu

1805 Introduction to Probability and StatisticsSpring 2014

For information about citing these materials or our Terms of Use visit httpsocwmiteduterms