SlideShare a Scribd company logo
1 of 33
Download to read offline
www.***.com
Part2:
Chapter 5
Inferring a Binominal
Proportion via Exact
Mathematical Analysis
Haru Negami
03/08/2013
summary
! binomial proportion
" the likelihood function
! the Bernoulli likelihood function
" the prior/posterior distribution
! beta distribution
" estimation ---- uncertainty <-HDI
" prediction ---- p(y)<-(z+a)/(N+a+z)
" comparison ---- best model <-p(D|M)
Binomial Proportion
! 
! binomial or dichotomous
! 
" 
p(θ| ) = p(D|θ,M)p(θ|M)/p(D|M)
posterior likelihood prior evidence
prior
probability
observation
posterior
probability
Likelihood function
! Example : coin flipping
"  y = {0,1} ex) (0: , 1: )
" p(y=1|θ)=f(θ)=θ θ [0,1]
" p(y=0|θ) = 1-θ
" the Bernoulli distribution
" p(y|θ) = θy(1-θ)(1-y)
!  θ y
!  (Σy p(y|θ) = 1)
Likelihood function
! Bernoulli likelihood function
" p(y|θ) = θy(1-θ)(1-y)
" y θ
!  θ
!  y
" 
! p(y|θ) = θy(1-θ)(1-y)(y=i) θ
p(θ|D,M) = p(D|θ,M)p(θ|M)/p(D|M)
posterior likelihood prior evidence
prior
probability
observation
posterior
probability
done
belief (to make a model)
! 
" p(θ|y) = p(y|θ)p(θ)/Σyp(y|θ)
" p(θ) p(y|θ)p(θ)
! 
! 
" denominator Σyp(y|θ)
"  p(θ)
a conjugate prior for p(y|θ)
belief (to make a model)
! p(θ) = θa(1-θ)b
p(y|θ)×p(θ) = θy(1-θ)(1-y) × θa(1-θ)b
= θy+a(1-θ)(1-y+b)
!  beta
distribution
belief (to make a model)
! beta distribution
" a, b 2 (a,b > 0)
" p(θ|a,b) = beta(θ|a,b)
= θ(a-1)(1-θ)(b-1)/B(a,b)
! B(a,b) beta function
" beta distribution normalizer
! B(a,b) = ∫0
1dθ θ(a-1)(1-θ)(b-1)
belief (to make a model)
! Beta Distribution
b
a
p(θ|D,M) = p(D|θ,M)p(θ|M)/p(D|M)
posterior likelihood prior evidence
prior
probability
observation
posterior
probability
done
belief in detail (prior)
! beta distribution : beta(θ|a,b)
" two parameters
! mean :
! standard deviation :
belief in detail (prior)
! beta distribution : beta(θ|a,b)
" guess the values of a and b
! from (observed) data
" ex) a=b=1, a=b=4, etc…
! m = a/(a+b), n=(a+b)
a = mn, b = (1-m)n
! from mean and standard deviation
a 1 & b 1 a<1 &/or b<1
p(θ|D,M) = p(D|θ,M)p(θ|M)/p(D|M)
posterior likelihood prior evidence
prior
probability
observation
posterior
probability
done done
belief in
detail(posterior)
! supposition : N flips, z heads
! prior distribution : beta(θ|a,b)
! posterior distribution :
beta(θ|z+a, N-z+b)
belief in
detail(posterior)
! supposition : N flips, z heads
! prior distribution : beta(θ|a,b)
! posterior distribution :
beta(θ|z+a, N-z+b)
one of the beauties of
mathematical approach to
Bayesian inference!
belief in detail
(updated parameters)
! probability distribution :
" prior : beta(θ|a,b)
N flips, z heads
" posterior : beta(θ|z+a, N-z+b)
! mean :
" prior : a/(a+b)
" posterior : (z+a)/[(z+a)+(N-z+b)]
= (z+a)/(N+a+b) !!!
belief in detail
(updated parameters)
! probability distribution :
" prior : beta(θ|a,b)
N flips, z heads
" posterior : beta(θ|z+a, N-z+b)
! mean :
" prior : a/(a+b)
" posterior : (z+a)/[(z+a)+(N-z+b)]
= (z+a)/(N+a+b) !!!
belief in detail
(updated parameters)
! probability distribution :
" prior : beta(θ|a,b)
N flips, z heads
" posterior : beta(θ|z+a, N-z+b)
! mean :
" prior : a/(a+b)
" posterior : (z+a)/[(z+a)+(N-z+b)]
= (z+a)/(N+a+b) !!!
0 z/N a/(a+b)
1-α α
α = N/(N+a+b)
Discussion(?)
Three inferential goals
! from chapter 4
" estimating the binominal proportion
" predicting Data
" comparing models
estimation
! uncertainty of the prior distribution
" From the posterior distribution
! HDI : the highest density interval (chapter 3)
HDI
L : broad
R : narrow
prior dist.
L : more uncertain
estimation
!  reasonable credibility of a value concerned
" From the posterior distribution
! ROPE : region of practical equivalence
coin flipping
θ = 0.5
credible?
ROPE = [0.48,0.52]
if
95% HDI ∩ ROPE =
then
θ is incredible
estimation
!  reasonable credibility of a value concerned
" From the posterior distribution
! ROPE : region of practical equivalence
coin flipping
θ = 0.5
credible?
ROPE = [0.48,0.52]
if
95% HDI ∩ ROPE =
then
θ is incredible
includes many extra
assumptions!
prediction
! p(y) = ∫dθp(y|θ)p(θ) <-posterior
prediction
! p(y) = ∫dθp(y|θ)p(θ) <-posterior
0 z/N a/(a+b)
1-α α
α = N/(N+a+b)
prediction (example 1)
! 1st beta(θ|1,1) mean 1/2 (= p(y))
observation : head (N=1,z=1)
! 2nd beta(θ|2,1) mean 2/3 (= p(y))
observation : head (N=1,z=1)
! 3rd beta(θ|3,1) mean 3/4 (= p(y))
prediction (example 2)
! 1st beta(θ|100,100) : 1/2 (= p(y))
observation : head (N=1,z=1)
observation : head (N=1,z=1)
! 3rd beta(θ|102,100) : 102/202( 50%)
comparison
to compare the models,
p(θ|D,M) = p(D|θ,M)p(θ|M)/p(D|M)
posterior likelihood prior evidence
prior
probability
observation
posterior
probability
comparison
! Calculation of evidence
" p(D|M) = p(z,N)
comparison
uniform strongly peaked uniform strongly peaked
N = 14, z = 11 N = 14, z = 7
p(D|M)=0.000183>p(D|M)=6.86×10-5 p(D|M)=1.94×10-5<p(D|M)=5.9×10-5
comparison
! both are important
" the prior distribution
" the likelihood function
" in detail, see chapter 4
The best model (so far)
is not a good model.
summary
! binomial proportion
" the likelihood function
! the Bernoulli likelihood function
" the prior/posterior distribution
! beta distribution
" estimation ---- uncertainty <-HDI
" prediction ---- p(y)<-(z+a)/(N+a+b)
" comparison ---- best model <-p(D|M)

