free web page hit counter
🛡️
Copyright Notice: This video is officially sourced and embedded from YouTube. For all copyright inquiries, reports, or removals, please contact YouTube's legal team here.
StatQuest with Josh Starmer

StatQuest with Josh Starmer

1,640,000 subscribers

👁 443,076 views

Odds and Log(Odds), Clearly Explained!!!

Video Overview & Insights

The odds aren't as odd as you might think, and the log of the odds is even simpler! This StatQuest covers those subjects so that you can understand the statistics for true/false type problems (like Logistic Regression).

Here's the code for generating the figure at 9:46 https://github.com/StatQuest/odds_and_log_odds_example
NOTE: In statistics, machine learning and many programming languages, like Java, R and Python, the default base for the log function is 'e'. So log(0.17) = "log base e of 0.17" = -1.77. The natural log (log to base 'e') is used because it often simplifies the mathematics that underpins statistics. That said, you can use whatever base you would like as long as you are consistent.
Also, at 10:00, I say that a histogram of the log(odds) has the shape of a normal distribution, but what I should have said is that the shape is similar to a normal distribution and is approximated with a normal distribution.
Lastly, people often ask about how to generate the normal distribution: First, I randomly selected a number between 1 and 100 and I get 32. That means I will use 32 as the numerator for the odds. The denominator is then 100-32 = 68. Then I calculate the log(32 / 68) and get -0.75 (because I use log base 'e', but you can use any log base as long as you are consistent). Then I pick another random number between 1 and 100 and get 54. This means that the numerator for my odds is 54 and the denominator is 100-54 = 46. So I calculate the log(54 / 46)=0.16. Then I just repeat that process a bunch of times (100s) and draw a histogram of the log(odds) values. If I do this, I will get a normal distribution.

Support StatQuest by buying my books The StatQuest Illustrated Guide to Machine Learning, The StatQuest Illustrated Guide to Neural Networks and AI, or a Study Guide or Merch!!! https://statquest.org/statquest-store/

— @statquest

For a complete index of all the StatQuest videos, check out:

https://statquest.org/video-index/

Please, this is from Brazil, send us the code in R for the image 9:52.

— @PauloCesar-mc8gh

If you'd like to support StatQuest, please consider...

Patreon: https://www.patreon.com/statquest

Hello! There is one thing that is confusing at the first glance - it might require a different description. I refer to the slide "To show you what the big deal is all about, if I pick pairs of random numbers that add up to 100...". How (from what set) do you pick pairs that add up to 100 so that the histogram is the normal distribution?

— @bartekl730

...or...

YouTube Membership: https://www.youtube.com/channel/UCtYLUTtgS3k1Fg4y5tAhLbw/join

Love SQ videos 👍 As an aside . . . 2:11 -- an example where math historically uses similar notation for related but distinct operations. Which is lamentable because many young learners get frustrated and lose interest: www.youtube.com/watch?v=U-ve8Yh4Ro8&t=23m16s

— @chromerims

...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/

You are the best, mate

— @ayat5483

...or just donating to StatQuest!

https://www.paypal.me/statquest

I know you need to make money, but gosh is this video unwatchable with all of the adds. absolutely horrible experience

— @oliviabaum4535

Lastly, if you want to keep up with me as I research and create new StatQuests, follow me on twitter:

https://twitter.com/joshuastarmer

fucking so clear!!!!

— @Jo0FrAnK0oL

0:00 Awesome song and introduction

0:23 Odds

You are a fantastic teacher, right now I'm learning about data science and you are helping me a lot

— @lovetheory3742

1:54 Odds vs Probabilities

3:03 Calculating Odds from Probabilities

Beautiful

— @shahzainhaider2801

5:23 Log(odds)

8:45 Logits

Bro, what on earth!.
I can't believe that I found a gold mine.
I've subscribed, and I'll recommend your channel for anyone who wants to learn statistics and machine learning.

— @MedmoudYacoub

9:30 Log(odds) are Normally Distributed

10:24 Summary

Summarising whatever I have understood -
1. So basically probability batata hai kuch hone ka chances kitna hai. And Odds batata hai kuch hone ka chance COMPARED to kuch nahi hone ka chance.

2. And log of odds bigger numbers to compress and smaller numbers ko stretch karta hai taki values to normalise/standardise/symmetric karke ek scale pe smoothly fit kar sake.

3. And lastly, log of odds manually calculate karke le lie humme e ka power me kitna value lene se odd milega ye pata karna hai. Since I'm a beginner so with my knowledge in this topic (disclaimer**) - assuming power ka value hamesha 1.something hoga. So e power 1 ka value 2.718 toh odd/2.718 will give another power, so if you multiply (odd/2.718) * 2.718, then we should get the log of odds ka value.

