SlideShare a Scribd company logo
1 of 73
Download to read offline
Hello, is it Bayes
you’re looking for?
Bayes’ Theorem
Bayes’ Theorem
likelihood evidence
posterior
Observations, data, features
Outcome, label
Bayesian POV
● Experiment → prior notion + data = new (posterior) notion
● Unknown parameters → associated probabilities interpreted as “belief” in
truth
● Probabilities → how well a proposition is supported by the data provided
as evidence for it
Bayes is
just
counting
McElreath, Richard. Statistical rethinking: A Bayesian
course with examples in R and Stan. Chapman and
Hall/CRC, 2018.
What
proportion of
thesurfaceis
covered with
water?
First Possibility
Figure2.2
Second Possibility
Figure2.2
Second Possibility
Figure2.2
T ird Possibility
Figure2.2
T ird Possibility
Figure2.2
Figure2.2
First Observation
Figure2.2
First Observation
Figure2.2
Second Observation
Figure2.2
T ird Observation
Figure2.2
3Waysto see
if thebagcontains
Globeof ForkingWater
For each possibleproportion of water,
Count number of waysdatacould happen.
Must statehow observationsaregenerated
TossT eFirst
posterior
prior
observation
“density”:
relativeplausibility of
proportion of water
W
× =
TossT eSecond
relative
plaus
ibility
of L
relative
plaus
ibility
of W
relative
plaus
ibility
of LW
(1) No minimum samplesize
(2) Shapeembodiessamplesize
(3) No point estimate
mean
mode T edis
tribution
istheestimate
Alwaysusethe
entiredistribution
0.0
1.0
2.0
proportion water
density
0 0.5 1
(4) No onetrueinterval
Intervals
communicateshape
of posterior
50%
0.0
1.0
2.0
proportion water
density
0 0.5 1
(4) No onetrueinterval
Intervals
communicateshape
of posterior
95%isobvious
superstition. Nothing
magical happensat
theboundary.
99%
Bayes is
just
counting
computing
the
posterior
MCMC computing
the
posterior
Computingtheposterior
1. Analytical approach (of en impossible)
2. Grid approximation (very intensive)
3. Quadraticapproximation (limited)
4. Markov chain MonteCarlo (intensive)
MCMC
29.1 The problems to be solved
Monte Carlo methods are computational techniques that make use of random
numbers. The aims of Monte Carlo methods are to solve one or both of the
following problems.
Problem 1: to generate samples { x(r ) } R
r = 1 from a given probability distribu-
tion P(x).
Problem 2: to estimate expectations of functions under this distribution, for
example
Φ = ⟨φ(x)⟩ ≡ dN
x P(x)φ(x). (29.3)
The probability distribution P(x), which we call the target density, might
be a distribution from statistical physics or a conditional distribution arising
in data modelling – for example, the posterior probability of a model’s pa-
rameters given some observed data. We will generally assume that x is an
N -dimensional vector with real components xn, but we will sometimes con-
sider discrete spaces also.
MCMC
You can evaluate the function, but you cannot
draw sample from the function
ght Cambridge University Press 2003. On-screen viewing permitted. Printing not permitted. http://www.cambridge.org/0521642981
n buy this book for 30 pounds or $50. See http://www.inference.phy.cam.ac.uk/mackay/itila/ for links.
358 29 — Monte Carlo Methods
(a)
0
0.5
1
1.5
2
2.5
3
-4 -2 0 2 4
P*(x)
(b)
0
0.5
1
1.5
2
2.5
3
-4 -2 0 2 4
P*(x)
Figure 29.1. (a) The function
P∗
(x) =
exp 0.4(x − 0.4)2
− 0.08x4
. How
to draw samples from this
density? (b) The function P∗
(x)
evaluated at a discrete set of
uniformly spaced points { xi } .
How to draw samples from this
discrete distribution?
This is one of the important properties of Monte Carlo methods.
University Press 2003. On-screen viewing permitted. Printing not permitted. http://www.cambridge.org/0521642981
or 30 pounds or $50. See http://www.inference.phy.cam.ac.uk/mackay/itila/ for links.
29 — Monte Carlo Methods
= dx dy P∗(x) is the volume of the lake. You are provided with a
satellite navigation system, and a plumbline. Using the navigator, you
your boat to any desired location x on the map; using the plumbline
measure P∗(x) at that point. You can also measure the plankton
ation there.
lem 1 is to draw 1cm3 water samples at random from the lake, in
way that each sample is equally likely to come from any point within
Problem 2 is to find the average plankton concentration.
earedifficult problemsto solve becauseat theoutset weknow nothing
e depth P∗
(x). Perhaps much of the volume of the lake is contained
Figure 29.3. A slice through a lake
that includes some canyons.
w, deep underwater canyons (figure 29.3), in which case, to correctly
rom the lake and correctly estimate Φ our method must implicitly
MCMC strategies
• Metropolis: Granddaddy of them all
• Metropolis-Hastings(MH): More
general
• Gibbssampling(GS): Ef cient
version of MH
• Metropolisand Gibbsare“guess
and check” strategies
• Hamiltonian MonteCarlo (HMC)
fundamentally dif erent
• New methodsbeingdeveloped, but
futurebelongsto thegradient
chi-feng.github.io
D E M O
Hamiltonian MonteCarlo
• Problem with Gibbssampling(GS)
• High dimension spacesareconcentrated
• GSgetsstuck, degeneratestowards
random walk
• Inef cient becausere-explores
• Hamiltonian dynamicsto therescue
• represent parameter stateasparticle
• f ick it around frictionlesslog-posterior
• record positions
• no more“guessand check”
• all proposalsaregood proposals
William Rowan Hamilton
(1805–1865)
Commemorated on Irish
Euro coin
Hamiltonian parable
• KingMonty’skingdom isanarrow valley N–S
• Population distribution inversely proportional to
altitude
• Algorithm:
• Start drivingrandomly N or Sat random speed
• Car speedsup asit goesdownhill
• Car slowsasit goesuphill, might turn around
• Drivefor pre-specif ed duration, then stop
• Repeat
• Stoppingpositionswill beproportional to
population
North
South
0 100 200 300
time
position
0
south
north
When to use Bayesian inference?
● When data is lacking
○ Frequentist: large error bars, poor estimates
○ By making more assumptions, we get to leverage more information
○ In large sample size limit, Bayesian and Frequentist approaches
converge
● When you desire levels of belief over True/False
statements
○ Bayesian approach still has distribution for parameter, even for large
sample size
○ Bayesian interpretation of probability is more intuitive to people