More Related Content

What's hot

E:\1 Algebra\Unit 5 Polynomials\Quizzes&amp;Tests\Polynomial Practice Tes...
E:\1   Algebra\Unit 5   Polynomials\Quizzes&amp;Tests\Polynomial Practice Tes...E:\1   Algebra\Unit 5   Polynomials\Quizzes&amp;Tests\Polynomial Practice Tes...
E:\1 Algebra\Unit 5 Polynomials\Quizzes&amp;Tests\Polynomial Practice Tes...
guestc27ed0c
 
Statistics Powerpoint Standard Dev.
Statistics Powerpoint Standard Dev.Statistics Powerpoint Standard Dev.
Statistics Powerpoint Standard Dev.
arm74
 
ECE 565 Project1
ECE 565 Project1ECE 565 Project1
ECE 565 Project1
?? ?
 
Project2
Project2Project2
Project2
?? ?
 

What's hot (20)

Benginning Calculus Lecture notes 14 - areas & volumes
Benginning Calculus Lecture notes 14 - areas & volumesBenginning Calculus Lecture notes 14 - areas & volumes
Benginning Calculus Lecture notes 14 - areas & volumes
 
Julia Set
Julia SetJulia Set
Julia Set
 
E:\1 Algebra\Unit 5 Polynomials\Quizzes&amp;Tests\Polynomial Practice Tes...
E:\1   Algebra\Unit 5   Polynomials\Quizzes&amp;Tests\Polynomial Practice Tes...E:\1   Algebra\Unit 5   Polynomials\Quizzes&amp;Tests\Polynomial Practice Tes...
E:\1 Algebra\Unit 5 Polynomials\Quizzes&amp;Tests\Polynomial Practice Tes...
 
