Bayesian data analysis Outline
• What is probability
• Another definition of probability
• Bayes’ Theorem
• Prior probability and posterior probability
• How Bayesian inference is different from what we usually do
• Examples: one species or two; estimating a proportion
• Credible intervals
• Quick notes on Bayesian model selection What is probability
A way of quantifying uncertainty.
Mathematical theory originally developed to model outcomes in games of chance. Definition of probability (frequentist)
The probability of an event is the proportion of times that the event would occur if we repeated a random trial over and over again under the same conditions.
A probability distribution is a list of all mutually exclusive outcomes of a random trial and their probabilities of occurrence.
Probability statements that make sense under this definition
If we toss a fair coin, what is the probability of 10 heads in a row?
If we assign treatments randomly to subjects, what is the probability that a sample mean difference between treatments will be greater than 10%?
Under a process of genetic drift in a finite population, what is the probability of fixation of a rare allele?
What is the probability of a result at least as extreme as that observed if the null hypothesis is true?
In these examples, sampling error is the source of uncertainty. Probability statements that don’t make sense under this definition
What is the probability that Iran is building nuclear weapons?
What is the probability that hippos are the sister group to the whales?
What is the probability that the fish sampled from that newly discovered lake represent two species rather than one?
What is the probability that polar bears will be extinct in the wild in 40 years? Why they don’t make sense
What is the probability that Iran is building nuclear weapons? [either it is or it isn’t – no random trial here] What is the probability that hippos are the sister group to the whales? [either it is or it isn’t – no random trial here] What is the probability that the fish sampled from that newly discovered lake represent two species rather than one? [either there are one or there are two – no random trial] What is the probability that polar bears will be extinct in the wild in 40 years? [difficult to cast this as a frequency of occurrence] In these examples there is no random trial, so no sampling error. Information is the source of uncertainty. Alternative definition of probability (Bayesian)
Probability is a measure of a degree of belief associated with the occurrence of an event.
A probability distribution is a list of all mutually exclusive events and the degree of belief associated with their occurrence.
Bayesian statistics applies the mathematics of probability to subjective degree of belief. Bayesian methods are increasingly used in ecology and evolution
Is this good?
“Ecologists should be aware that Bayesian methods constitute a radically different way of doing science. Bayesian statistics is not just another tool to be added into the ecologists’ repertoire of statistical methods. Instead, Bayesians categorically reject various tenets of statistics and the scientific method that are currently widely accepted in ecology and other sciences.” B. Dennis, 1996, Ecology Bayes’ Theorem itself is harmless
Example: detection of Down syndrome (DS).
DS occurs in about 1 in 1000 pregnancies. The most accurate test requires amniocentesis, which carries a small risk of miscarriage. The triple test is used first. It is risk-free though less accurate.
Conditional probability
The conditional probability of an event is the probability of that event occurring given that a condition is met.
E.g.: the probability of a +ve test result from the triple test, given that a fetus has DS, is 0.6. Conditional probability calculation
What is the probability that a fetus has DS if the test is positive?
0.0006 Pr[DS | positive] = 0.0006 + 0.04995 = 0.012, just 1.2%