Yan Holtz logo ← All issues
Dataviz Universe

R²? Not what it seems!

Hi!

Before we start, let me wish you my very best for 2025!

I'm sure it's going to be full of stunning charts, and I'm here to help you make that happen.

In case you forgot, you're currently reading Dataviz Universe, a newsletter where I share one short, to-the-point dataviz tip every week. Oh and I'm a real human called Yan Holtz on the other side! So feel free to drop me an email anytime or ping me on LinkedIn!

R² Is Not What It Seems

R², or the coefficient of determination, is often seen as the go-to measure for how well a model explains the data.

It's easy to trust! If the R² is close to 1 your model is good, otherwise it's bad.

Nope. It's really not that simple and R² can actually be very misleading.

I made a little interactive chart to illustrate the issue.

Scatterplot R² playground

See? When circles are drawing a curve, the R² and correlation values are still pretty high. Yet it's clear that applying a linear regression here doesn't make sense.

Relying on R² alone could lead you to the wrong conclusion. Don't let it fool you!

Interactive Playground

The graph above is interactive! You can drag any circle, and the R² and correlation values will update on the fly.

I think it's a powerful way to build intuition on what R² really means, and when not to trust it.

As often, the conclusion is: always plot your data, and plot all of them!

Move the circles yourself!

Next

I'm the kind of person who loves crafting charts with D3.js at 11PM with a glass of wine and a bit of reggae while the kid sleeps. So if there's a statistical concept you're struggling to explain and think it could benefit from a chart like this, let me know! I'd love to help. If you're a Python user, these kinds of concepts are also integrated in my Matplotlib Journey project.


Wishing you a wonderful day, and remember: always plot your data!
Yan

Enjoyed this?

Get one short, actionable dataviz tip every Saturday. Join 19,000+ data people.