Live data from Hacker News

Abusing linear regression to make a point

goodmath.org

31–40 of 50 posts

Re: Abusing linear regression to make a point

#32
post #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…

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

Didn't realize. This guy is an embarrassment.

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

:)) the tale of the quantum dependent variable.

Re: Abusing linear regression to make a point

#33
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?

Yes. Check the example section of:

http://www.math.nagoya-u.ac.jp/~richard/teaching/s2019/Cauch...

Re: Abusing linear regression to make a point

#34
Yes, this article should parade the p-value to make its point and for some reason it doesn't.

On p-values and linear regression in general, though: when you're new to inferential statistics applied to really complex data, such as anything that relates to human behavior, you go through this "clearly that's not a linear relationship" phase. But that's not really the point. You can choose any sort of function you want to maximize r, the options are endless [0]. But linear regression has a distinct advantage in that you can interpret the model coefficients as meaningful numbers. You can say things like "for every 5% increase in the proportion of binge drinkers in your state you can expect an X% increase in the proportion of the population that will get Covid" ...if the model satisfies some significance parameter threshold, like pAbout significance thresholds. Yes, they are totally arbitrary, another realization in one's journey with frequentist statistics that is quite deflating. Still, we need a rule of thumb so we use things like pThis stuff is all super-useful when used appropriately. That's why, when you need to create a model (outside the Bayesian/ML anything goes world) and you need to get it right, the first thing you do is reach out to your trusty PhD statistician friend. At least, that's what I do. They spend countless hours to get to a place where they can say "in this situation, I would suggest..." I'm glad some people are into it that much.

[0] https://lmfit.github.io/lmfit-py/builtin_models.html

Re: Abusing linear regression to make a point

#35
post #14

Earlier quoted context omitted.

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.

I'm not sure I understand your point. Did you actually look at the regression line through the data? It looks crazy off. I'm not a statistician but that line looks like it doesn't represent that data very well at all. People area also saying nuanced comments above but the underlying fact seems to be that this is not a good use of linear regression, and there is no strong correlation between the two axes.

Re: Abusing linear regression to make a point

#36

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…

Furthermore, even if the fit is statistically significant, that doesn't mean is it causal.

Re: Abusing linear regression to make a point

#37
post #35

Earlier quoted context omitted.

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.

I'm not sure I understand your point. Did you actually look at the regression line through the data? It looks crazy off. I'm not a statistician but that line looks like it doesn't represent that data very well at all. People area also saying nuanced comments above but the underlying fact seems to be that this is not a good use of linear regression, and there is no strong correlation between the two axes.

Without access to the residuals, I'd still venture to guess that the assumptions of the regression are not severely violated in this data set.

When this regression is conducted, the null hypothesis is not rejected (regression slope not significantly different than zero). If someone is somehow arguing this regression rejects the null hypothesis, then they would be incorrect. But there is nothing wrong with using regression here. Its kind of the whole point. This is basic regression statistics 101.

Error bands on the regression slope would help people understand the uncertainty of the apparent slope.

Re: Abusing linear regression to make a point

#38
post #35

Earlier quoted context omitted.

I'm not sure I understand your point. Did you actually look at the regression line through the data? It looks crazy off. I'm not a statistician but that line looks like it doesn't represent that data very well at all. People area also saying nuanced comments above but the underlying fact seems to be that this is not a good use of linear regression, and there is no strong correlation between the two axes.

Without access to the residuals, I'd still venture to guess that the assumptions of the regression are not severely violated in this data set. When this regression is conducted, the null hypothesis is not rejected (regression slope not significantly different than zero). If someone is somehow arguing this regression rejects the null hypothesis, then they would be incorrect. But there is nothing wrong with using regre…

[deleted]

Re: Abusing linear regression to make a point

#39
post #28

The article has: > For trace failure, the probability of failure is linear in the size of the radiation dose that the chip is exposed to. No it's not. Impossible. Wrong. Does anyone not see why it's wrong?

Yes. If you have enough radiation dose you'd need more than 100% chance of failure.

A much better model is that the number of spots where the chip was destroyed by radiation is a Poisson distribution with lambda linear in the size of the radiation dose. For low probabilities of failure, the probability of failure is approximately lambda, which is linear. For large lambda, the probability of at least one failure approaches one.

However this more accurate model, in the case of interest (low probability of failure), linear is the appropriate approximation. And a small child should get the simpler version and not the complexities of Poisson.

Re: Abusing linear regression to make a point

#40
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?

If X, Y ~ N(0,1), then X/Y ~ Cauchy(0,1)

(Read: If X and Y are normally distributed random variables with mean 0 and standard deviation 1, then X/Y is equivalent to a Cauchy(0,1) distributed RV. This is a useful equivalence to know if working with standard normal RVs, which is often. E[X/Y] does not exist!)

If X ~ Cauchy(0,1), then X ~ normalized student-t distribution.

(student-t puts the “t” in t-SNE, where it acts as a weighting function on the Euclidean distance between points. UMAP uses a parameterized version of this weight function that is essentially a generalization of the Cauchy distribution: https://jlmelville.github.io/smallvis/umap.html)

Post reply on HN