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/
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
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?
...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
...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
...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
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!!!!
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
1:54 Odds vs Probabilities
3:03 Calculating Odds from Probabilities
Beautiful
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.
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.
#statquest #statistics
Omg this is freaking gooooooooooood
More User Perspectives
You are a lifesaver!!
@malakbasem5655Also (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.
@ravindergill9850Your 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%).
Thank you. This is great!
@monjasonsteng7861u r amazing.i wish u the best<3
@nashwa.msheikYour 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-yc8qoThanks. I appreciate this content!
@felliesweetieWow. This is great. Can someone contact you privately please? Incaae I have some difficulties in understanding at the Uni
@ijeomaweller5126Thanks for your clear explanations!
@leixiao169thanks for clarifying in the comments
@pratyushyadav3947I am currently working on a self driving car project, where I had to generate an occupancy map using Log(Odds), thanks for the help!
@koustubhjaiswal6509BAM!! thanks statquest
@divyakumar8147Great 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
@hobycedric6279Funniest learning method i have ever watched in youtube
@Manash123-m6lEven though the "odds" is a ratio, it's diffrent from odds ratio !!! quadruple BAM!!
@mohamedguebli2522That was such a good explanation!
@thecodegobbler2179You explained it very well. Thank you
@simisreedharan5896Bam
@cauameira8108I always enjoy your explanation ,more strength to you .🎉🎉🎉❤❤❤
@abdulqudusolamilekanPlease, run for President next time. The US desperately needs logical and intelligent people in politics.
@galiakraicheva9262Thank you so much sir!
@henrytzuo8517BAM!!!
@nathaniel51579:18 Logit Function
@ravi089In Excel, Log is calculated using LN() and not LOG()
@lost_in_philosophyOdds 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.
❤❤❤❤
@affanahmedkhan7362Wow! 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!
@ubaidmohameddahir1400You're an amazing teacher! Thanks for sharing this :)
@palermodprGG my dude
@SadSlayer404Baaaaammmm!
@sagarchauhan3593Thank you sir for making me and many people understand about log(odds) so beautifully. Your video sessions are so easy to understand.
@snehasishbehera8447Triple 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
but wich is the result of log(odds=30/0) it would be infinite ? and how do you graph that shiet in the distribution
@marcelobravo3074so if there is no way of losing my odds will be infinite?
@marcelobravo3074where do you learn all this?
@marcelobravo3074This 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