Hacker News new | past | comments | ask | show | jobs | submit login
Statistical Rethinking (2024 Edition) (github.com/rmcelreath)
144 points by lnyan 16 hours ago | hide | past | favorite | 26 comments





It's a great book, but my personal opinion is that it would have benefited from an editor that recommended some small changes. The previous edition had a TOC which was barely usable because all funny jokes in chapter names like "8 Conditional Manatees". Besides, there were too many jokes embedded in some sections, which made them difficult to follow. I think some of these issues are getting addressed in the current edition.

Nonetheless, the book is very well written and all figures and examples show great attention to detail. I found Gelman et al Regression and Other Stories better for teaching newcomers, and surprisingly insightful. Statistical Rethinking is a good choice for a second course, but perhaps too informal at that stage.


Thank you for referencing the Gelman books. I keep struggling to understand Statistical Rethinking, which seems too advanced for me.

I second that. The TOC is unusable. However, it's probably aligned with the author's intention of it being a course and not a reference book.

The lectures are on YouTube and are really very good.

I second that. There is Julia material to follow along.

What are the prerequisites for the topics covered in this book? I feel like the lecture list is hard to understand, maybe sort of like the book’s TOC.

The original target audience was phd students in the sciences who want to do statistics to do science. So:

- the book tries to be practical and applicable for science

- the book assumes some amount of mathematical maturity and ability to fiddle with somewhat simple data

- the book is not about mathematical statistics – no proving things about maximum likelihood estimators

- the book doesn’t teach you about programming in R


Honestly, I think there are very little prerequisites. I'm an MD dabbling into stats and found the book very well made as well as understandable.

As an MD/PhD I wish all MD researchers read this book. Heck, I wish all neuro researchers read it. If you are already established in in stats and math and your interest is just another math book to casually read or reference, this is a bad choice

WHY do you think it’s bad for that background? Please!

What if you know math but not stats? How much stats do I need to know before you think this isn’t good to browse?

Wish I knew… I guess I’ll have to find out the hard way.


Statistical Rethinking is an immensely practical book, and probably the best book for anyone interested in the practice of statistics.

However, it is a bit too cautious about scaring readers away from the details of how things work. Honestly, I disagree with the parent that it's a bad book for the more mathematically inclined, since I can't think of any other book that gets you solving practical problems faster. But, if you have a strong math (or computational) background, you will be craving a deeper look under the hood.

ET Jaynes' Probability Theory: the Logic of Science is, imho, the best book for someone who wants to really understand the theory and reasoning behind statistics and is comfortable lots of mathematical thinking.

For a more practical (than Jaynes) but still more detailed book on statistics then I would recommend Bayesian Modeling and Computation in Python. Not quite as easy reading as Statistical Rethinking but there will be no mystery as to what's happening.


It's just very conversational. If you are comfortable with stats and just need a reference it can be obnoxious. I think I went through the first edition in my PhD and it was better than a stats course. But when I want a quick reference for something it is to much reading to get to the point. It might be more well organized now though.

I've taken the course and love the book. The key takeaways for me were to shun cleverness in favour of building demonstrably sensible models out of simple parts and clear causal assumptions. There's a lot of using models as random generators as a way to validate assumptions that demonstrates that your model makes sense before you start with inferencing which is a fantastic habit to stick with.

Related. Others?

Statistical Rethinking (2022 Edition) - https://news.ycombinator.com/item?id=29956390 - Jan 2022 (124 comments)

Statistical Rethinking [video] - https://news.ycombinator.com/item?id=29780550 - Jan 2022 (10 comments)

Statistical Rethinking: A Bayesian Course Using R and Stan - https://news.ycombinator.com/item?id=20102950 - June 2019 (14 comments)


I tried to follow along with the textbook before but really struggled with the practical side - R is just another world in terms of dependency management and organisation/documentation (compared to python at least). The book had me install some version of a library that was since unsupported. So I thought I would be a nerd and do everything in python instead, but there I had other problems installing pymc. After some hours of failing I just gave up. Can anyone speak to the state of the dependencies in this edition? Has everything been updated? Versions listed? Would love to give this another shot

I happened to install everything two days ago. R version 4.3.3 (I use RSwitch to switch between R versions on Mac). You should use REnv for dependency management. There were no problems installing the rethinking package, the Cmdrstan package just needed to be installed with devtools instead of install.packages.

I’m mostly a Python guy, and didn’t find it particularly hard to get this going. Although I’m always left scratching my head when using RStudio/Renv/R. It’s such a horrible environment (always hanging, crashing, slow, the tooling sucks ass). I refuse to believe that I’m the only person who has RStudio hang and require a restart or get stuck on some uninterruptible process and requires forcing killing it at least once a day.


> require a restart or get stuck on some uninterruptible process and requires forcing killing it at least once a day.

Yes, I think I've been trained by crashes to subconsciously limit interactions with the RStudio GUI while something is running, e.g resizing a window seems to be surefire way to cause a crash.


For those looking for pymc and the python implementation of this book, here are the jupyter notebooks for the 2022 edition https://github.com/pymc-devs/pymc-resources/tree/main/Rethin...

When I was working on the exercises, I found the Rocker project (https://rocker-project.org/) + DevContainers in VSCode to be a winning combination.

Combined with OrbStack (for Docker on MacOS) and Quarto (which is a nice Markdown-based alternative to Jupyter) I would go so far as to call the experience pleasant.

I don't remember running into version-related problems. Maybe I didn't make it as far in the book as you.


There is a version of everything in the book reimplemented in rStan, which is a fairly easy to install and well supported R package that wraps Stan. I don’t have the link but should be easy to google.

I think it’s a magnificent book - definitely repays the time to work though in detail.


There is a Julia version of the exact same material and is clean.

I'm excited to see the online lecture videos. I previously bought the book from a recommendation I saw online, and have been working through the chapters and doing the exercises in self-study. But I stalled a bit as some of the later chapters were harder to follow. I hope that the video lectures will help.

The videos are amazing. I watched the first season, and gave a glance at the second or third iteration, which somehow seem even better. He added one clutch visualization which really made a concept click for me.

I thought the book was only so-so, but required to support the nuances of what he discussed in class.


I really hope these techniques continue to percolate through scientific communities and bring forward a new era of statistical reasoning and epistemology

Other versions of the code

https://xcelab.net/rm/


While I do the exercises in Julia, I think R version can benefit from cleanup and refactor. People can fork it and cleanup.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: