Save this video free

Stats 401 - Week 9 - Part 2

Miles Chen · 1:03:19 · Watch on YouTube

These notes were made with YouTube Collector. Paste any YouTube link and get the same: a summary, chapters and a searchable transcript.

Overview

Miles Chen explains how the Metropolis algorithm uses log probabilities to sample from Bayesian posteriors without deriving their normalizing constants, first checking the method on a beta-binomial baseball example and then applying it to exponential arrival data. He also shows how proposal width affects chain mixing and effective sample size, and demonstrates Metropolis sampling on a cipher-breaking task that scores substitution keys using English letter-pair frequencies and a word lexicon.

Key takeaways

Chapters

0:00 Metropolis Acceptance in Log Space
3:25 Building a Metropolis Chain for the Baseball Beta-Binomial
7:15 Running and Reading the Baseball Posterior Chain
10:00 Comparing Metropolis Estimates with the Exact Beta Posterior
14:00 Modeling Server Arrivals with an Exponential Rate
18:00 Constructing the Arrival-Rate Log Weight
23:20 Estimating Arrival Probabilities from Metropolis Draws
28:50 Proposal Width, Autocorrelation, and Effective Sample Size
31:40 Metropolis-Hastings and Asymmetric Proposals
36:20 Cipher Breaking as a Search over 26-Factorial Keys
43:50 Scoring Cipher Keys with English Bigrams and a Lexicon
57:50 Recovering Familiar Text and Recognizing Scoring Limits

Keep these chapters and the full searchable transcript in your own library.

Transcript excerpt

0:03 Right. When um as we move forward through this Metropolis algorithm, we're going to be dealing with a bunch of probabilities and when you multiply a whole bunch of probabilities, those probabilities can end up getting really, really, really tiny. And so um we we often run up if if we don't if we leave them in their regular um decimal form, then the um we run into underflow uh problems where the uh floating point number system in our computers can't represent them accurately. So a lot of times what we will do is we work with logs and logs will convert the um the small probability to a

0:53 basically a negative number and then we can um add or subtract the uh the negative numbers. So instead of um doing a a weight value of the proposed divided by the weight value of the current, we'll take the log log weight of the proposed minus the log weight of the current and then um we will compare the log of our random uniform value um versus that difference or um or zero. And um and so, you know, for example, if uh the current log weight is -12 and the proposed log weight is -14, then um there's a difference of -2. And so if we take the uh

1:42 um uh probability of that, okay, the um if we exponentiate it, e to the -2, uh we would get something around 0.135 and that means we would accept um you know, a proposed value with a with only around 13% probability. And if if we reject it, then we recycle the the same value. Okay. So um this is um how we're going to um go ahead and and try it out using the um the beta binomial example with the the baseball,

This is the start of the transcript. Save this video free for the whole transcript, searchable and time-coded.

Related notes

Summary, takeaways, and chapters were generated by AI from the video's transcript and may contain errors. The video belongs to its creator, Miles Chen.

Want the full transcript?

Save this video in YouTube Collector to get its complete searchable transcript, your own AI summaries, and a library that keeps every video you collect in one place.