Presentation is loading. Please wait.

Presentation is loading. Please wait.

T HOMAS B AYES TO THE RESCUE st5219: Bayesian hierarchical modelling lecture 1.4.

Similar presentations


Presentation on theme: "T HOMAS B AYES TO THE RESCUE st5219: Bayesian hierarchical modelling lecture 1.4."— Presentation transcript:

1 T HOMAS B AYES TO THE RESCUE st5219: Bayesian hierarchical modelling lecture 1.4

2 B AYES THEOREM : MATHS ALERT (You know this already, right?)

3 B AYES THEOREM : APPLICATION You are GP in country like SP Foreign worker comes for HIV test HIV test results come back +ve Does worker have HIV? How to work out? Test sensitivity is 98% Test specificity is 96% ie f(test +ve | HIV +ve) = 0.98 f(test +ve | HIV --ve) = 0.04

4 B AYES THEOREM : APPLICATION Analogy to hypothesis testing Null hypothesis is not infected Test statistic is test result p-value is 4% Reject hypothesis of non-infection, conclude infected But we calculated: f(+ test | infected) NOT f(infected | + test) But we calculated: f(+ test | infected) NOT f(infected | + test)

5 B AYES THEOREM : APPLICATION How to work out? Test sensitivity is 98% Test specificity is 96% Infection rate is 1% ie f(test +ve | HIV +ve) = 0.98 f(test +ve | HIV --ve) = 0.04 f(HIV +ve) = 0.01

6 B AYES THEOREM : APPLICATION

7

8 AIDS AND H0 S Frequentists happy to use Bayes’ formula here But unhappy to use it to estimate parameters But... If you think it is wrong to use the probability of a positive test given non-infection to decide if infected given a positive test why use the probability of (imaginary) data given a null hypothesis to decide if a null hypothesis is true given data ?

9 T HE B AYESIAN I D AND FREQUENTIST E GO How do you normally estimate parameters? Is theta hat the most likely parameter value?

10 T HE B AYESIAN I D AND FREQUENTIST E GO The parameter that maximises the likelihood function is not the most likely parameter value How can we get the distribution of the parameters given the data? Bayes’ formula tells us posterior likelihood prior (this is a constant)

11 U PDATING INFORMATION VIA B AYES Can also work with 1.Start with information before the experiment: the prior 2.Add information from the experiment: the likelihood 3.Update to get final information: the posterior If more data come along later, the posterior becomes the prior for the next time

12 U PDATING INFORMATION VIA B AYES 1.Start with information before the experiment: the prior 2.Add information from the experiment: the likelihood 3.Update to get final information: the posterior

13 U PDATING INFORMATION VIA B AYES 1.Start with information before the experiment: the prior 2.Add information from the experiment: the likelihood 3.Update to get final information: the posterior

14 U PDATING INFORMATION VIA B AYES 1.Start with information before the experiment: the prior 2.Add information from the experiment: the likelihood 3.Update to get final information: the posterior

15 Mean: S UMMARISING THE POSTERIOR Median:Mode:

16 S UMMARISING THE POSTERIOR 95% credible interval: chop off 2.5% from either side of posterior

17 S UMMARISING THE POSTERIOR Bye bye delta approxi mations !!!

18 S OUNDS TOO EASY ! W HAT ’ S THE CATCH ?! Here are where the difficulties are: 1. building the model 2. obtaining the posterior 3. model assessment Same issues arise in frequentist statistics (1, 3); estimating MLEs and CIs difficult for non à la carte problems Let’s see an example! Back to AIDS!


Download ppt "T HOMAS B AYES TO THE RESCUE st5219: Bayesian hierarchical modelling lecture 1.4."

Similar presentations


Ads by Google