SlideShare a Scribd company logo
Bayesian for us
Masahiro Ryo
masahiroryo@gmail.com
Matthias Rillig Lab.
Freie Universität Berlin
Berlin-Brandenburg Institute of
Advanced Biodiversity Research
2016.07.27
1. Bayes' theorem
2. What is same?
3. What is “practically” different?
4. p-value and our intuition
5. Assumptions
6. By the way…
7. prior distribution
8. Summary
2
Outline
Practical part
Technical part
3
1. Bayes' theorem
P(A|B) =
P(B|A) P(A)
P(B)
P(A): the probability of observing event A
P(A|B): a conditional probability, the probability of
observing event A given that B is true
4
1. Bayes' theorem
P(A|B) =
P(B|A) P(A)
P(B)
P(A): the probability of observing event A
P(A|B): a conditional probability, the probability of
observing event A given that B is true
5
2. What is same?
1. To assume a hypothesis
• M under the treatment is larger
than M under control (comparison)
• Y is increased by increasing X
(correlation)
2. To collect samples
3. To test the hypothesis
population
samples
Statistical test
6
3. What is “practically” different? - test
Frequentists Bayesians
“if p < 0.05 or not” “how probable”
1. Set a null hypothesis H0
2. Estimate probability of type I
error (p-value)
3. Evaluate how rarely H0 occurs
4. Reject H0 and support H1
1. Set a hypothesis H1
2. Evaluate how possibly H1 occurs
Bayesian is more direct
and intuitive
to test a hypothesis
e.g., my hypothesis was supported
with 80% probability.
7
3. What is “practically” different?
Frequentists Bayesians
“how probable”“if p < 0.05 or not”
y = β0 + β1 x
Parameter β1
Probability
0.89
H0: β1 = 0 is rejected
H1: β1 ≠ 0 is supported
(and β1= 0.89)
The parameter β1 is rarely <0,
so H1 is greatly supported.
Most probably β1=0.89 and
can span between 0.28 and 1.52
with 95% probability.
8
4. p-value and our intuition
Importantly, p-value does not indicate
how reliable your hypothesis is
but how safely reject the corresponding null hypothesis.
This does not fit our intuition.
In most cases, we want to know
“how reliable my hypothesis is?”
Frequentists
9
5. Assumptions
Bayesians
population
Your
samples
Assuming repetitive sampling from
the population to find the single
true value for a parameter
governing the population
population
Your
samples
Assuming the probability
distribution of a parameter value,
and its reliability is increased by
increasing the sample size.
0.3
1.3
β=0.8
β
What you estimated
from your samples
Frequentists
10
5. Assumptions
Bayesians
95% Confidence interval (CI)
assumes that if you conduct same
sampling design 20 times and
estimate a 95%CI for each,
only once a 95%CI would not cross
the true value β.
β
95% Credible interval (CI) assumes
that the parameter β governing the
population would be within the
range of the 95% CI with 95%
probability.
β
0.3 1.3
Any value you estimated from your
samples can be the parameter
(does not matter if it is true or not)
11
5. Assumptions
Using same data,
fitting a same probability distribution,
estimating the parameters based on likelihood….
Then, while the concepts are different,
do we eventually get identical results
from frequentism and Bayesianism?
12
5. Assumptions
Answer:
Yes, if we consider only in our scientific field,
they are “most likely“ same.
Recommendation:
If your interest is the effect size, use Bayesian
If it is to support hypothesis, use Frequentist
13
6. By the way…
The answer becomes NO
when “prior distribution“ is explicitly assumed
P(β|D) =
P(D|β) P(β)
P(D)
Likelihood
posterior
distribution
fixed value
(practically neglectable)
prior distribution
14
6. By the way…
Note that this is much less important for us...
P(β|D) ∝ P(D|β) P(β)
posterior
distribution
prior distributionLikelihood
15
What I have explained was the following case:
P(β|D) ∝ P(D|β) P(β)
posterior
distribution
prior distributionLikelihood
β
0.3 1.3
This was the outcome
(estimated parameter value & range)
β
0.3 1.3
This was estimated
β
−∞ +∞
This was like nothing
6. By the way…
16
7. prior distribution
P(β|D) ∝ P(D|β) P(β)
prior distribution
β
−∞ +∞
What‘s this?
17
7. prior distribution
Prior distribution
• This is the other key point of Bayesian statistics
• But interestingly we don‘t care this aspect for our analysis (and if
you google Bayesian, most articles explain this firstly: Suck!)
• We can include a subjective assumption of the probability
distribution of parameters (i.e., prior distribution) before analysis
(but don‘t have to and indeed we don‘t)
18
7. prior distribution
An example
• Question: to quantify mean and variability of our height
— Probability districution of height: Gaussian
— Shall we assume the parameters beforehand? μ= XX? ±σ=XX?
This is called “prior distribution“
μ
170 180
175
±σ
3 8
5
— We measure individuals and calculate the likelihoods
— Multiply the posterior distribution by the likelihoods
to obtain the posterior distribution
19
7. prior distribution
An example
• In case of average μ
P(β|D) ∝ P(D|β) P(β)
μ
170 180
175
prior dist.
(your assumption)
μ
160 178
171
Likelihood
(measurement)
Posterior dist.
(output: updated
distribution after
measurement)
μ
174
166 179
20
7. prior distribution
170 180
175
P(β|D) ∝ P(D|β) P(β)
160 178
171174
166 179
In our study
μ
160 178
171
μ
171
160 178
β
−∞ +∞
To avoid subjectivity
21
8. Summary
Recommendation:
If your interest is the effect size, use Bayesian
If it is to support hypothesis, use Frequentist
β
0.3 1.3
Any value you estimated from your
samples can be the parameter,
following a probability distribution
P(β|D) ∝ P(D|β) P(β)
Prior information can be important in other field
but this is not important for us: so, let‘s ignore.

