Live data from Hacker News

Abusing linear regression to make a point

goodmath.org

21–30 of 50 posts

Re: Abusing linear regression to make a point

#21
post #14

This article does not capture what is actually wrong with the regression. First, it's not necessarily wrong to fit a linear regression to data that might not be from a linear model, or that you know to be nonlinear. The data could be linear enough in the region of interest for the line to nonetheless be useful, for example. Sure, you need an underlying linear process if you want certain theorems and guarantees to app…

Agreed. I was curious enough to run the model myself so I used a tool to extract the data. The slope estimate (b=17.24) is not significantly different from zero, p=.437. The data are here: https://pastebin.com/HhWTKZRb

The problem is that the author is essentially claiming that running the regression for data not passing his eyeball test is, in itself, a misuse of regression...which is nonsense.

Re: Abusing linear regression to make a point

#22

This article does not capture what is actually wrong with the regression. First, it's not necessarily wrong to fit a linear regression to data that might not be from a linear model, or that you know to be nonlinear. The data could be linear enough in the region of interest for the line to nonetheless be useful, for example. Sure, you need an underlying linear process if you want certain theorems and guarantees to app…

The way I'd say it is that the uncertainty of the value is large compared to the value itself. Just thinking about the causal mechanisms, drinking (binge or not) with other people could put you at risk if any of the other drunks are infected. But drinking alone might help protect you from covid, since it is a way to avoid other people.

Re: Abusing linear regression to make a point

#23
post #3

Taleb was recently steaming on Twitter about a similar thing done to supposedly show a correlation between physician salary and covid mortality: https://twitter.com/nntaleb/status/1279954325087891464 He follows it with a few examples of spurious regressions from random data: https://twitter.com/nntaleb/status/1280090844113100801

The chart referenced in this article was by the same author.

https://twitter.com/AmihaiGlazer/status/1277769775855235072/...

https://twitter.com/AmihaiGlazer/status/1279210404602712064/...

My favourite part is the discussion about what a vertical line of regression means.

https://twitter.com/AmihaiGlazer/status/1279905458812149760

Discovering a vertical regression line sounds like a beautiful prompt for a hard sci-fi short story.

Re: Abusing linear regression to make a point

#24
post #6

> I said that if you had reason to believe in a linear relationship, then you could try to find it. That’s the huge catch to linear regression: no matter what data you put in, you’ll always get a “best match” line out. This challenge generalizes to all model fitting. Incorrectly assuming a distribution is Gaussian is a big one.

Another one is handwaving that a distribution is normal when n > 30 because "central limit theorem!" Amateur statistics is full of magical numbers and thresholds where everything "just works" :)

When I applied to my MSDA program, I had to interview with the lady who would become my first year mentor. "Now, do it over again... on paper." That's what she'd say to anyone too confident in their outputs. She has a reputation for weeding out people who can pass the entrance testing and qualifications, but can't adapt. And what we do requires thick skin. You're wrong until you just happen to be right.

Re: Abusing linear regression to make a point

#25
post #19
post #10

Earlier quoted context omitted.

The variable of interest may not have a Gaussian distribution, but its expected value and variance generally are. Sure, there's some pathological cases, but the Cauchy distribution doesn't show up that often.

Does the Cauchy distribution ever actually show up?

Less often than meetings start and end on time.

Re: Abusing linear regression to make a point

#29
post #14

This article does not capture what is actually wrong with the regression. First, it's not necessarily wrong to fit a linear regression to data that might not be from a linear model, or that you know to be nonlinear. The data could be linear enough in the region of interest for the line to nonetheless be useful, for example. Sure, you need an underlying linear process if you want certain theorems and guarantees to app…

Agreed. I was curious enough to run the model myself so I used a tool to extract the data. The slope estimate (b=17.24) is not significantly different from zero, p=.437. The data are here: https://pastebin.com/HhWTKZRb

In case anyone is interested, below is R code to read these data and compute the regression. The summary() reveals the p value for the slope to be 0.437, and that for the intercept to be 0.32.

    d 

Re: Abusing linear regression to make a point

#30
post #5

Telling every time someone posts a bad regression they never post the R^2.

If only. Sometimes they smooth or bin the data points and then post r2!

Reminds me about the classic regression excel joke saying that to get a better regression, one should sort the points to be in order first.
Post reply on HN