SlideShare une entreprise Scribd logo
1  sur  33
Télécharger pour lire hors ligne
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)

Contenu connexe

Tendances

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?? ?
 

Tendances (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
 

En vedette

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
 

En vedette (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回(松尾)
 

Similaire à 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
 

Similaire à 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
 

Dernier

Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfPatidar M
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptxDhatriParmar
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1GloryAnnCastre1
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Projectjordimapav
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptxmary850239
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQuiz Club NITW
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfVanessa Camilleri
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Association for Project Management
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptxmary850239
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management SystemChristalin Nelson
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQuiz Club NITW
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDhatriParmar
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxVanesaIglesias10
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management systemChristalin Nelson
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxlancelewisportillo
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...Nguyen Thanh Tu Collection
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxHumphrey A Beña
 

Dernier (20)

INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptxINCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
INCLUSIVE EDUCATION PRACTICES FOR TEACHERS AND TRAINERS.pptx
 
Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"Mattingly "AI & Prompt Design: Large Language Models"
Mattingly "AI & Prompt Design: Large Language Models"
 
Active Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdfActive Learning Strategies (in short ALS).pdf
Active Learning Strategies (in short ALS).pdf
 
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
Unraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptxUnraveling Hypertext_ Analyzing  Postmodern Elements in  Literature.pptx
Unraveling Hypertext_ Analyzing Postmodern Elements in Literature.pptx
 
Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1Reading and Writing Skills 11 quarter 4 melc 1
Reading and Writing Skills 11 quarter 4 melc 1
 
ClimART Action | eTwinning Project
ClimART Action    |    eTwinning ProjectClimART Action    |    eTwinning Project
ClimART Action | eTwinning Project
 
4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx4.11.24 Mass Incarceration and the New Jim Crow.pptx
4.11.24 Mass Incarceration and the New Jim Crow.pptx
 
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITWQ-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
Q-Factor HISPOL Quiz-6th April 2024, Quiz Club NITW
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
ICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdfICS2208 Lecture6 Notes for SL spaces.pdf
ICS2208 Lecture6 Notes for SL spaces.pdf
 
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
Team Lead Succeed – Helping you and your team achieve high-performance teamwo...
 
4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx4.11.24 Poverty and Inequality in America.pptx
4.11.24 Poverty and Inequality in America.pptx
 
Transaction Management in Database Management System
Transaction Management in Database Management SystemTransaction Management in Database Management System
Transaction Management in Database Management System
 
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITWQ-Factor General Quiz-7th April 2024, Quiz Club NITW
Q-Factor General Quiz-7th April 2024, Quiz Club NITW
 
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptxDecoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
Decoding the Tweet _ Practical Criticism in the Age of Hashtag.pptx
 
ROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptxROLES IN A STAGE PRODUCTION in arts.pptx
ROLES IN A STAGE PRODUCTION in arts.pptx
 
Concurrency Control in Database Management system
Concurrency Control in Database Management systemConcurrency Control in Database Management system
Concurrency Control in Database Management system
 
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptxQ4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
Q4-PPT-Music9_Lesson-1-Romantic-Opera.pptx
 
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
31 ĐỀ THI THỬ VÀO LỚP 10 - TIẾNG ANH - FORM MỚI 2025 - 40 CÂU HỎI - BÙI VĂN V...
 
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptxINTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
INTRODUCTION TO CATHOLIC CHRISTOLOGY.pptx
 

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)