More Related Content

What's hot (20)

PDF
Naive Bayes Classifier in Python | Naive Bayes Algorithm | Machine Learning A...
Edureka!
 
PPTX
Bayes Theorem
sabareeshbabu
 
PPTX
Bayesian statistics
Alberto Labarga
 
PPTX
Bayesian network
Ahmad El Tawil
 
PPTX
Linear algebra for deep learning
Swayam Mittal
 
PPTX
Chap04 discrete random variables and probability distribution
Judianto Nugroho
 
PPT
Artificial intelligence and knowledge representation
Likan Patra
 
PDF
AI Lesson 01
Assistant Professor
 
PPTX
Bayes rule (Bayes Law)
Tish997
 
PDF
Bayesian networks
Massimiliano Patacchiola
 
PPTX
Pattern recognition binoy 05-naive bayes classifier
108kaushik
 
PPTX
Uncertainty in AI
Amruth Veerabhadraiah
 
PPTX
Naive Bayes Presentation
Md. Enamul Haque Chowdhury
 
PDF
Simulated annealing.ppt
Kaal Nath
 
PDF
An introduction to Bayesian Statistics using Python
freshdatabos
 
PDF
Changes and Bugs: Mining and Predicting Development Activities
Thomas Zimmermann
 
PDF
Naive Bayes Classifier
Arunabha Saha
 
PDF
Naive Bayes
CloudxLab
 
PDF
Introduction to Bayesian Inference
Steven Scott
 
Naive Bayes Classifier in Python | Naive Bayes Algorithm | Machine Learning A...
Edureka!
 
Bayes Theorem
sabareeshbabu
 
Bayesian statistics
Alberto Labarga
 
Bayesian network
Ahmad El Tawil
 
Linear algebra for deep learning
Swayam Mittal
 
Chap04 discrete random variables and probability distribution
Judianto Nugroho
 
Artificial intelligence and knowledge representation
Likan Patra
 
AI Lesson 01
Assistant Professor
 
Bayes rule (Bayes Law)
Tish997
 
Bayesian networks
Massimiliano Patacchiola
 
Pattern recognition binoy 05-naive bayes classifier
108kaushik
 
Uncertainty in AI
Amruth Veerabhadraiah
 
Naive Bayes Presentation
Md. Enamul Haque Chowdhury
 
Simulated annealing.ppt
Kaal Nath
 
An introduction to Bayesian Statistics using Python
freshdatabos
 
Changes and Bugs: Mining and Predicting Development Activities
Thomas Zimmermann
 
Naive Bayes Classifier
Arunabha Saha
 
Naive Bayes
CloudxLab
 
Introduction to Bayesian Inference
Steven Scott
 

Similar to Bayesian statistics for biologists and ecologists (20)

PDF
Bayesian Statistics.pdf
MuhammadAnas742878
 
