Skip to main content

Posts

Showing posts with the label regression line

History of Data Science's Regression Game

 There are already some pretty cool games for guessing linear relationships/regression lines. Dr. Hill's Eyeball Regression Game . The old, reliable Guess the Correlation game. However, I found a new one that has a particularly gorgeous interface, and a few extra features to help your learners. History of Data Science created the Regression game . It provides the player with a scatter plot, then the player needs to guess the y-intercept and slope. See that regression line? It is generated and changes as the entered a and b values change, which is a good learning tool. If played at the "easy-peasy" level, the player can even change those numbers multiple times over the course of 30 seconds, and watch as the corresponding line changes.  I think this game is a nice way to break up the ol' regression lecture and allows students to see the relationship between the scatter plot and the regression line.

Eyeball Regression game by Sophie Hill

 Sophie Hill created a great game that shows students how to "eyeball" regression lines (or just lines) by guessing the y-intercept and the slope.  At the beginning of the game, you get a scatter plot. Then, you need to guess the y-intercept and the slope.   Once you make a guess, it will show you the actual line of best fit...and your line, along with residuals and mean squared error. So, this doesn't just allow for eyeballing the regression line but also how to test the fit of a line. P.S.: If you liked this, you'd love the Guess the Correlation game.

Stats Arts and Crafts...Starts and Crafts?

My friends, winter is coming. Winter in Erie, PA, is no joke, so I've been encouraging my kids to pick up inside hobbies. My youngest is all about flipbooks right now, which inspired me to create my own statsy flipbook: Which, in turn, inspired me to create a blog post about statsy crafts. Crafts that you can do over Winter break for fun or maybe use as assignments for your students? A DIY Christmas gift for your favorite statistician?  The flipbook idea is an easy one to implement, as you only need index cards, a binder clip, and a pencil. Actually, many these can be done on the cheap if you have Legos, paper and pen, a log, yarn, baking supplies around. Not free, but not too expensive, either.  Data visualization via knitting A knitting-data-visualizer tracked temperatures via a knitting project, seen below. The different colors of yarn represent different temperatures on different days. Here is a full article from Gizmodo , which includes a link where you can purchase suppl...

In-house restaurant dining is related to increases in COVID-19 cases: Illustrates correlation, regression, and good science reporting

Niv Elis, writing for The Hill, summarized a report created by JP Morgan analyst Jesse Edgerton. The report found a link between in-restaurant spending from three weeks ago and increases in new cases of COVID-19 in different states now. Data for the analysis came from 1) J.P. Morgan/Chase in-restaurant (not online/takeout) credit card purchases and 2) infection data from Johns Hopkins.  How to use in class: 1. Correlation/regression: This graph, which summarizes the main findings from the report, may not include my beloved APA axis labels, but it does include an R2 and is a good example of a scatterplot.  ALSO: The author of The Hill piece was careful to include this information from the study's author, which clarifies that correlation doesn't necessarily equal causation. 2) Creativity in data analysis: Often, in intro psych stats, we use examples rooted in traditional social science research. We should use such an example. But we MUST also use examples that demonstrate how d...

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

Mathisfun.com's Least Squared Error calculator

Mathisfun.com bills this as a Least Squared Error calculator , but I don't think it is a calculator. I think it is a nice visual aid that demonstrates how the regression line/equation change as your data changes. The static photo below doesn't do this interactive website justice. You can drag and drop any of the dots on the scatter plot and watch as the regression line and regression line equation are recalculated to best predict Y based on X. It doesn't explicitly show the math going on behind the scenes, but it is a nice compliment to your LSE lecture. https://www.mathsisfun.com/data/least-squares-calculator.html