J
Jonas Lindeløv
lindeloev.github.io · Personal blog · on HN since 2019
Jonas Lindeløv is a researcher who wrote a widely shared guide showing common statistical tests as special cases of linear models.
What HN saysHN commenters praise the linear-models view of tests, though some argue stats should be taught via probability and regression, or Bayesian methods, instead of recipes.
16HN people shared it
7linked it in comments
10stories submitted
366story points
1 year agolast shared
2019people per year2026
Most-shared posts
- 1Common statistical tests are linear models16 people · 366 points · first shared 2019 · 44 comments on HN
What HN people wrote when they linked it
simulo · 2024-02-18
I knew the linked-in-the-article https://lindeloev.github.io/tests-as-linear/ which is also great. A bit meta on the widespread use of linear models: "Transcending General Linear Reality" by Andrew Abbott, DOI:10.2307/202114
epgui · 2023-10-12
As much as I appreciate and love all pedagogical endeavours in the field, especially in the form of open texts, I really, really, really dislike this overall approach to teaching introductory statistics.
I'm hoping to see, over time, a shift away from ad-hoc null hypothesis testing in favour of linear models (yes, in introductory courses, from the start-- see link below) and Bayesian-by-default approaches.
https://lindeloev.github.io/tests-as-linear/#:~:text=Most%20of%20the%2…
ImaCake · 2023-10-12
I think those short courses would be more effective if they didn't bother with ANOVA and instead taught intro probability and distributions and then jumped straight to regression. ANOVA is just a really specific way of doing a regression.
In R, and python::statsmodels you get the answer to (essentially) an ANOVA any time you run an LM or GLM; its the Z-statistic for your whole model.
I know there is more nuance to this, but teaching students that they can use regression for most of the problems they would have used seemingly arcane tests for is going to be much more useful for the students.
Here is a lovely page demonstrating how to do this in R: https://lindeloev.github.io/tests-as-linear/
maltelau · 2023-12-25
Maybe you would find it useful to read a textbook on bayesian stats for inspiration. I can recommend Richard McElreath's "Statistical Rethinking" which makes it very clear how inflexible it is to just know recipes like t-tests or anovas.
The canonical approach is to build a generative model with a parameter (or multiple for ~anova) that codes for the difference between groups and do inference on that parameter of interest. Most of the recipes taught in statistics classes can be modelled as a regression of some kind (this counts for frequentist stats too, see https://lindeloev.github.io/tests-as-linear/ ). Some advocate to do that inference with bayes factors. Others, like discussed elsewhere in this thread, advocate combining the resulting posterior with a cost/value function, but either way the lesson is that there is less focus on "t-test-vs-anova" because they're the same thing anyways.
gpderetta · 2025-03-14
Also: "Common statistical tests are linear models (or: how to teach stats)"[1]. Also also, bootstrapping is a superpower.
[1] https://lindeloev.github.io/tests-as-linear/
aquafox · 2024-07-30
Most people don't appreciate linear regression. 1) All common statistical tests are linear models: https://lindeloev.github.io/tests-as-linear/ 2) Linear models are linear in the parameters, not the response! E.g. y = a*sin(x)+bx^2 is a linear model. 3) By choosing an appropriate spline basis, many non-linear relationships between the predictors and the response can be modelled by linear models. 4) And if that flexibility isn't enough, by virtue of the Taylor Theorem, linear relations are often a good approximation of non-linear ones.
treszkai · 2023-10-13
I understand where you're coming from, and I like the idea for a certain kind of people: those who are very good at handling abstractions. Software engineers do have this skill, but the majority of statistics users do not. Trying to explain the similarities between these linear methods and how all is one [1] to a social scientist who doesn't like numbers nor formulas to begin with would only lead to more confusion.
But if you ever do a randomized test with a suitable linear model to estimate the efficacy of these two methods, do let us know, that would be 10/10 :)
[1]: https://lindeloev.github.io/tests-as-linear/#41_one_sample_t-test_and_…