PDF
presentation4.pdf Intro to mcmc methodss
SergeyTsygankov6
 
PDF
Bayesian data analysis1
SaritaTripathy3
 
PDF
Bayesian statistics intro using r
Josue Guzman
 
PDF
Bayesian inference
CharthaGaglani
 
PPT
Bayes Theorem - Probability and Statistics
EMALLIKARJUNAREDDY
 
PDF
Subject-2---Unidimensional-Data-2024.pdf
faiber13
 
PDF
Fundamentals of Statistics - Bayesian Statistics.pdf
RizkyAlfianRizafahle
 
PDF
sigir2017bayesian
Tetsuya Sakai
 
PDF
An introduction to Bayesian Statistics and its application
NehaSingh493662
 
PDF
tjosullivanThesis
Timothy O'Sullivan
 
PDF
2013.03.26 An Introduction to Modern Statistical Analysis using Bayesian Methods
NUI Galway
 
PDF
2013.03.26 Bayesian Methods for Modern Statistical Analysis
NUI Galway
 
PPT
Bayesian decision making in clinical research
Bhaswat Chakraborty
 
PPTX
What should we expect from reproducibiliry
Stephen Senn
 
PPTX
On being Bayesian
Stephen Senn
 
PPTX
Lec13_Bayes.pptx
KhushiDuttVatsa
 
PDF
01.ConditionalProb.pdf in the Bayes_intro folder
Steven Scott
 
PDF
“I. Conjugate priors”
Steven Scott
 
PDF
01.conditional prob
Steven Scott
 
Bayesian Statistics.pdf
MuhammadAnas742878
 
presentation4.pdf Intro to mcmc methodss
SergeyTsygankov6
 
Bayesian data analysis1
SaritaTripathy3
 
Bayesian statistics intro using r
Josue Guzman
 
Bayesian inference
CharthaGaglani
 
Bayes Theorem - Probability and Statistics
EMALLIKARJUNAREDDY
 
Subject-2---Unidimensional-Data-2024.pdf
faiber13
 
Fundamentals of Statistics - Bayesian Statistics.pdf
RizkyAlfianRizafahle
 
sigir2017bayesian
Tetsuya Sakai
 
An introduction to Bayesian Statistics and its application
NehaSingh493662
 
tjosullivanThesis
Timothy O'Sullivan
 
2013.03.26 An Introduction to Modern Statistical Analysis using Bayesian Methods
NUI Galway
 
2013.03.26 Bayesian Methods for Modern Statistical Analysis
NUI Galway
 
Bayesian decision making in clinical research
Bhaswat Chakraborty
 
What should we expect from reproducibiliry
Stephen Senn
 
On being Bayesian
Stephen Senn
 
Lec13_Bayes.pptx
KhushiDuttVatsa
 
01.ConditionalProb.pdf in the Bayes_intro folder
Steven Scott
 
“I. Conjugate priors”
Steven Scott
 
01.conditional prob
Steven Scott
 
Ad

Recently uploaded (20)

PDF
The role of the Lorentz force in sunspot equilibrium
Sérgio Sacani
 
PDF
Refractory solid condensation detected in an embedded protoplanetary disk
Sérgio Sacani
 
PDF
The-Origin- of -Metazoa-vertebrates .ppt
S.B.P.G. COLLEGE BARAGAON VARANASI
 
DOCX
Table - Technique selection matrix in CleaningValidation
Markus Janssen
 
PPTX
Q1 - W1 - D2 - Models of matter for science.pptx
RyanCudal3
 
PPTX
Animal Reproductive Behaviors Quiz Presentation in Maroon Brown Flat Graphic ...
LynetteGaniron1
 
PPTX
Akshay tunneling .pptx_20250331_165945_0000.pptx
akshaythaker18
 
PPTX
Gene Therapy. Introduction, history and types of Gene therapy
Ashwini I Chuncha
 
PPTX
Cooking Oil Tester How to Measure Quality of Frying Oil.pptx
M-Kube Enterprise
 
PDF
NRRM 330 Dynamic Equlibrium Presentation
Rowan Sales
 
PDF
crestacean parasitim non chordates notes
S.B.P.G. COLLEGE BARAGAON VARANASI
 
PPT
Cell cycle,cell cycle checkpoint and control
DrMukeshRameshPimpli
 
