Introduction to Bayesian statistics, part 2: MCMC and the Metropolis-Hastings algorithm

Поделиться
HTML-код
  • Опубликовано: 4 окт 2024

Комментарии • 123

  • @AlessandroBottoni
    @AlessandroBottoni 6 лет назад +153

    This is by far the best explanation of Metropolis-Hastings algorithm I was able to find on the web. Thanks a lot.

  • @dataminingincae
    @dataminingincae 8 лет назад +65

    Brilliantly simple explanation of the Metropolis-Hasting Algorithm. Thanks.

  • @abdulelahaljeffery6234
    @abdulelahaljeffery6234 7 лет назад +42

    best MCMC explanation on RUclips.

  • @vivekpetrolhead
    @vivekpetrolhead 9 месяцев назад +3

    The rotated density plot clarified so many things. Thanks!

  • @jimmylee6547
    @jimmylee6547 5 лет назад +19

    My son and I watched this entire video together. You did a great job teaching. My son understood this, I made sure to ask him questions to ensure he surly did. He's nearly 13 now and loves data-science.
    Great lecture and you have an excellent voice for teaching. Thanks again for this video.

  • @practicaldataengineering3955
    @practicaldataengineering3955 3 года назад +3

    The best explanation of Metropolis-Hastings algorithm. Thank you for this, no university course nor research paper will provide this much of understandable clarification.

  • @StephenRoseDuo
    @StephenRoseDuo 8 лет назад +35

    easily the best mcmc explanation

  • @nathsujitkumar
    @nathsujitkumar 8 месяцев назад

    The best explanation, available online, on this topic by far. The visualization of the algorithm is superb! Very much appreciated.

  • @rajarajansb5690
    @rajarajansb5690 Год назад

    The perspective of visualization & presenter's clarity made this the best explanation

  • @uniquenessexistence
    @uniquenessexistence Год назад +1

    Very clear explanation with plots. This is very helpful.

  • @14loosecannon
    @14loosecannon 2 года назад +2

    As others have already said, this is hands down the best explanation of MCMC I've seen on RUclips!

  • @aflouh
    @aflouh 5 лет назад +5

    The best explanation of MCMC ,,, thank you x 1000

  • @flagrance2808
    @flagrance2808 5 лет назад +2

    Simply the best illustration I have ever seen on the web - THANK YOU SO MUCH!

  • @area51xi
    @area51xi 6 лет назад +2

    One of the best MCMC explanations on RUclips and I'm just learning for fun with no formal math/stats background.

  • @JohnSegrave
    @JohnSegrave 8 лет назад +6

    Really nicely done - a very clear and concise explanation. I got a better sense of MCMC and M-H from these 8 minutes than several hours of reading on the topic beforehand. Thank you.

  • @lihuil3115
    @lihuil3115 2 года назад +1

    very good. The best explanation so far.

  • @naveenkumarparameswaran3862
    @naveenkumarparameswaran3862 5 лет назад +2

    The best video on MCMC! Hands down.

  • @keggluneq
    @keggluneq 5 лет назад +2

    Thank you. I've been looking for an intuitive explanation of MCMC for years!

  • @hongjingxia199
    @hongjingxia199 2 года назад

    By far the most clear explanation I've seen. Thanks a lot!!!!!

  • @fahdyazin82
    @fahdyazin82 4 года назад

    Most intuitive explanation of the MCMC-MH

  • @PedroRibeiro-zs5go
    @PedroRibeiro-zs5go 5 лет назад

    I agree with the previous comments! Best explanation on RUclips by far

  • @kalimismilequest
    @kalimismilequest 4 месяца назад

    Thank you so much. This was life changing

  • @nutellahasswag3394
    @nutellahasswag3394 4 года назад

    Top comment says it all, really clicked for me when you broke down into three stages. Thank you

  • @Veto2090
    @Veto2090 10 месяцев назад

    Thank you so much for this. All the other explainations I found had me very confused

  • @tripathi26
    @tripathi26 3 года назад

    Crisp n Clear!
    Thanks for sharing your knowledge.

  • @Echodonut
    @Echodonut 7 лет назад

    I have been trying to understand bayesian MCMC for the last couple of days, and this helped my understanding along greatly. Thanks!

  • @hfkssadfrew
    @hfkssadfrew 6 лет назад

    Very clean explanation! Much better than other videos online

  • @ohmyfly3501
    @ohmyfly3501 7 лет назад +1

    If you want to know properly then watch at .75x speed
    Very nice explanation

  • @porelort09
    @porelort09 11 месяцев назад +1

    Great video!

  • @holloloh
    @holloloh 5 лет назад +1

    I think I finally understood what this algorithm actually does.
    Thank you.

  • @tpof314
    @tpof314 7 лет назад

    Best MCMC explanation on RUclips. Thank you !

  • @Ivkovic1971
    @Ivkovic1971 8 лет назад +9

    Videoo that explains mcmc nice and clear. Thank you

  • @rahulrustagi7029
    @rahulrustagi7029 6 месяцев назад

    Hands Down the best

  • @marseraser
    @marseraser 2 года назад

    I love that visaualization !

  • @SalElder
    @SalElder 5 месяцев назад

    Great overview, thanks.

  • @moslemasgarihassanluie
    @moslemasgarihassanluie 8 месяцев назад

    Finally I understand MCMC WOooOw😍😍😍😍😍

  • @yifansong547
    @yifansong547 4 года назад

    Brilliantly clear explanation! Thanks a lot! Really Great Job!

  • @anakwesleyan
    @anakwesleyan 7 лет назад

    very practical and insightful. best explanation of MH / MCMC

  • @com0oan
    @com0oan 6 лет назад

    Excelent explanation! Best I've found so far!

  • @320achacin
    @320achacin 2 года назад +1

    Excellent.!!!

  • @allwanamar1
    @allwanamar1 6 лет назад

    wow. man ! i have no words ...just perfection.I appreciate the speed.

  • @omidkeivani6028
    @omidkeivani6028 4 года назад

    Great explanation. Awesome job.

  • @hsl2916
    @hsl2916 4 года назад

    Thank you so much. I finally understood MCMC!!!!

  • @DreamWorker-jm5xn
    @DreamWorker-jm5xn 5 лет назад

    Simply the best MH video.

  • @AIVidya
    @AIVidya 3 года назад

    Great Explanation

  • @karannchew2534
    @karannchew2534 2 года назад +1

    Note for revision.
    Why "Markov Chain"?
    Draw a theta (which will be accepted or rejected based on Hastings algo), then drawn another theta based on the new theta. The new theta is dependent on the old theta, so will be each successive theta, hence Markov Chain.

  • @RJone89
    @RJone89 2 года назад

    This is a godsend. Thank you.

  • @nontastsokanos1695
    @nontastsokanos1695 5 лет назад

    Excellent explanation. Thank you!

  • @PedroRibeiro-zs5go
    @PedroRibeiro-zs5go 6 лет назад

    That was the heck of a good video!! Thank you!!

  • @eduardosr9859
    @eduardosr9859 6 лет назад

    Thank you! Excellent video!

  • @florangelicapereda3130
    @florangelicapereda3130 7 лет назад

    Very good tutorial useful for Stata's users

  • @PiercingSight
    @PiercingSight 4 года назад +3

    My question is why?
    Why do we generate a new distribution from an already existing distribution?
    Why is each new generated value based on the previous value? Coin tosses are independent, are they not? Why would we do this to distributions of independent probabilities?

    • @gordongoodwin6279
      @gordongoodwin6279 3 года назад +3

      You wouldn’t do this for simple situations where it’s possible to sample independently. This is just a simplified example. MCMC algorithms are designed for use in multidimensional models where it isn’t feasible or efficient to calculate p(y), and thus a proper absolute posterior probability of theta. In such situations, when p(y) is intractable, dependent MCMC sampling is needed because it allows for the exploration of posterior parameter space through the use of relative frequencies of posterior samples rather than absolute probabilities

  • @weizhang7428
    @weizhang7428 6 лет назад

    Very clear expression

  • @s.z.4382
    @s.z.4382 7 лет назад

    Very helpful. Thanks.

  • @yoloswaggins2161
    @yoloswaggins2161 5 лет назад

    concise and precise

  • @malharjajoo7393
    @malharjajoo7393 5 лет назад +2

    1:59 - it's very important to mention Law of Large numbers (LLN) at this point !!

  • @edieespejo105
    @edieespejo105 7 лет назад

    Really helpful! Thank you. :)

  • @zhen3356
    @zhen3356 3 года назад

    Amazing

  • @malharjajoo7393
    @malharjajoo7393 5 лет назад +7

    How is the proposal distribution chosen ? And Why isn't that a limitation of the MH algorithm ?

    • @gordongoodwin6279
      @gordongoodwin6279 3 года назад

      It depends on the parameter type. If it’s an unconstrained parameter, then a symmetrical is fine, usually the normal curve is used. If it’s a constrained parameter (e.g. sigma), then the Hastings variation of the Metropolis algorithm is used because it allows for non symmetric proposal distributions. The key to the algorithm and how it works to map out the posterior is the acceptance ratio, which can be affected by the size of the steps proposed (sigma in the normal curve proposal distribution). Auto-tuning allows the proposal distribution to be adjusted periodically to make sure the acceptance ratio is within the target threshold.

  • @meshackamimo1945
    @meshackamimo1945 8 лет назад +4

    thanx for a beautiful video that has made me form an image of what mcmc is all about.
    God bless you.
    do kalman filters demo ,eg, for time dpseries predictions,using stata.

  • @princejohn4681
    @princejohn4681 8 лет назад +1

    Simply the best!

  • @mtheory85
    @mtheory85 11 месяцев назад

    I just love how unapologetically Windows this is.

  • @elsidiegbelhaj2016
    @elsidiegbelhaj2016 7 лет назад

    Very good. Thanks

  • @rongarza9488
    @rongarza9488 5 лет назад

    All this is excellent for physical, electrical / electronic systems, and the like. However, I have seen people try to use it for human based systems (like predicting the stock market, yeah, right). For that, it would serve best to know if a person likes Shakespeare, Frost, or limericks.

  • @pazenriqueguillermo
    @pazenriqueguillermo 4 месяца назад

    I would like to know which programa did tou use to make the trace anda histograma plot simulation. I found It Very useful for classes

  • @reabo22
    @reabo22 5 лет назад

    Awesome!

  • @aref_m2024
    @aref_m2024 7 лет назад +1

    Thanks for the nice lecture.

  • @danielnakamura6430
    @danielnakamura6430 3 года назад

    congratulations

  • @雨霏吳-s1p
    @雨霏吳-s1p 2 года назад

    Best ever

  • @Thelarryyy1
    @Thelarryyy1 5 лет назад

    beautiful

  • @nyanity
    @nyanity 3 года назад

    Under every video I've watched, someone comments that "this is the best video on MH algorithm!!" but I still don't understand it 😭

  • @karannchew2534
    @karannchew2534 2 года назад

    03:35 A new theta is drawn from the Proposal Distribution, which has a normal distribution in this example. How to decide/select the proposal distribution function?

  • @wp1300
    @wp1300 Год назад

    1:13 Monte Carlo
    2:04 Markov Chain

  • @karannchew2534
    @karannchew2534 2 года назад

    How would it work if theta consist of multiple variables?

  • @excel_wang
    @excel_wang 8 лет назад +1

    Thanks! This explains MCMC perfectly. However it does not seem to explain why Markov chain is required? Why not just use Monte Carlo alone for drawing from the distribution?

    • @rockstarchileno2
      @rockstarchileno2 7 лет назад

      The Random Walk is a Markov Chain, problem they using to model the problem not to solve the problem

  • @SahibYar
    @SahibYar 8 лет назад +2

    Well explained

  • @bhaveshsolanki8765
    @bhaveshsolanki8765 8 лет назад

    excellent

  • @victorvolkov4169
    @victorvolkov4169 2 года назад

    It seems, usage of Beta(1,1,0.286), Beta(1,1,0.380), Binomial (10,4,0.286) and Binomial(10,4,0.380) at the time frame 4:16 has no meaning: the first two are constants and equal to each other, and the latter two describe PDF to express outside [0,1] region, as shown in the plot.

  • @lxl274
    @lxl274 5 лет назад +2

    what is the proposal distribution, which generating theta for each time?

    • @gordongoodwin6279
      @gordongoodwin6279 3 года назад

      It’s a normal curve in this example, centered around the theta value sampled in the previous iteration

  • @pranavkhanna9459
    @pranavkhanna9459 6 лет назад

    Thanks

  • @archanamaurya89
    @archanamaurya89 4 года назад

    Can you PLEASEEE add subtitles in your video? Somehow for these particular video series, automatic closed caption is not available either :(

  • @franciscogallegos7152
    @franciscogallegos7152 4 года назад

    There is a mistake at 4:38. I.e., .247 > 0.039, not less.

  • @ajaydhungana1921
    @ajaydhungana1921 2 года назад

    Sir..so MCMC is not seprarete algorithm but uses Meterpolis hasting algorithm.. i thought MCMC was a seperate procedure that helps us to simulate data to help us identify posterior distribution.
    Also i want to learn more.. how can i do so?

    • @statacorp
      @statacorp  2 года назад

      Contact us at tech-support@stata.com for assistance.

  • @ahmedatta6508
    @ahmedatta6508 4 года назад

    thanks for great video
    why you using uniform distribution to generate random variable and compare the result with it ?

    • @gordongoodwin6279
      @gordongoodwin6279 3 года назад

      This is how MH accepts candidate/proposed values where the posterior ratio of proposed/current is less than 1. When it’s less than 1, a uniform distribution is used to draw a random number. If that random number is below the acceptance ratio, we accept the candidate value. It’s just a random number generator to make sure we accept our values at that probability

  • @alexbode6894
    @alexbode6894 6 лет назад +3

    Can someone please explain to me how step one is calculated (posterior theta new / posterior theta old) because if you are sampling from a binomial distribution the output would be 0 or 1. and sampling from beta (1,1) is just sampling from a uniform distribution. for example what does beta(1,1,0.088) and binomial(10,4,0.88) each equal individially? Thanks in advance

    • @RYBAAC28
      @RYBAAC28 6 лет назад +3

      With the first example in the video:
      R code:
      prior1=dbeta(shape1=1,shape2=1,x=0.517)
      likelihood1=dbinom(x=4,size=10,prob=0.517)
      prior2=dbeta(shape1=1,shape2=1,x=0.380)
      likelihood2=dbinom(x=4,size=10,prob=0.380)
      r=(prior2*likelihood2)/(prior1*likelihood1)
      r
      1.31
      Each part equals:
      prior1=1
      prior2=1
      likelihood1=0.19
      likelihood2=0.25

  • @Ivan-td7kb
    @Ivan-td7kb 5 лет назад

    Wait so if we use MCMC to walk around the parameter space why do we even need a prior distribution? Is it only used to initialize the starting value of the MCMC?

  • @jennyapl1791
    @jennyapl1791 5 лет назад

    This is great but the typo = should say "proportional" on your definition of posterior

  • @sabrihamad
    @sabrihamad 3 года назад

    Thank you for this great tutorial! I have a question though: What happens if the mcmc sampler gives theta>1. You won't be able to calculate the likelihood or the prior. Do you discard this theta in this case? Shouldn't one use a uniform distribution u(0,1) to make sure we are getting a theta in [0, 1]?

    • @gordongoodwin6279
      @gordongoodwin6279 3 года назад

      You’ll need to read up on the distinction between Metropolis and Metropolis Hastings. The MH was created for this very reason, to address proposal distributions for constrained parameters, like sigma. The regular Metropolis algorithm only works for non-constrained parameters where this isn’t an issue. Basically, MH adjusts for this by allowing non symmetric proposal distributions in that instance. Beyond the scope of this video, I’d recommend watching Ben Lamberts series on Bayesian Statisitcs. He has a video specific to MH and this question

  • @최창호-v4b
    @최창호-v4b 6 лет назад

    Please explain this for me...why do you use Beta(1,1) as prior distribution which is flat, why not use Beta(30, 30) you used in previous video?

  • @ASHISHDHIMAN1610
    @ASHISHDHIMAN1610 2 года назад

    3:14 I think we accept theta new when u > acceptance probability

  • @rizwanniaz9265
    @rizwanniaz9265 6 лет назад +1

    how to calculate odd ratio in bayesian ordered logistic plz tell me

  • @ahmedhassanGent
    @ahmedhassanGent 3 года назад

    why do we do step 3 at 4:00?

  • @yangchen9983
    @yangchen9983 6 лет назад

    The best

  • @zachkim1624
    @zachkim1624 5 лет назад

    what's the program tht he's using? looks so much simpler than rjags that i'm using right now

  • @nihaarrshah
    @nihaarrshah 6 лет назад

    I am not able to link the binomial likelihood and beta prior with the proposal and the target distributions. Do they correspond to each other?

    • @gordongoodwin6279
      @gordongoodwin6279 3 года назад

      The target distribution is just the posterior, which is proportional to the prior * likelihood. A beta prior is a conjugate prior for the beta binomial posterior (target) distribution. Not all priors are conjugate priors. Regarding the proposal distribution, a normal distribution is often used b/c it is a symmetric distribution, but it’s not specifically mandated to be a normal

  • @juggernautuci8253
    @juggernautuci8253 4 года назад

    how do you make animation

  • @josiedahne3832
    @josiedahne3832 7 месяцев назад

    Can anyone explain how MCMC works as if I'm reaaaaaaaaally stupid (which I am) pleaaaaaaaaaase?

  • @AndacDemir
    @AndacDemir 4 года назад

    great explanation, but I had to set the speed 0.75

  • @taotaotan5671
    @taotaotan5671 3 года назад

    Nice... But I guess people at the level of MCMC Bayesian inference should be comfortable with R lol

  • @andreneves6064
    @andreneves6064 6 лет назад

    English subtitles, please