Statistics Powerpoint Standard Dev.
Statistics Powerpoint Standard Dev.Statistics Powerpoint Standard Dev.
Statistics Powerpoint Standard Dev.
 
2.10 translations of graphs t
2.10 translations of graphs t2.10 translations of graphs t
2.10 translations of graphs t
 
Statistical Assignment Help
Statistical Assignment HelpStatistical Assignment Help
Statistical Assignment Help
 
Lecture 16 graphing - section 4.3
Lecture 16   graphing - section 4.3Lecture 16   graphing - section 4.3
Lecture 16 graphing - section 4.3
 
Likelihood-free Design: a discussion
Likelihood-free Design: a discussionLikelihood-free Design: a discussion
Likelihood-free Design: a discussion
 
Conformal mapping
Conformal mappingConformal mapping
Conformal mapping
 
Approximate Bayesian model choice via random forests
Approximate Bayesian model choice via random forestsApproximate Bayesian model choice via random forests
Approximate Bayesian model choice via random forests
 
1.6 all notes
1.6 all notes1.6 all notes
1.6 all notes
 
Computing the Area of a Polygon
Computing the Area of a PolygonComputing the Area of a Polygon
Computing the Area of a Polygon
 
MUMS Opening Workshop - An Overview of Reduced-Order Models and Emulators (ED...
MUMS Opening Workshop - An Overview of Reduced-Order Models and Emulators (ED...MUMS Opening Workshop - An Overview of Reduced-Order Models and Emulators (ED...
MUMS Opening Workshop - An Overview of Reduced-Order Models and Emulators (ED...
 
parent functons
parent functonsparent functons
parent functons
 
random forests for ABC model choice and parameter estimation
random forests for ABC model choice and parameter estimationrandom forests for ABC model choice and parameter estimation
random forests for ABC model choice and parameter estimation
 
Trigonometry
TrigonometryTrigonometry
Trigonometry
 
Ggplot2 cheatsheet-2.1
Ggplot2 cheatsheet-2.1Ggplot2 cheatsheet-2.1
Ggplot2 cheatsheet-2.1
 
ECE 565 Project1
ECE 565 Project1ECE 565 Project1
ECE 565 Project1
 
Project2
Project2Project2
Project2
 
smtlecture.5
smtlecture.5smtlecture.5
smtlecture.5
 

Viewers also liked

【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 9: Bernoulli Likelihood wit...
【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 9: Bernoulli Likelihood wit...【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 9: Bernoulli Likelihood wit...
【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 9: Bernoulli Likelihood wit...
Koji Yoshida
 
Chapter.13: Goals, Power and Sample Size "Doing Bayesian Data Analysis: A Tu...
Chapter.13: Goals, Power and Sample Size "Doing Bayesian Data Analysis:  A Tu...Chapter.13: Goals, Power and Sample Size "Doing Bayesian Data Analysis:  A Tu...
Chapter.13: Goals, Power and Sample Size "Doing Bayesian Data Analysis: A Tu...
Hajime Sasaki
 
Doing Bayesian Data Analysis Chapter 11. Null Hypothesis Significance Testing
Doing Bayesian Data Analysis Chapter 11. Null Hypothesis Significance TestingDoing Bayesian Data Analysis Chapter 11. Null Hypothesis Significance Testing
Doing Bayesian Data Analysis Chapter 11. Null Hypothesis Significance Testing
Hiroki Takanashi
 

Viewers also liked (17)

Dbda勉強会chapter18
Dbda勉強会chapter18Dbda勉強会chapter18
Dbda勉強会chapter18
 
【DBDA 勉強会 2013 夏】Doing Bayesian Data Analysis Chapter 4: Bayes’ Rule
【DBDA 勉強会 2013 夏】Doing Bayesian Data Analysis Chapter 4: Bayes’ Rule【DBDA 勉強会 2013 夏】Doing Bayesian Data Analysis Chapter 4: Bayes’ Rule
【DBDA 勉強会 2013 夏】Doing Bayesian Data Analysis Chapter 4: Bayes’ Rule
 
Dbda chap7
Dbda chap7Dbda chap7
Dbda chap7
 
Dbda勉強会~概要説明ochi20130803
Dbda勉強会~概要説明ochi20130803Dbda勉強会~概要説明ochi20130803
Dbda勉強会~概要説明ochi20130803
 
Dbda勉強会
Dbda勉強会Dbda勉強会
Dbda勉強会
 
Doing Bayesian Data Analysis; Chapter 14
Doing Bayesian Data Analysis; Chapter 14Doing Bayesian Data Analysis; Chapter 14
Doing Bayesian Data Analysis; Chapter 14
 
【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 16: Metric Predicted Variab...
【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 16: Metric Predicted Variab...【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 16: Metric Predicted Variab...
【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 16: Metric Predicted Variab...
 
【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 8: Inferring Two Binomial P...
【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 8: Inferring Two Binomial P...【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 8: Inferring Two Binomial P...
【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 8: Inferring Two Binomial P...
 
【DBDA 勉強会 2013 夏】Chapter 12: Bayesian Approaches to Testing a Point (‘‘Null’’...
【DBDA 勉強会 2013 夏】Chapter 12: Bayesian Approaches to Testing a Point (‘‘Null’’...【DBDA 勉強会 2013 夏】Chapter 12: Bayesian Approaches to Testing a Point (‘‘Null’’...
【DBDA 勉強会 2013 夏】Chapter 12: Bayesian Approaches to Testing a Point (‘‘Null’’...
 
【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 9: Bernoulli Likelihood wit...
【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 9: Bernoulli Likelihood wit...【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 9: Bernoulli Likelihood wit...
【DBDA勉強会2013】Doing Bayesian Data Analysis Chapter 9: Bernoulli Likelihood wit...
 
Chapter.13: Goals, Power and Sample Size "Doing Bayesian Data Analysis: A Tu...
Chapter.13: Goals, Power and Sample Size "Doing Bayesian Data Analysis:  A Tu...Chapter.13: Goals, Power and Sample Size "Doing Bayesian Data Analysis:  A Tu...
Chapter.13: Goals, Power and Sample Size "Doing Bayesian Data Analysis: A Tu...
 
Dbda chapter15
Dbda chapter15Dbda chapter15
Dbda chapter15
 
Dbda chapter17
Dbda chapter17Dbda chapter17
Dbda chapter17
 
Doing Bayesian Data Analysis Chapter 11. Null Hypothesis Significance Testing
Doing Bayesian Data Analysis Chapter 11. Null Hypothesis Significance TestingDoing Bayesian Data Analysis Chapter 11. Null Hypothesis Significance Testing
Doing Bayesian Data Analysis Chapter 11. Null Hypothesis Significance Testing
 
クラシックな機械学習の入門  9. モデル推定
クラシックな機械学習の入門  9. モデル推定クラシックな機械学習の入門  9. モデル推定
クラシックな機械学習の入門  9. モデル推定
 
Dbda03
Dbda03Dbda03
Dbda03
 
全脳アーキテクチャ勉強会 第1回(松尾)
全脳アーキテクチャ勉強会 第1回(松尾)全脳アーキテクチャ勉強会 第1回(松尾)
全脳アーキテクチャ勉強会 第1回(松尾)
 

Similar to Doing Bayesian Data Analysis, Chapter 5 (10)

02.bayesian learning
02.bayesian learning02.bayesian learning
02.bayesian learning
 
02.bayesian learning
02.bayesian learning02.bayesian learning
02.bayesian learning
 
bayesian learning
bayesian learningbayesian learning
bayesian learning
 
Unit-2 Bayes Decision Theory.pptx
Unit-2 Bayes Decision Theory.pptxUnit-2 Bayes Decision Theory.pptx
Unit-2 Bayes Decision Theory.pptx
 
CDT 22 slides.pdf
CDT 22 slides.pdfCDT 22 slides.pdf
CDT 22 slides.pdf
 
3rd NIPS Workshop on PROBABILISTIC PROGRAMMING
3rd NIPS Workshop on PROBABILISTIC PROGRAMMING3rd NIPS Workshop on PROBABILISTIC PROGRAMMING
3rd NIPS Workshop on PROBABILISTIC PROGRAMMING
 
NCE, GANs & VAEs (and maybe BAC)
NCE, GANs & VAEs (and maybe BAC)NCE, GANs & VAEs (and maybe BAC)
NCE, GANs & VAEs (and maybe BAC)
 
An introduction to Bayesian Statistics using Python
An introduction to Bayesian Statistics using PythonAn introduction to Bayesian Statistics using Python
An introduction to Bayesian Statistics using Python
 
Asymptotics of ABC, lecture, Collège de France
Asymptotics of ABC, lecture, Collège de FranceAsymptotics of ABC, lecture, Collège de France
Asymptotics of ABC, lecture, Collège de France
 
A/B Testing for Game Design
A/B Testing for Game DesignA/B Testing for Game Design
A/B Testing for Game Design
 

Recently uploaded

Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
KarakKing
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
QucHHunhnh
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
ciinovamais
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
AnaAcapella
 

Recently uploaded (20)

Spatium Project Simulation student brief
Spatium Project Simulation student briefSpatium Project Simulation student brief
Spatium Project Simulation student brief
 
Google Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptxGoogle Gemini An AI Revolution in Education.pptx
Google Gemini An AI Revolution in Education.pptx
 
ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.ICT role in 21st century education and it's challenges.
ICT role in 21st century education and it's challenges.
 
How to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POSHow to Manage Global Discount in Odoo 17 POS
How to Manage Global Discount in Odoo 17 POS
 
Salient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functionsSalient Features of India constitution especially power and functions
Salient Features of India constitution especially power and functions
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
Food safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdfFood safety_Challenges food safety laboratories_.pdf
Food safety_Challenges food safety laboratories_.pdf
 
Fostering Friendships - Enhancing Social Bonds in the Classroom
Fostering Friendships - Enhancing Social Bonds  in the ClassroomFostering Friendships - Enhancing Social Bonds  in the Classroom
Fostering Friendships - Enhancing Social Bonds in the Classroom
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
Python Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docxPython Notes for mca i year students osmania university.docx
Python Notes for mca i year students osmania university.docx
 
Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
Micro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdfMicro-Scholarship, What it is, How can it help me.pdf
Micro-Scholarship, What it is, How can it help me.pdf
 
Sociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning ExhibitSociology 101 Demonstration of Learning Exhibit
Sociology 101 Demonstration of Learning Exhibit
 
Spellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please PractiseSpellings Wk 3 English CAPS CARES Please Practise
Spellings Wk 3 English CAPS CARES Please Practise
 
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...Kodo Millet  PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
Kodo Millet PPT made by Ghanshyam bairwa college of Agriculture kumher bhara...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
Single or Multiple melodic lines structure
Single or Multiple melodic lines structureSingle or Multiple melodic lines structure
Single or Multiple melodic lines structure
 
This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.This PowerPoint helps students to consider the concept of infinity.
This PowerPoint helps students to consider the concept of infinity.
 
Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)Accessible Digital Futures project (20/03/2024)
Accessible Digital Futures project (20/03/2024)
 

Doing Bayesian Data Analysis, Chapter 5

  • 1. www.***.com Part2: Chapter 5 Inferring a Binominal Proportion via Exact Mathematical Analysis Haru Negami 03/08/2013
  • 2. summary ! binomial proportion " the likelihood function ! the Bernoulli likelihood function " the prior/posterior distribution ! beta distribution " estimation ---- uncertainty <-HDI " prediction ---- p(y)<-(z+a)/(N+a+z) " comparison ---- best model <-p(D|M)
  • 4. p(θ| ) = p(D|θ,M)p(θ|M)/p(D|M) posterior likelihood prior evidence prior probability observation posterior probability
  • 5. Likelihood function ! Example : coin flipping "  y = {0,1} ex) (0: , 1: ) " p(y=1|θ)=f(θ)=θ θ [0,1] " p(y=0|θ) = 1-θ " the Bernoulli distribution " p(y|θ) = θy(1-θ)(1-y) !  θ y !  (Σy p(y|θ) = 1)
  • 6. Likelihood function ! Bernoulli likelihood function " p(y|θ) = θy(1-θ)(1-y) " y θ !  θ !  y "  ! p(y|θ) = θy(1-θ)(1-y)(y=i) θ
  • 7. p(θ|D,M) = p(D|θ,M)p(θ|M)/p(D|M) posterior likelihood prior evidence prior probability observation posterior probability done
  • 8. belief (to make a model) !  " p(θ|y) = p(y|θ)p(θ)/Σyp(y|θ) " p(θ) p(y|θ)p(θ) !  !  " denominator Σyp(y|θ) "  p(θ) a conjugate prior for p(y|θ)
  • 9. belief (to make a model) ! p(θ) = θa(1-θ)b p(y|θ)×p(θ) = θy(1-θ)(1-y) × θa(1-θ)b = θy+a(1-θ)(1-y+b) !  beta distribution
  • 10. belief (to make a model) ! beta distribution " a, b 2 (a,b > 0) " p(θ|a,b) = beta(θ|a,b) = θ(a-1)(1-θ)(b-1)/B(a,b) ! B(a,b) beta function " beta distribution normalizer ! B(a,b) = ∫0 1dθ θ(a-1)(1-θ)(b-1)
  • 11. belief (to make a model) ! Beta Distribution b a
  • 12. p(θ|D,M) = p(D|θ,M)p(θ|M)/p(D|M) posterior likelihood prior evidence prior probability observation posterior probability done
  • 13. belief in detail (prior) ! beta distribution : beta(θ|a,b) " two parameters ! mean : ! standard deviation :
  • 14. belief in detail (prior) ! beta distribution : beta(θ|a,b) " guess the values of a and b ! from (observed) data " ex) a=b=1, a=b=4, etc… ! m = a/(a+b), n=(a+b) a = mn, b = (1-m)n ! from mean and standard deviation a 1 & b 1 a<1 &/or b<1
  • 15. p(θ|D,M) = p(D|θ,M)p(θ|M)/p(D|M) posterior likelihood prior evidence prior probability observation posterior probability done done
  • 16. belief in detail(posterior) ! supposition : N flips, z heads ! prior distribution : beta(θ|a,b) ! posterior distribution : beta(θ|z+a, N-z+b)
  • 17. belief in detail(posterior) ! supposition : N flips, z heads ! prior distribution : beta(θ|a,b) ! posterior distribution : beta(θ|z+a, N-z+b) one of the beauties of mathematical approach to Bayesian inference!
  • 18. belief in detail (updated parameters) ! probability distribution : " prior : beta(θ|a,b) N flips, z heads " posterior : beta(θ|z+a, N-z+b) ! mean : " prior : a/(a+b) " posterior : (z+a)/[(z+a)+(N-z+b)] = (z+a)/(N+a+b) !!!
  • 19. belief in detail (updated parameters) ! probability distribution : " prior : beta(θ|a,b) N flips, z heads " posterior : beta(θ|z+a, N-z+b) ! mean : " prior : a/(a+b) " posterior : (z+a)/[(z+a)+(N-z+b)] = (z+a)/(N+a+b) !!!
  • 20. belief in detail (updated parameters) ! probability distribution : " prior : beta(θ|a,b) N flips, z heads " posterior : beta(θ|z+a, N-z+b) ! mean : " prior : a/(a+b) " posterior : (z+a)/[(z+a)+(N-z+b)] = (z+a)/(N+a+b) !!! 0 z/N a/(a+b) 1-α α α = N/(N+a+b)
  • 21. Discussion(?) Three inferential goals ! from chapter 4 " estimating the binominal proportion " predicting Data " comparing models
  • 22. estimation ! uncertainty of the prior distribution " From the posterior distribution ! HDI : the highest density interval (chapter 3) HDI L : broad R : narrow prior dist. L : more uncertain
  • 23. estimation !  reasonable credibility of a value concerned " From the posterior distribution ! ROPE : region of practical equivalence coin flipping θ = 0.5 credible? ROPE = [0.48,0.52] if 95% HDI ∩ ROPE = then θ is incredible
  • 24. estimation !  reasonable credibility of a value concerned " From the posterior distribution ! ROPE : region of practical equivalence coin flipping θ = 0.5 credible? ROPE = [0.48,0.52] if 95% HDI ∩ ROPE = then θ is incredible includes many extra assumptions!
  • 26. prediction ! p(y) = ∫dθp(y|θ)p(θ) <-posterior 0 z/N a/(a+b) 1-α α α = N/(N+a+b)
  • 27. prediction (example 1) ! 1st beta(θ|1,1) mean 1/2 (= p(y)) observation : head (N=1,z=1) ! 2nd beta(θ|2,1) mean 2/3 (= p(y)) observation : head (N=1,z=1) ! 3rd beta(θ|3,1) mean 3/4 (= p(y))
  • 28. prediction (example 2) ! 1st beta(θ|100,100) : 1/2 (= p(y)) observation : head (N=1,z=1) observation : head (N=1,z=1) ! 3rd beta(θ|102,100) : 102/202( 50%)
  • 29. comparison to compare the models, p(θ|D,M) = p(D|θ,M)p(θ|M)/p(D|M) posterior likelihood prior evidence prior probability observation posterior probability
  • 31. comparison uniform strongly peaked uniform strongly peaked N = 14, z = 11 N = 14, z = 7 p(D|M)=0.000183>p(D|M)=6.86×10-5 p(D|M)=1.94×10-5<p(D|M)=5.9×10-5
  • 32. comparison ! both are important " the prior distribution " the likelihood function " in detail, see chapter 4 The best model (so far) is not a good model.
  • 33. summary ! binomial proportion " the likelihood function ! the Bernoulli likelihood function " the prior/posterior distribution ! beta distribution " estimation ---- uncertainty <-HDI " prediction ---- p(y)<-(z+a)/(N+a+b) " comparison ---- best model <-p(D|M)