PPT
Human physiology and digestive system
S.B.P.G. COLLEGE BARAGAON VARANASI
 
PPTX
GB1 Q1 04 Life in a Cell (1).pptx GRADE 11
JADE ACOSTA
 
PDF
Introduction of Animal Behaviour full notes.pdf
S.B.P.G. COLLEGE BARAGAON VARANASI
 
PDF
RODENT PEST MANAGEMENT-converted-compressed.pdf
S.B.P.G. COLLEGE BARAGAON VARANASI
 
PDF
A proposed mechanism for the formation of protocell-like structures on Titan
Sérgio Sacani
 
PDF
Polarized Multiwavelength Emission from Pulsar Wind—Accretion Disk Interactio...
Sérgio Sacani
 
PDF
Annual report 2024 - Inria - English version.pdf
Inria
 
PPTX
Anatomy and physiology of digestive system.pptx
Ashwini I Chuncha
 
The role of the Lorentz force in sunspot equilibrium
Sérgio Sacani
 
Refractory solid condensation detected in an embedded protoplanetary disk
Sérgio Sacani
 
The-Origin- of -Metazoa-vertebrates .ppt
S.B.P.G. COLLEGE BARAGAON VARANASI
 
Table - Technique selection matrix in CleaningValidation
Markus Janssen
 
Q1 - W1 - D2 - Models of matter for science.pptx
RyanCudal3
 
Animal Reproductive Behaviors Quiz Presentation in Maroon Brown Flat Graphic ...
LynetteGaniron1
 
Akshay tunneling .pptx_20250331_165945_0000.pptx
akshaythaker18
 
Gene Therapy. Introduction, history and types of Gene therapy
Ashwini I Chuncha
 
Cooking Oil Tester How to Measure Quality of Frying Oil.pptx
M-Kube Enterprise
 
NRRM 330 Dynamic Equlibrium Presentation
Rowan Sales
 
crestacean parasitim non chordates notes
S.B.P.G. COLLEGE BARAGAON VARANASI
 
Cell cycle,cell cycle checkpoint and control
DrMukeshRameshPimpli
 
Human physiology and digestive system
S.B.P.G. COLLEGE BARAGAON VARANASI
 
GB1 Q1 04 Life in a Cell (1).pptx GRADE 11
JADE ACOSTA
 
Introduction of Animal Behaviour full notes.pdf
S.B.P.G. COLLEGE BARAGAON VARANASI
 
RODENT PEST MANAGEMENT-converted-compressed.pdf
S.B.P.G. COLLEGE BARAGAON VARANASI
 
A proposed mechanism for the formation of protocell-like structures on Titan
Sérgio Sacani
 
Polarized Multiwavelength Emission from Pulsar Wind—Accretion Disk Interactio...
Sérgio Sacani
 
Annual report 2024 - Inria - English version.pdf
Inria
 
Anatomy and physiology of digestive system.pptx
Ashwini I Chuncha
 
Ad

