Download presentation
Presentation is loading. Please wait.
1
Likelihood and Bayes Brian O’Meara http://www.brianomeara.info http://xkcd.com/1132/
2
Predict the number of heads in the next 18 flips (write prediction and your name on sticky note). Guess right and get a candy [regardless of how many others get it right]
3
Probability of getting a single heads given p = p
4
Probability of getting two heads given p = p 2
5
Probability(data given p) = p 2 Probability(data | p) = p 2 Likelihood(p | data) = Probability(data | p) = p 2
6
Probability of getting two heads given p = p 2 Likelihood Parameter p
7
Likelihood
8
Parameter p Likelihood
9
Abzhanov et al. 2006
10
Evolutionary rate Likelihood
11
Properties of likelihood as a method Consistent (given correct model) Efficient (no other estimator has a lower mean squared error as dataset size approaches infinity) Often biased, bias decreases with sample size
12
Likelihoods can get really small, even with simple fair coin Number of throws Number of heads LikelihoodLog Likelihood 110.5-0.6931472 520.3125-1.163151 100250.00000019314-15.46935 500150 0.00000000000 0000000005279 -44.38798 Limits of your machine's precision in R: noquote(unlist(format(.Machine)))
13
Likelihood ratio test Models must be nested (one must be a restriction of the other)
14
Huelsenbeck& Crandall 1997
15
AIC ∆AIC Level of empirical support for model 0 – 2Substantial 4 – 7Considerably less 10+Essentially none Burnham & Anderson 2004
16
Butler & King 2004 ∆AICc7.0311.039.484.470.00 relative likelihood 0.0300.0040.0000.1071 weight 0.030.000.080.090.87 Model averaged sigma: 0.21 x 0.03 + 0.21 x 0 + 0.20 x 0.08 + 0.47 x 0.09 + 0.22 x 0.87 = 0.26
17
Parameter p Likelihood How many of you guessed that 18 x 2/3 = 12 would be heads when candy was on the line?
18
http://xkcd.com/1236/ Conditional probability
19
http://xkcd.com/1236/ Bayesian statistics Hyp.Data Hyp.
20
Bayesian statistics P(H | D) = P(D | H) x P(H) P(D) P(H | D) = Posterior P(D | H) = Likelihood P(H) = Prior P(D) = Prob of the data, over any hypothesis
21
Bayesian statistics P(H | D) = P(D | H) x P(H) P(D) P(H | D) = Posterior P(D | H) = Likelihood P(H) = Prior P(D) = Prob of the data, over any hypothesis
22
LikelihoodPriorsPosteriors
23
Bayesian statistics P(H | D) = P(D | H) x P(H) P(D) P(H | D) = Posterior P(D | H) = Likelihood P(H) = Prior P(D) = Prob of the data, over any hypothesis
24
Markov Chain Monte Carlo Markov Chain: series of steps, each step ONLY depends on current state, not states further in the past Monte Carlo: repeated sampling from distribution. Think Las Vegas
25
http://salmagundiboston.blogspot.com/
26
Bayes Factors
27
Reversible jump MCMC Model 1 Model 2 Model 1
28
Approximate Bayesian Computation (can do with likelihood, too)
29
Multivariate normal
32
What is the probability of heads for our coin?
36
Let p = 0.2 Sim 1: HTTTTHTT Sim 2: TTHHTTTT Sim 3: TTTHHTHH Sim 4: TTTTTTTT Sim 5: TTTTTTTT Sim 6: THHTTTTH Sim 7: TTHHTTHT Sim 8: TTTTHHHT Sim 9: HTTHTTTT Sim 10: THHHTHTT
37
What is the probability of heads for our coin? Let p = 0.2 Sim 1: HTTTTHTT Sim 2: TTHHTTTT Sim 3: TTTHHTHH Sim 4: TTTTTTTT Sim 5: TTTTTTTT Sim 6: THHTTTTH Sim 7: TTHHTTHT Sim 8: TTTTHHHT Sim 9: HTTHTTTT Sim 10: THHHTHTT
38
What is the probability of heads for our coin? Let p = 0.2 Sim 1: HTTTTHTT Sim 2: TTHHTTTT Sim 3: TTTHHTHH Sim 4: TTTTTTTT Sim 5: TTTTTTTT Sim 6: THHTTTTH Sim 7: TTHHTTHT Sim 8: TTTTHHHT Sim 9: HTTHTTTT Sim 10: THHHTHTT P(data) ≈ 1/10
39
What is the probability of heads for our coin? 200 simulations per p True Approximation
40
What is the probability of heads for our coin? 2,000 simulations per p True Approximation
41
What is the probability of heads for our coin? 20,000 simulations per p True Approximation
42
What is the probability of heads for our coin? 200,000 simulations per p True Approximation
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.