Skip to main content

Wilke's regression line CIs via GIFs

A tweet straight up solved a problem I encountered while teaching. The problem: How can I explain why the confidence interval area for a regression line is curved when the regression line is straight.

This comes up when I use my favorite regression example. It explains regression AND the power that government funding has over academic research. TL:DR- Relative to the number of Americans who die by gun violence, there is a disproportionately low amount of a) federal funding and b) research publications as to  better understand gun violence death when compared to funding and publishing about other common causes of death in America. Why? Dickey Amendment to a 1996 federal spending bill.

See graph below:

https://jamanetwork.com/journals/jama/article-abstract/2595514

The gray area here is the confidence interval region for the regression line. And I had a hard time explaining to my students why the regression line, which is straight, doesn't have a perfectly rectangular confidence interval region.


Claus Wilke created this illustration via GIF to explain why the confidence interval for a regression line looks the way it does by inserting potential regression lines that could fit, given random sampling. He shared it via Tweet but it is also available in GitHub.


Sometimes, it is just easier to show a thing than come up with words for a thing, I believe, like when explaining what it is when we mean the best fitting line for a data setconfidence interval size and the likelihood of containing mu, the relationship between z-scores and the normal curve, and why you should always graph out your correlation data.

Popular posts from this blog

Ways to use funny meme scales in your stats classes

Have you ever heard of the theory that there are multiple people worldwide thinking about the same novel thing at the same time? It is the multiple discovery hypothesis of invention . Like, multiple great minds around the world were working on calculus at the same time. Well, I think a bunch of super-duper psychology professors were all thinking about scale memes and pedagogy at the same time. Clearly, this is just as impressive as calculus. Who were some of these great minds? 1) Dr.  Molly Metz maintains a curated list of hilarious "How you doing?" scales.  2) Dr. Esther Lindenström posted about using these scales as student check-ins. 3) I was working on a blog post about using such scales to teach the basics of variables.  So, I decided to create a post about three ways to use these scales in your stats classes:  1) Teaching the basics of variables. 2) Nominal vs. ordinal scales.  3) Daily check-in with your students.  1. Teach your students the basics...

Leo DiCaprio Romantic Age Gap Data: UPDATE

Does anyone else teach correlation and regression together at the end of the semester? Here is a treat for you: Updated data on Leonardo DiCaprio, his age, and his romantic partner's age when they started dating. A few years ago, there was a dust-up when a clever Redditor r/TrustLittleBrother realized that DiCaprio had never dated anyone over 25. I blogged about this when it happened. But the old data was from 2022. Inspired by this sleuthing,  I created a wee data set, including up-to-date information on his current relationship with Vittoria Ceretti, so your students can suss out the patterns that exist in this data.

Logical Fallacy Ref Meme

So, I love me some good statsy memes. They make a brief, important point that sticks in the heads of students. I've recently learned of the Logical Fallacy Ref meme. Here are a couple that apply to stats class: