Maximum Likelihood, clearly explained!!!

StatQuest with Josh Starmer · Beginner ·🔢 Mathematical Foundations ·8y ago

Key Takeaways

Maximum Likelihood estimation is demonstrated using a normal distribution to fit a dataset of mouse weights, showcasing how to find the optimal parameters for the distribution.

Full Transcript

stack Quest check it it's bad to the bone stack quiz check it out it's bad to the bone hello and welcome to stack Quest stack Quest is brought to you by the friendly folks in the genetics department at the University of North Carolina at Chapel Hill today we're going to be talking about maximum likelihood let's say we weighed a bunch of mice the goal of Maximum likelihood is to find the optimal way to fit a distribution to the data there are lots of different types of distributions for different types of data here's a normal distribution here's what an exponential distribution looks like and here's what a gamma distribution looks like and there are many more the reason you want to fit a distribution to your data is it can be easier to work with and it is also more General it applies to every experiment of the same type in this case we think the weights might be normally distributed that means we think it came from this type of distribution normally distributed means a number of things first we expect most of the measurements for for example mouse weights to be close to the mean or average and we see lo and behold in our data set most of the mice weigh close to the average we also expect the measurements to be relatively symmetrical around the mean although the measurements are not perfectly symmetrical around the mean they are not crazy skewed to one side either this is pretty good normal distributions come in all kinds of shapes and sizes they can be skinny medium or large boned once we settle on the shape we have to figure out where to Center the thing is one location better than another before we get too technical let's just pick any old normal distribution and see how well it fits the data this distribution says most of the values you measure should be near my average the distribution average is the black dotted line in this case that's different from the average of the actual measurements unfortunately most of the values we measured are far from the distribution's average according to a normal distribution with a mean value over here the probability or likelihood of observing all these weights is low what if we shifted the normal distribution over so that it mean was the same as the average weight according to a normal distribution with a mean value here the probability or likelihood of observing these weights is relatively high if we kept Shifting the normal distribution over then the probability or likelihood of observing these measurements would go down again we can plot the likelihood of observing the data over over the location of the center of the distribution we start on the left side and we calculate the likelihood of observing the data and then we shift the distribution to the right and recalculate we just do this all the way down the data once we've tried all the possible locations we could center the normal distribution on we want the location that maximizes the likelihood of observing the weights we measured this location for the mean maximizes the likelihood of observing the weights we measured thus it is the maximum likelihood estimate for the mean in this case we're specifically talking about the mean of the distribution not the mean of the data however with the normal distribution those two things are the same great now we have figured out the maximum likelihood estimate for the mean now we have to figure out the max maximum likelihood estimate for the standard deviation again we can plot the likelihood of observing the data over different values for the standard deviation now we found the standard deviation that maximizes the likelihood of observing the weights we measured this is the normal distribution that has been fit to the data by using the maximum likelihood estimations for the mean and the standard deviation now when someone says that they have the maximum likelihood estimates for the mean or the standard deviation or for something else you know that they found the value for the mean or the standard deviation or for whatever that maximizes the likelihood that you observed the things that you observed terminology Alert in everyday conversation probability and likelihood mean the same thing however in stats land likelihood specifically refers to this situation we've covered here where you are trying to find the optimal value for the mean or standard deviation for a distribution given a bunch of observed measurements this is how we fit a distribution to data hooray we've made it to the end of another exciting stack Quest if you like this stack Quest and want to see more like it please subscribe it's super easy easy just click the little button below and if you have any suggestions for other stat quests that I could do put them in the comments all right until next time Quest on

Original Description

If you hang out around statisticians long enough, sooner or later someone is going to mumble "maximum likelihood" and everyone will knowingly nod. After this video, so can you! Also, some viewers asked for a worked out example that includes the math. Here it is! (you may need to click on the "Show More" button below to see the link) https://youtu.be/p3T-_LMrvBc For a complete index of all the StatQuest videos, check out: https://statquest.org/video-index/ If you'd like to support StatQuest, please consider... Patreon: https://www.patreon.com/statquest ...or... YouTube Membership: https://www.youtube.com/channel/UCtYLUTtgS3k1Fg4y5tAhLbw/join ...buying one of my books, a study guide, a t-shirt or hoodie, or a song from the StatQuest store... https://statquest.org/statquest-store/ ...or just donating to StatQuest! https://www.paypal.me/statquest Lastly, if you want to keep up with me as I research and create new StatQuests, follow me on twitter: https://twitter.com/joshuastarmer 0:00 Awesome song and introduction 0:34 Motivation for MLE 1:12 Overview of the Normal Distribution 2:06 Thinking about where to center the distribution 3:25 Using MLE to find the optimal location for the center 4:27 Using MLE to find the optimal standard deviation 5:19 Probability vs Likelihood #statquest #MLE
Watch on YouTube ↗ (saves to browser)
Sign in to unlock AI tutor explanation · ⚡30