More Related Content

Similar to Intuition behind Monte Carlo Markov Chains

System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...
System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...
System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...Cemal Ardil
 
Gaps between the theory and practice of large-scale matrix-based network comp...
Gaps between the theory and practice of large-scale matrix-based network comp...Gaps between the theory and practice of large-scale matrix-based network comp...
Gaps between the theory and practice of large-scale matrix-based network comp...David Gleich
 
Applied numerical methods lec4
Applied numerical methods lec4Applied numerical methods lec4
Applied numerical methods lec4Yasser Ahmed
 
MLHEP 2015: Introductory Lecture #4
MLHEP 2015: Introductory Lecture #4MLHEP 2015: Introductory Lecture #4
MLHEP 2015: Introductory Lecture #4arogozhnikov
 
3.5 EXP-LOG MODELS
3.5 EXP-LOG MODELS3.5 EXP-LOG MODELS
3.5 EXP-LOG MODELSSharon Henry
 
Lego like spheres and tori, enumeration and drawings
Lego like spheres and tori, enumeration and drawingsLego like spheres and tori, enumeration and drawings
Lego like spheres and tori, enumeration and drawingsMathieu Dutour Sikiric
 
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...Chiheb Ben Hammouda
 
Introduction to advanced Monte Carlo methods
Introduction to advanced Monte Carlo methodsIntroduction to advanced Monte Carlo methods
Introduction to advanced Monte Carlo methodsChristian Robert
 
AndersSchreiber_ThesisFinal
AndersSchreiber_ThesisFinalAndersSchreiber_ThesisFinal
AndersSchreiber_ThesisFinalAnders Schreiber
 
Fundamentals of quantum computing part i rev
Fundamentals of quantum computing   part i revFundamentals of quantum computing   part i rev
Fundamentals of quantum computing part i revPRADOSH K. ROY
 
Kriging interpolationtheory
Kriging interpolationtheoryKriging interpolationtheory
Kriging interpolationtheory湘云 黄
 
M2 Internship report rare-earth nickelates
M2 Internship report rare-earth nickelatesM2 Internship report rare-earth nickelates
M2 Internship report rare-earth nickelatesYiteng Dang
 