Ik we have functions of get log(odds), but it's always good to know how to solve anything without a function.
Lastly, log(odd) ko aur easy and correct way me calculate karne ka agar solution ho toh please let me know by replying to this comment.

— @shailejagundu2017

#statquest #statistics

Omg this is freaking gooooooooooood

— @SukhoiBozalev

More User Perspectives

@

You are a lifesaver!!

@malakbasem5655
@

Also (time mark 1:17) "odds are not probabilities" is correct, but fractions can be converted to probabilities (as percentages), and you incorrectly convert odds to fractions.

@ravindergill9850
@

Your conversion of odds to fractions at time mark 0:40 is incorrect. It should be 1/5 as the total number of possibilities is 5, not 4.

If you doubt my logic, try the inverse, "The odds of my losing a game are 4:1" and apply the same conversion to fraction.

In your approach you would divide 4/4, (100%) when it should be 4/5 (80%).

@ravindergill9850
@

Thank you. This is great!

@monjasonsteng7861
@

u r amazing.i wish u the best<3

@nashwa.msheik
@

Your videos have helped me out tremendously on my journey to better understand statistics. Thank you for you service! I grabbed a Triple BAM Tee to support the cause. Can't wait to sport it.

@JavierSanchez-yc8qo
@

Thanks. I appreciate this content!

@felliesweetie
@

Wow. This is great. Can someone contact you privately please? Incaae I have some difficulties in understanding at the Uni

@ijeomaweller5126
@

Thanks for your clear explanations!

@leixiao169
@

thanks for clarifying in the comments

@pratyushyadav3947
@

I am currently working on a self driving car project, where I had to generate an occupancy map using Log(Odds), thanks for the help!

@koustubhjaiswal6509
@

BAM!! thanks statquest

@divyakumar8147
@

Great content. However, I don't clearly get the example of the pair of values that sum to 100. can somebody explain it and give some examples of pairs? thank you

@hobycedric6279
@

Funniest learning method i have ever watched in youtube

@Manash123-m6l
@

Even though the "odds" is a ratio, it's diffrent from odds ratio !!! quadruple BAM!!

@mohamedguebli2522
@

That was such a good explanation!

@thecodegobbler2179
@

You explained it very well. Thank you

@simisreedharan5896
@

Bam

@cauameira8108
@

I always enjoy your explanation ,more strength to you .🎉🎉🎉❤❤❤

@abdulqudusolamilekan
@

Please, run for President next time. The US desperately needs logical and intelligent people in politics.

@galiakraicheva9262
@

Thank you so much sir!

@henrytzuo8517
@

BAM!!!

@nathaniel5157
@

9:18 Logit Function

@ravi089
@

In Excel, Log is calculated using LN() and not LOG()

@lost_in_philosophy
@

Odds are the ratio of the probability of something happening to the porbability of something not happening.
Sometimes given as counts, it's the ratio between something happening and something not happening.
Probabilities are the ratio between something happening and all the ways that event could happen.
Odds where the numerator < denominator can be between >0<= 1. Odds where numerator > denominator can be between >1 to infinity.
Thus we use log(odds) to scale the distance from the origin to be the same for i.e. log(1/6) and log(6/1). This makes odds easier to interpret, etc.

@benny9794
@

❤❤❤❤

@affanahmedkhan7362
@

Wow! What an amazing teacher! I've been looking for such a clear and insightful explanation. Josh, you're the best. This not only deepens my understanding but also inspires me to keep learning. Even though I've completed my master's degree In Data Science , coming across this great lecture feels like a refreshing, new experience. Thank you, Josh!

@ubaidmohameddahir1400
@

You're an amazing teacher! Thanks for sharing this :)

@palermodpr
@

GG my dude

@SadSlayer404
@

Baaaaammmm!

@sagarchauhan3593
@

Thank you sir for making me and many people understand about log(odds) so beautifully. Your video sessions are so easy to understand.

@snehasishbehera8447
@

Triple BAM!!

By far the best machine learning tutor out there. Josh, you're a legend! Your ability to break down complex concepts is unmatched. Thank You

@aaryaveerrajput8031
@

but wich is the result of log(odds=30/0) it would be infinite ? and how do you graph that shiet in the distribution

@marcelobravo3074
@

so if there is no way of losing my odds will be infinite?

@marcelobravo3074
@

where do you learn all this?

@marcelobravo3074
@

QUADRUPLE BAM !!!!

Thank you for this tutorial! I'm currently learning machine learning (logistic regression), and this lecture clarified the concept for me. You've gained a subscriber!

@chayanikahazra1915
@

This actually, unexpectedly cleared up something that is so easily confusing - even having played a few parlays and probabilities in the past.. so glad I found you, Nobel Prize Worthy Starmer. My AIML cohorts over there in India were so excited of your recent visit. You are an international Star'mer.

@Jagentic
@

@Jagentic