Playlist

Uploads from StatQuest with Josh Starmer · StatQuest with Josh Starmer · 54 of 60

1 Cutting Butter
Cutting Butter
StatQuest with Josh Starmer
2 onion-dice
onion-dice
StatQuest with Josh Starmer
3 R-squared, Clearly Explained!!!
R-squared, Clearly Explained!!!
StatQuest with Josh Starmer
4 Wrapping up dumplings for pot stickers.
Wrapping up dumplings for pot stickers.
StatQuest with Josh Starmer
5 The standard error, Clearly Explained!!!
The standard error, Clearly Explained!!!
StatQuest with Josh Starmer
6 That Dude (in the movies)
That Dude (in the movies)
StatQuest with Josh Starmer
7 How to puree garlic
How to puree garlic
StatQuest with Josh Starmer
8 Confidence Intervals, Clearly Explained!!!
Confidence Intervals, Clearly Explained!!!
StatQuest with Josh Starmer
9 RPKM, FPKM and TPM, Clearly Explained!!!
RPKM, FPKM and TPM, Clearly Explained!!!
StatQuest with Josh Starmer
10 Principal Component Analysis (PCA) clearly explained (2015)
Principal Component Analysis (PCA) clearly explained (2015)
StatQuest with Josh Starmer
11 StatQuest: RNA-seq - the problem with technical replicates
StatQuest: RNA-seq - the problem with technical replicates
StatQuest with Josh Starmer
12 That's Alright
That's Alright
StatQuest with Josh Starmer
13 Christmas In Rio! (now on iTunes!)
Christmas In Rio! (now on iTunes!)
StatQuest with Josh Starmer
14 Drawing and Interpreting Heatmaps
Drawing and Interpreting Heatmaps
StatQuest with Josh Starmer
15 Rachel's Song (the ballad of Hazel Motes)
Rachel's Song (the ballad of Hazel Motes)
StatQuest with Josh Starmer
16 Deal With It
Deal With It
StatQuest with Josh Starmer
17 Say Your Goodbyes
Say Your Goodbyes
StatQuest with Josh Starmer
18 Another Day
Another Day
StatQuest with Josh Starmer
19 StatQuest: Linear Discriminant Analysis (LDA) clearly explained.
StatQuest: Linear Discriminant Analysis (LDA) clearly explained.
StatQuest with Josh Starmer
20 Maybe It'll Go Away
Maybe It'll Go Away
StatQuest with Josh Starmer
21 Nasty Weather
Nasty Weather
StatQuest with Josh Starmer
22 Roses
Roses
StatQuest with Josh Starmer
23 p-hacking and power calculations
p-hacking and power calculations
StatQuest with Josh Starmer
24 I Love You
I Love You
StatQuest with Josh Starmer
25 The Coldest Day of the Year
The Coldest Day of the Year
StatQuest with Josh Starmer
26 Psycho Killer
Psycho Killer
StatQuest with Josh Starmer
27 False Discovery Rates, FDR, clearly explained
False Discovery Rates, FDR, clearly explained
StatQuest with Josh Starmer
28 A New Song
A New Song
StatQuest with Josh Starmer
29 StatQuickie: Thresholds for Significance
StatQuickie: Thresholds for Significance
StatQuest with Josh Starmer
30 Logs (logarithms), Clearly Explained!!!
Logs (logarithms), Clearly Explained!!!
StatQuest with Josh Starmer
31 Bar Charts Are Better than Pie Charts
Bar Charts Are Better than Pie Charts
StatQuest with Josh Starmer
32 Mr  Hattie
Mr Hattie
StatQuest with Josh Starmer
33 StatQuickie: Which t test to use
StatQuickie: Which t test to use
StatQuest with Josh Starmer
34 Fisher's Exact Test and the Hypergeometric Distribution
Fisher's Exact Test and the Hypergeometric Distribution
StatQuest with Josh Starmer
35 Standard Deviation vs Standard Error, Clearly Explained!!!
Standard Deviation vs Standard Error, Clearly Explained!!!
StatQuest with Josh Starmer
36 StatQuest: DESeq2, part 1, Library Normalization
StatQuest: DESeq2, part 1, Library Normalization
StatQuest with Josh Starmer
37 The Rainbow
The Rainbow
StatQuest with Josh Starmer
38 StatQuest: edgeR, part 1, Library Normalization
StatQuest: edgeR, part 1, Library Normalization
StatQuest with Josh Starmer
39 The Main Ideas behind Probability Distributions
The Main Ideas behind Probability Distributions
StatQuest with Josh Starmer
40 StatQuest:  One or Two Tailed P-Values
StatQuest: One or Two Tailed P-Values
StatQuest with Josh Starmer
41 Evil Genius
Evil Genius
StatQuest with Josh Starmer
42 Sampling from a Distribution, Clearly Explained!!!
Sampling from a Distribution, Clearly Explained!!!
StatQuest with Josh Starmer
43 StatQuest: edgeR and DESeq2, part 2 - Independent Filtering
StatQuest: edgeR and DESeq2, part 2 - Independent Filtering
StatQuest with Josh Starmer
44 The Main Ideas of Fitting a Line to Data (The Main Ideas of Least Squares and Linear Regression.)
The Main Ideas of Fitting a Line to Data (The Main Ideas of Least Squares and Linear Regression.)
StatQuest with Josh Starmer
45 The Sum of Regrets
The Sum of Regrets
StatQuest with Josh Starmer
46 Lowess and Loess, Clearly Explained!!!
Lowess and Loess, Clearly Explained!!!
StatQuest with Josh Starmer
47 StatQuest: Hierarchical Clustering
StatQuest: Hierarchical Clustering
StatQuest with Josh Starmer
48 StatQuest: K-nearest neighbors, Clearly Explained
StatQuest: K-nearest neighbors, Clearly Explained
StatQuest with Josh Starmer
49 Your Dark Side
Your Dark Side
StatQuest with Josh Starmer
50 Boxplots are Awesome!!!
Boxplots are Awesome!!!
StatQuest with Josh Starmer
51 What is a (mathematical) model?
What is a (mathematical) model?
StatQuest with Josh Starmer
52 Linear Regression, Clearly Explained!!!
Linear Regression, Clearly Explained!!!
StatQuest with Josh Starmer
53 Linear Regression in R, Step-by-Step
Linear Regression in R, Step-by-Step
StatQuest with Josh Starmer
Maximum Likelihood, clearly explained!!!
Maximum Likelihood, clearly explained!!!
StatQuest with Josh Starmer
55 Brothers
Brothers
StatQuest with Josh Starmer
56 Using Linear Models for t-tests and ANOVA, Clearly Explained!!!
Using Linear Models for t-tests and ANOVA, Clearly Explained!!!
StatQuest with Josh Starmer
57 StatQuest: How to make a Mean Pizza Crust!!!
StatQuest: How to make a Mean Pizza Crust!!!
StatQuest with Josh Starmer
58 StatQuest: A gentle introduction to RNA-seq
StatQuest: A gentle introduction to RNA-seq
StatQuest with Josh Starmer
59 I'm Alive
I'm Alive
StatQuest with Josh Starmer
60 StatQuest: t-SNE, Clearly Explained
StatQuest: t-SNE, Clearly Explained
StatQuest with Josh Starmer

This video explains Maximum Likelihood estimation and how it is used to fit a normal distribution to a dataset of mouse weights. The goal is to find the optimal parameters for the distribution that maximize the likelihood of observing the data.

Key Takeaways
  1. Choose a distribution to fit the data
  2. Determine the parameters of the distribution (e.g. mean, standard deviation)
  3. Calculate the likelihood of observing the data given the parameters
  4. Find the parameters that maximize the likelihood
  5. Plot the likelihood of observing the data over different parameter values
💡 Maximum Likelihood estimation is a powerful tool for fitting distributions to data and can be used in a variety of statistical and machine learning applications.

Related AI Lessons

Chapters (7)

Awesome song and introduction
0:34 Motivation for MLE
1:12 Overview of the Normal Distribution
2:06 Thinking about where to center the distribution
3:25 Using MLE to find the optimal location for the center
4:27 Using MLE to find the optimal standard deviation
5:19 Probability vs Likelihood
Up next
How to Open OSM Files (OpenStreetMap Data)
File Extension Geeks
Watch →