OpenCL applications in genomics
OpenCL applications in genomicsOpenCL applications in genomics
OpenCL applications in genomicsUSC
 

Similar to Intuition behind Monte Carlo Markov Chains (20)

CLIM: Transition Workshop - Accounting for Model Errors Due to Sub-Grid Scale...
CLIM: Transition Workshop - Accounting for Model Errors Due to Sub-Grid Scale...CLIM: Transition Workshop - Accounting for Model Errors Due to Sub-Grid Scale...
CLIM: Transition Workshop - Accounting for Model Errors Due to Sub-Grid Scale...
 
System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...
System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...
System overflow blocking-transients-for-queues-with-batch-arrivals-using-a-fa...
 
Gaps between the theory and practice of large-scale matrix-based network comp...
Gaps between the theory and practice of large-scale matrix-based network comp...Gaps between the theory and practice of large-scale matrix-based network comp...
Gaps between the theory and practice of large-scale matrix-based network comp...
 
Applied numerical methods lec4
Applied numerical methods lec4Applied numerical methods lec4
Applied numerical methods lec4
 
Lecture 6
Lecture 6Lecture 6
Lecture 6
 
A new approach in teaching mathematics in classrooms
A new approach in teaching mathematics in classroomsA new approach in teaching mathematics in classrooms
A new approach in teaching mathematics in classrooms
 
Maths Modelling
Maths ModellingMaths Modelling
Maths Modelling
 
MLHEP 2015: Introductory Lecture #4
MLHEP 2015: Introductory Lecture #4MLHEP 2015: Introductory Lecture #4
MLHEP 2015: Introductory Lecture #4
 
3.5 EXP-LOG MODELS
3.5 EXP-LOG MODELS3.5 EXP-LOG MODELS
3.5 EXP-LOG MODELS
 
Lego like spheres and tori, enumeration and drawings
Lego like spheres and tori, enumeration and drawingsLego like spheres and tori, enumeration and drawings
Lego like spheres and tori, enumeration and drawings
 
Biological graph models
Biological graph modelsBiological graph models
Biological graph models
 
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...
Hierarchical Deterministic Quadrature Methods for Option Pricing under the Ro...
 
Introduction to advanced Monte Carlo methods
Introduction to advanced Monte Carlo methodsIntroduction to advanced Monte Carlo methods
Introduction to advanced Monte Carlo methods
 
AndersSchreiber_ThesisFinal
AndersSchreiber_ThesisFinalAndersSchreiber_ThesisFinal
AndersSchreiber_ThesisFinal
 
PART II.1 - Modern Physics
PART II.1 - Modern PhysicsPART II.1 - Modern Physics
PART II.1 - Modern Physics
 
Fundamentals of quantum computing part i rev
Fundamentals of quantum computing   part i revFundamentals of quantum computing   part i rev
Fundamentals of quantum computing part i rev
 
Kriging interpolationtheory
Kriging interpolationtheoryKriging interpolationtheory
Kriging interpolationtheory
 
M2 Internship report rare-earth nickelates
M2 Internship report rare-earth nickelatesM2 Internship report rare-earth nickelates
M2 Internship report rare-earth nickelates
 
ICLR 2018
ICLR 2018ICLR 2018
ICLR 2018
 
OpenCL applications in genomics
OpenCL applications in genomicsOpenCL applications in genomics
OpenCL applications in genomics
 

More from Tushar Tank

Image Processing Background Elimination in Video Editting
Image Processing Background Elimination in Video EdittingImage Processing Background Elimination in Video Editting
Image Processing Background Elimination in Video EdittingTushar Tank
 
Bayesian Analysis Fundamentals with Examples
Bayesian Analysis Fundamentals with ExamplesBayesian Analysis Fundamentals with Examples
Bayesian Analysis Fundamentals with ExamplesTushar Tank
 
Review of CausalImpact / Bayesian Structural Time-Series Analysis
Review of CausalImpact / Bayesian Structural Time-Series AnalysisReview of CausalImpact / Bayesian Structural Time-Series Analysis
Review of CausalImpact / Bayesian Structural Time-Series AnalysisTushar Tank
 
Tech Talk overview of xgboost and review of paper
Tech Talk overview of xgboost and review of paperTech Talk overview of xgboost and review of paper
Tech Talk overview of xgboost and review of paperTushar Tank
 
