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

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 & volumesbasyirstar
 
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
 
2.10 translations of graphs t
2.10 translations of graphs t2.10 translations of graphs t
2.10 translations of graphs tmath260
 
Lecture 16 graphing - section 4.3
Lecture 16   graphing - section 4.3Lecture 16   graphing - section 4.3
Lecture 16 graphing - section 4.3njit-ronbrown
 
Likelihood-free Design: a discussion
Likelihood-free Design: a discussionLikelihood-free Design: a discussion
Likelihood-free Design: a discussionChristian Robert
 
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 forestsChristian Robert
 
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 estimationChristian Robert
 
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勉強会chapter18
Dbda勉強会chapter18Dbda勉強会chapter18
Dbda勉強会chapter18Koichiro Kondo
 
【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’ RuleShuhei Iitsuka
 
Dbda勉強会~概要説明ochi20130803
Dbda勉強会~概要説明ochi20130803Dbda勉強会~概要説明ochi20130803
Dbda勉強会~概要説明ochi20130803Masanao Ochi
 
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...Junki Marui
 
【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...Junki Marui
 
【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’’...Shuhei Iitsuka
 
【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 TestingHiroki Takanashi
 
クラシックな機械学習の入門  9. モデル推定
クラシックな機械学習の入門  9. モデル推定クラシックな機械学習の入門  9. モデル推定
クラシックな機械学習の入門  9. モデル推定Hiroshi Nakagawa
 
全脳アーキテクチャ勉強会 第1回(松尾)
全脳アーキテクチャ勉強会 第1回(松尾)全脳アーキテクチャ勉強会 第1回(松尾)
全脳アーキテクチャ勉強会 第1回(松尾)Yutaka Matsuo
 

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

02.bayesian learning
02.bayesian learning02.bayesian learning
02.bayesian learningSteven Scott
 
02.bayesian learning
02.bayesian learning02.bayesian learning
02.bayesian learningSteven Scott
 
Unit-2 Bayes Decision Theory.pptx
Unit-2 Bayes Decision Theory.pptxUnit-2 Bayes Decision Theory.pptx
Unit-2 Bayes Decision Theory.pptxavinashBajpayee1
 
3rd NIPS Workshop on PROBABILISTIC PROGRAMMING
3rd NIPS Workshop on PROBABILISTIC PROGRAMMING3rd NIPS Workshop on PROBABILISTIC PROGRAMMING
3rd NIPS Workshop on PROBABILISTIC PROGRAMMINGChristian Robert
 
NCE, GANs & VAEs (and maybe BAC)
NCE, GANs & VAEs (and maybe BAC)NCE, GANs & VAEs (and maybe BAC)
NCE, GANs & VAEs (and maybe BAC)Christian Robert
 
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 Pythonfreshdatabos
 
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 FranceChristian Robert
 
A/B Testing for Game Design
A/B Testing for Game DesignA/B Testing for Game Design
A/B Testing for Game DesignTrieu Nguyen
 

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

SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxAmanpreet Kaur
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfNirmal Dwivedi
 
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)Jisc
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxheathfieldcps1
 
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 functionsKarakKing
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701bronxfugly43
 
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 POSCeline George
 
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.pdfPoh-Sun Goh
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...Nguyen Thanh Tu Collection
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentationcamerronhm
 
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_.pdfSherif Taha
 
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.pptxAreebaZafar22
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - Englishneillewis46
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsMebane Rash
 
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 PractiseAnaAcapella
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxDenish Jangid
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024Elizabeth Walsh
 
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.MaryamAhmad92
 

Recently uploaded (20)

SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptxSKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
SKILL OF INTRODUCING THE LESSON MICRO SKILLS.pptx
 
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdfUGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
UGC NET Paper 1 Mathematical Reasoning & Aptitude.pdf
 
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)
 
The basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptxThe basics of sentences session 3pptx.pptx
The basics of sentences session 3pptx.pptx
 
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
 
ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701ComPTIA Overview | Comptia Security+ Book SY0-701
ComPTIA Overview | Comptia Security+ Book SY0-701
 
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
 
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
 
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
TỔNG ÔN TẬP THI VÀO LỚP 10 MÔN TIẾNG ANH NĂM HỌC 2023 - 2024 CÓ ĐÁP ÁN (NGỮ Â...
 
SOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning PresentationSOC 101 Demonstration of Learning Presentation
SOC 101 Demonstration of Learning Presentation
 
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
 
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
 
Graduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - EnglishGraduate Outcomes Presentation Slides - English
Graduate Outcomes Presentation Slides - English
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
On National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan FellowsOn National Teacher Day, meet the 2024-25 Kenan Fellows
On National Teacher Day, meet the 2024-25 Kenan Fellows
 
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
 
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptxBasic Civil Engineering first year Notes- Chapter 4 Building.pptx
Basic Civil Engineering first year Notes- Chapter 4 Building.pptx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024FSB Advising Checklist - Orientation 2024
FSB Advising Checklist - Orientation 2024
 
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.
 

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)