Bayesian statistics for biologists and ecologists

  • 1. Bayesian for us Masahiro Ryo masahiroryo@gmail.com Matthias Rillig Lab. Freie Universität Berlin Berlin-Brandenburg Institute of Advanced Biodiversity Research 2016.07.27
  • 2. 1. Bayes' theorem 2. What is same? 3. What is “practically” different? 4. p-value and our intuition 5. Assumptions 6. By the way… 7. prior distribution 8. Summary 2 Outline Practical part Technical part
  • 3. 3 1. Bayes' theorem P(A|B) = P(B|A) P(A) P(B) P(A): the probability of observing event A P(A|B): a conditional probability, the probability of observing event A given that B is true
  • 4. 4 1. Bayes' theorem P(A|B) = P(B|A) P(A) P(B) P(A): the probability of observing event A P(A|B): a conditional probability, the probability of observing event A given that B is true
  • 5. 5 2. What is same? 1. To assume a hypothesis • M under the treatment is larger than M under control (comparison) • Y is increased by increasing X (correlation) 2. To collect samples 3. To test the hypothesis population samples Statistical test
  • 6. 6 3. What is “practically” different? - test Frequentists Bayesians “if p < 0.05 or not” “how probable” 1. Set a null hypothesis H0 2. Estimate probability of type I error (p-value) 3. Evaluate how rarely H0 occurs 4. Reject H0 and support H1 1. Set a hypothesis H1 2. Evaluate how possibly H1 occurs Bayesian is more direct and intuitive to test a hypothesis e.g., my hypothesis was supported with 80% probability.
  • 7. 7 3. What is “practically” different? Frequentists Bayesians “how probable”“if p < 0.05 or not” y = β0 + β1 x Parameter β1 Probability 0.89 H0: β1 = 0 is rejected H1: β1 ≠ 0 is supported (and β1= 0.89) The parameter β1 is rarely <0, so H1 is greatly supported. Most probably β1=0.89 and can span between 0.28 and 1.52 with 95% probability.
  • 8. 8 4. p-value and our intuition Importantly, p-value does not indicate how reliable your hypothesis is but how safely reject the corresponding null hypothesis. This does not fit our intuition. In most cases, we want to know “how reliable my hypothesis is?”
  • 9. Frequentists 9 5. Assumptions Bayesians population Your samples Assuming repetitive sampling from the population to find the single true value for a parameter governing the population population Your samples Assuming the probability distribution of a parameter value, and its reliability is increased by increasing the sample size.
  • 10. 0.3 1.3 β=0.8 β What you estimated from your samples Frequentists 10 5. Assumptions Bayesians 95% Confidence interval (CI) assumes that if you conduct same sampling design 20 times and estimate a 95%CI for each, only once a 95%CI would not cross the true value β. β 95% Credible interval (CI) assumes that the parameter β governing the population would be within the range of the 95% CI with 95% probability. β 0.3 1.3 Any value you estimated from your samples can be the parameter (does not matter if it is true or not)
  • 11. 11 5. Assumptions Using same data, fitting a same probability distribution, estimating the parameters based on likelihood…. Then, while the concepts are different, do we eventually get identical results from frequentism and Bayesianism?
  • 12. 12 5. Assumptions Answer: Yes, if we consider only in our scientific field, they are “most likely“ same. Recommendation: If your interest is the effect size, use Bayesian If it is to support hypothesis, use Frequentist
  • 13. 13 6. By the way… The answer becomes NO when “prior distribution“ is explicitly assumed P(β|D) = P(D|β) P(β) P(D) Likelihood posterior distribution fixed value (practically neglectable) prior distribution
  • 14. 14 6. By the way… Note that this is much less important for us... P(β|D) ∝ P(D|β) P(β) posterior distribution prior distributionLikelihood
  • 15. 15 What I have explained was the following case: P(β|D) ∝ P(D|β) P(β) posterior distribution prior distributionLikelihood β 0.3 1.3 This was the outcome (estimated parameter value & range) β 0.3 1.3 This was estimated β −∞ +∞ This was like nothing 6. By the way…
  • 16. 16 7. prior distribution P(β|D) ∝ P(D|β) P(β) prior distribution β −∞ +∞ What‘s this?
  • 17. 17 7. prior distribution Prior distribution • This is the other key point of Bayesian statistics • But interestingly we don‘t care this aspect for our analysis (and if you google Bayesian, most articles explain this firstly: Suck!) • We can include a subjective assumption of the probability distribution of parameters (i.e., prior distribution) before analysis (but don‘t have to and indeed we don‘t)
  • 18. 18 7. prior distribution An example • Question: to quantify mean and variability of our height — Probability districution of height: Gaussian — Shall we assume the parameters beforehand? μ= XX? ±σ=XX? This is called “prior distribution“ μ 170 180 175 ±σ 3 8 5 — We measure individuals and calculate the likelihoods — Multiply the posterior distribution by the likelihoods to obtain the posterior distribution
  • 19. 19 7. prior distribution An example • In case of average μ P(β|D) ∝ P(D|β) P(β) μ 170 180 175 prior dist. (your assumption) μ 160 178 171 Likelihood (measurement) Posterior dist. (output: updated distribution after measurement) μ 174 166 179
  • 20. 20 7. prior distribution 170 180 175 P(β|D) ∝ P(D|β) P(β) 160 178 171174 166 179 In our study μ 160 178 171 μ 171 160 178 β −∞ +∞ To avoid subjectivity
  • 21. 21 8. Summary Recommendation: If your interest is the effect size, use Bayesian If it is to support hypothesis, use Frequentist β 0.3 1.3 Any value you estimated from your samples can be the parameter, following a probability distribution P(β|D) ∝ P(D|β) P(β) Prior information can be important in other field but this is not important for us: so, let‘s ignore.