Shapley Tech Talk - SHAP and Shapley Discussion
Shapley Tech Talk - SHAP and Shapley DiscussionShapley Tech Talk - SHAP and Shapley Discussion
Shapley Tech Talk - SHAP and Shapley DiscussionTushar Tank
 
Statistical Clustering
Statistical ClusteringStatistical Clustering
Statistical ClusteringTushar Tank
 
Variational Inference
Variational InferenceVariational Inference
Variational InferenceTushar Tank
 
Time Frequency Analysis for Poets
Time Frequency Analysis for PoetsTime Frequency Analysis for Poets
Time Frequency Analysis for PoetsTushar Tank
 
Kalman filter upload
Kalman filter uploadKalman filter upload
Kalman filter uploadTushar Tank
 

More from Tushar Tank (10)

Image Processing Background Elimination in Video Editting
Image Processing Background Elimination in Video EdittingImage Processing Background Elimination in Video Editting
Image Processing Background Elimination in Video Editting
 
Bayesian Analysis Fundamentals with Examples
Bayesian Analysis Fundamentals with ExamplesBayesian Analysis Fundamentals with Examples
Bayesian Analysis Fundamentals with Examples
 
Review of CausalImpact / Bayesian Structural Time-Series Analysis
Review of CausalImpact / Bayesian Structural Time-Series AnalysisReview of CausalImpact / Bayesian Structural Time-Series Analysis
Review of CausalImpact / Bayesian Structural Time-Series Analysis
 
Tech Talk overview of xgboost and review of paper
Tech Talk overview of xgboost and review of paperTech Talk overview of xgboost and review of paper
Tech Talk overview of xgboost and review of paper
 
Shapley Tech Talk - SHAP and Shapley Discussion
Shapley Tech Talk - SHAP and Shapley DiscussionShapley Tech Talk - SHAP and Shapley Discussion
Shapley Tech Talk - SHAP and Shapley Discussion
 
Hindu ABC Book
Hindu ABC BookHindu ABC Book
Hindu ABC Book
 
Statistical Clustering
Statistical ClusteringStatistical Clustering
Statistical Clustering
 
Variational Inference
Variational InferenceVariational Inference
Variational Inference
 
Time Frequency Analysis for Poets
Time Frequency Analysis for PoetsTime Frequency Analysis for Poets
Time Frequency Analysis for Poets
 
Kalman filter upload
Kalman filter uploadKalman filter upload
Kalman filter upload
 

Recently uploaded

BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...Nguyen Thanh Tu Collection
 
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
 
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
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17Celine George
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptshraddhaparab530
 
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
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...DhatriParmar
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxkarenfajardo43
 
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...HetalPathak10
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmStan Meyer
 
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
 
Comparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxComparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxAvaniJani1
 
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
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Celine George
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxSayali Powar
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvRicaMaeCastro1
 
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Osopher
 

Recently uploaded (20)

BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
BÀI TẬP BỔ TRỢ TIẾNG ANH 11 THEO ĐƠN VỊ BÀI HỌC - CẢ NĂM - CÓ FILE NGHE (GLOB...
 
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
 
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
 
How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17How to Fix XML SyntaxError in Odoo the 17
How to Fix XML SyntaxError in Odoo the 17
 
Integumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.pptIntegumentary System SMP B. Pharm Sem I.ppt
Integumentary System SMP B. Pharm Sem I.ppt
 
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...
 
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
Beauty Amidst the Bytes_ Unearthing Unexpected Advantages of the Digital Wast...
 
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptxGrade Three -ELLNA-REVIEWER-ENGLISH.pptx
Grade Three -ELLNA-REVIEWER-ENGLISH.pptx
 
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
Satirical Depths - A Study of Gabriel Okara's Poem - 'You Laughed and Laughed...
 
Oppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and FilmOppenheimer Film Discussion for Philosophy and Film
Oppenheimer Film Discussion for Philosophy and Film
 
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
 
Comparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptxComparative Literature in India by Amiya dev.pptx
Comparative Literature in India by Amiya dev.pptx
 
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
 
Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17Tree View Decoration Attribute in the Odoo 17
Tree View Decoration Attribute in the Odoo 17
 
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptxBIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
BIOCHEMISTRY-CARBOHYDRATE METABOLISM CHAPTER 2.pptx
 
prashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Professionprashanth updated resume 2024 for Teaching Profession
prashanth updated resume 2024 for Teaching Profession
 
Introduction to Research ,Need for research, Need for design of Experiments, ...
Introduction to Research ,Need for research, Need for design of Experiments, ...Introduction to Research ,Need for research, Need for design of Experiments, ...
Introduction to Research ,Need for research, Need for design of Experiments, ...
 
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnvESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
ESP 4-EDITED.pdfmmcncncncmcmmnmnmncnmncmnnjvnnv
 
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of EngineeringFaculty Profile prashantha K EEE dept Sri Sairam college of Engineering
Faculty Profile prashantha K EEE dept Sri Sairam college of Engineering
 
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
Healthy Minds, Flourishing Lives: A Philosophical Approach to Mental Health a...
 

Intuition behind Monte Carlo Markov Chains

  • 1. Hello, is it Bayes you’re looking for?
  • 4. Bayesian POV ● Experiment → prior notion + data = new (posterior) notion ● Unknown parameters → associated probabilities interpreted as “belief” in truth ● Probabilities → how well a proposition is supported by the data provided as evidence for it
  • 6. McElreath, Richard. Statistical rethinking: A Bayesian course with examples in R and Stan. Chapman and Hall/CRC, 2018.
  • 8.
  • 9.
  • 10.
  • 11.
  • 12.
  • 23.
  • 24.
  • 25.
  • 26.
  • 27.
  • 28.
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.
  • 35.
  • 36.
  • 37. Globeof ForkingWater For each possibleproportion of water, Count number of waysdatacould happen. Must statehow observationsaregenerated
  • 41. W
  • 42. × = TossT eSecond relative plaus ibility of L relative plaus ibility of W relative plaus ibility of LW
  • 43.
  • 44.
  • 45.
  • 46. (1) No minimum samplesize
  • 48. (3) No point estimate mean mode T edis tribution istheestimate Alwaysusethe entiredistribution
  • 49. 0.0 1.0 2.0 proportion water density 0 0.5 1 (4) No onetrueinterval Intervals communicateshape of posterior 50%
  • 50. 0.0 1.0 2.0 proportion water density 0 0.5 1 (4) No onetrueinterval Intervals communicateshape of posterior 95%isobvious superstition. Nothing magical happensat theboundary. 99%
  • 53. Computingtheposterior 1. Analytical approach (of en impossible) 2. Grid approximation (very intensive) 3. Quadraticapproximation (limited) 4. Markov chain MonteCarlo (intensive)
  • 54. MCMC 29.1 The problems to be solved Monte Carlo methods are computational techniques that make use of random numbers. The aims of Monte Carlo methods are to solve one or both of the following problems. Problem 1: to generate samples { x(r ) } R r = 1 from a given probability distribu- tion P(x). Problem 2: to estimate expectations of functions under this distribution, for example Φ = ⟨φ(x)⟩ ≡ dN x P(x)φ(x). (29.3) The probability distribution P(x), which we call the target density, might be a distribution from statistical physics or a conditional distribution arising in data modelling – for example, the posterior probability of a model’s pa- rameters given some observed data. We will generally assume that x is an N -dimensional vector with real components xn, but we will sometimes con- sider discrete spaces also.
  • 55. MCMC You can evaluate the function, but you cannot draw sample from the function ght Cambridge University Press 2003. On-screen viewing permitted. Printing not permitted. http://www.cambridge.org/0521642981 n buy this book for 30 pounds or $50. See http://www.inference.phy.cam.ac.uk/mackay/itila/ for links. 358 29 — Monte Carlo Methods (a) 0 0.5 1 1.5 2 2.5 3 -4 -2 0 2 4 P*(x) (b) 0 0.5 1 1.5 2 2.5 3 -4 -2 0 2 4 P*(x) Figure 29.1. (a) The function P∗ (x) = exp 0.4(x − 0.4)2 − 0.08x4 . How to draw samples from this density? (b) The function P∗ (x) evaluated at a discrete set of uniformly spaced points { xi } . How to draw samples from this discrete distribution? This is one of the important properties of Monte Carlo methods. University Press 2003. On-screen viewing permitted. Printing not permitted. http://www.cambridge.org/0521642981 or 30 pounds or $50. See http://www.inference.phy.cam.ac.uk/mackay/itila/ for links. 29 — Monte Carlo Methods = dx dy P∗(x) is the volume of the lake. You are provided with a satellite navigation system, and a plumbline. Using the navigator, you your boat to any desired location x on the map; using the plumbline measure P∗(x) at that point. You can also measure the plankton ation there. lem 1 is to draw 1cm3 water samples at random from the lake, in way that each sample is equally likely to come from any point within Problem 2 is to find the average plankton concentration. earedifficult problemsto solve becauseat theoutset weknow nothing e depth P∗ (x). Perhaps much of the volume of the lake is contained Figure 29.3. A slice through a lake that includes some canyons. w, deep underwater canyons (figure 29.3), in which case, to correctly rom the lake and correctly estimate Φ our method must implicitly
  • 56.
  • 57.
  • 58.
  • 59.
  • 60.
  • 61.
  • 62.
  • 63.
  • 64.
  • 65.
  • 66. MCMC strategies • Metropolis: Granddaddy of them all • Metropolis-Hastings(MH): More general • Gibbssampling(GS): Ef cient version of MH • Metropolisand Gibbsare“guess and check” strategies • Hamiltonian MonteCarlo (HMC) fundamentally dif erent • New methodsbeingdeveloped, but futurebelongsto thegradient
  • 68. Hamiltonian MonteCarlo • Problem with Gibbssampling(GS) • High dimension spacesareconcentrated • GSgetsstuck, degeneratestowards random walk • Inef cient becausere-explores • Hamiltonian dynamicsto therescue • represent parameter stateasparticle • f ick it around frictionlesslog-posterior • record positions • no more“guessand check” • all proposalsaregood proposals William Rowan Hamilton (1805–1865) Commemorated on Irish Euro coin
  • 69. Hamiltonian parable • KingMonty’skingdom isanarrow valley N–S • Population distribution inversely proportional to altitude • Algorithm: • Start drivingrandomly N or Sat random speed • Car speedsup asit goesdownhill • Car slowsasit goesuphill, might turn around • Drivefor pre-specif ed duration, then stop • Repeat • Stoppingpositionswill beproportional to population North South
  • 70.
  • 71. 0 100 200 300 time position 0 south north
  • 72.
  • 73. When to use Bayesian inference? ● When data is lacking ○ Frequentist: large error bars, poor estimates ○ By making more assumptions, we get to leverage more information ○ In large sample size limit, Bayesian and Frequentist approaches converge ● When you desire levels of belief over True/False statements ○ Bayesian approach still has distribution for parameter, even for large sample size ○ Bayesian interpretation of probability is more intuitive to people

Editor's Notes

  1. At the end of the day we want a probability density function. That has proportion on the x axis and some ratio on the y, and the area under the function has to equal 1.
  2. The way we want to answer those questions is through Bayesian data analysis Humble approach to inference, because all it does is the following Every Bayesian model instantiates this approach. This water problem is complicated – possible explanation of data – proportion. Infinite number of ratios between 0 and 1
  3. Only four some are blue and some are white. We don’t know how many of each kind. Sample with replacement. Given our observation how can we use that to make an inference of the contents of the bag.
  4. Assume the second possibility is true – not true for ever, just for right now.
  5. Second possibility branches off from the first. 4 + 4 + 4 + 4 – possibilities.
  6. Ok so why are we doing this. We are doing this so, we are doing this because now we have a visual device that lets us count all the way the data could have occurred assuming the contents of the bag were 1 blue marble and 4 white marbles. We will look at the other possibilities next, but right now we are sticking to that assumption. Let’s trace that out.
  7. All the other possibilities are forecloses because the first one was blue.
  8. So let’s summarize, because that is the goal. We will assume each of these and compare counts – that is essentially Bayesian inference, but usually it is done with complicated integrals.
  9. Typical Bayesian analysis looks fancier, these calculations are automated – but this is the logic behind it.
  10. Why do this? It is unreasonable effective Nothing more than logic. State assumptions. They have implications for data / observations. Assumptions that are more compatible with the observations are considered more plausible. Summarize we have all the explanations here in a column.
  11. We give each explanation a parameter or index based on the proportion of blue marbles in each explanation. This will tie in with the water on Earth problem.
  12. Relative count values are important. Not the absolute value. Deal with arbitrary combinatorics of data sets is to normalize. Normalize counts to sum to one.
  13. In any reasonably sized data set the numbers would get huge, so we need to normalize.