Daily Dose of Data Science

Share this post

A Visual and Intuitive Guide to The Bias-Variance Problem

www.blog.dailydoseofds.com

Discover more from Daily Dose of Data Science

High-quality insights on Data Science and Python, along with best practices — shared daily. Get a 550+ Page Data Science PDF Guide and 450+ Practice Questions Notebook, FREE.
Over 36,000 subscribers
Continue reading
Sign in

A Visual and Intuitive Guide to The Bias-Variance Problem

The histogram analogy.

Avi Chawla
Aug 13, 2023
16
Share this post

A Visual and Intuitive Guide to The Bias-Variance Problem

www.blog.dailydoseofds.com
2
Share

The concepts of overfitting and underfitting are pretty well understood by most folks.

Yet, here’s another neat way to understand them intuitively.

Imagine you want to estimate a probability density function (PDF) using a histogram.

Your estimation entirely depends on the bin width:

  • Creating small bins will overfit the PDF. This leads to high variance.

  • Creating large bins will underfit the PDF. This leads to high bias.

This is depicted in the image above.

Overall, the whole bias-variance problem is about finding the optimal bin width.

I first read this analogy in the book “All of Statistics” a couple of years back and found it to be pretty intuitive and neat.

Here’s the book if anyone’s interested in learning more: All of Statistics PDF. Page 306 inspired today’s post.

Hope that helped :)

Thanks for reading Daily Dose of Data Science! Subscribe for free to learn something new and insightful about Python and Data Science every day. Also, get a Free Data Science PDF (350+ pages) with 250+ tips.

👉 If you liked this post, don’t forget to leave a like ❤️. It helps more people discover this newsletter on Substack and tells me that you appreciate reading these daily insights. The button is located towards the bottom of this email.

👉 Over to you: What are some other analogies to understand the Bias-Variance problem?

Thanks for reading!


Whenever you’re ready, here are a couple of more ways I can help you:

  • Get the full experience of the Daily Dose of Data Science. Every week, receive two curiosity-driven deep dives that:

    • Make you fundamentally strong at data science and statistics.

    • Help you approach data science problems with intuition.

    • Teach you concepts that are highly overlooked or misinterpreted.

Daily Dose of Data Science ML articles
  • Promote to 29,000 subscribers by sponsoring this newsletter.


👉 Tell the world what makes this newsletter special for you by leaving a review here :)

Review Daily Dose of Data Science

👉 If you love reading this newsletter, feel free to share it with friends!

Share Daily Dose of Data Science

16
Share this post

A Visual and Intuitive Guide to The Bias-Variance Problem

www.blog.dailydoseofds.com
2
Share
Previous
Next
2 Comments
Share this discussion

A Visual and Intuitive Guide to The Bias-Variance Problem

www.blog.dailydoseofds.com
David Esp
Aug 13

The disadvantage of overfitting would be better illustrated if the "measured signal/data" incorporated a few "dents" and "bumps" (of the kind one wouldn't want fitted).

Expand full comment
Reply
Share
1 reply
1 more comment...
Top
New
Community

No posts

Ready for more?

© 2023 Avi Chawla
Privacy ∙ Terms ∙ Collection notice
Start WritingGet the app
Substack is the home for great writing