- Statistical Rethinking 1st ed. by Richard McElreath
Warning to frequentists, this is a “Bayesian” book. I’m reading it because I’ve been watching Bayes swallow hectares of what has traditionally been “frequentist” turf, and I’d like to get to know the antithesis, so I can decide if there is a place for synthesis.
So, anyway, I am s-l-o-w-l-y working my way through the book, working every R example by hand (i.e., typing all the code), and for the first time, as I’ve relaxed and enjoyed the examples, I’ve begun to absorb how Bayes models work … intuitively.
This is enabled by chapter 2 “Small Worlds and Large Worlds” where McElreath’s experience teaching non-mathematics-major-scientists is on display. The cornerstone Bayes concept for non-math-majors is … counting. Yes, you read that correctly, counting replaces the standard Bayes’ theorem formula.
“Our goal in this section will be to build Bayesian inference up from humble beginnings, so there is no superstition about it. Bayesian inference is really just counting and comparing of possibilities.”McElreath, Richard. Statistical Rethinking: A Bayesian Course with Examples in R and Stan (Chapman & Hall/CRC Texts in Statistical Science) (Page 20). CRC Press. Kindle Edition.
Chapter 2 illustrates Bayes’ theorem not with math, but with decision trees. And when McElreath gets to the Bayes standard problem of computing an actual probability of having a condition, given a positive test for that condition (p. 50):
- In a population of 100,000 people, 100 of them have condition X.
- Of the 100 who have X, 95 of them will test positive for X.
- Of the 99,900 who don’t have X, 999 will test positive for X.
What is the chance that a person who tested positive for X, has X?
Solution = 95/(999+95) = 95/1094 ≈ .087
Common sense and division provide the answer! No formulas or priors, to pain my posterior! This is genius!
But, it gets better! Sprinkled liberally throughout the text are many gems of modeling tacit knowledge. Stuff that is almost *never* in texts. One of my favorites (so far) is in yellow on p. 76 (highlighting colors mine):
As you can see from the above, there are sections carved out for “Overthinking.” Wait, I thought I was the only overthinker!?!
In addition to “Overthinking” are sections that go into (allegedly) less detail called “Rethinking.” Below is a Rethinking example from p. 58, again, watch the yellow highlighting for tacit knowledge deliciousness!
So far I’ve made it about ¼ of the way through the book. When I reached p. 105 R code 4.55 the code stopped working. Thinking I am somehow not doing this correctly because I’m on a Mac, I went to RStudio Cloud and replicated the problem. Replicated exactly.
Next step is to study McElreath’s github issues page for the book and see if there is a fix.
Nonetheless, I’m thoroughly enjoying having my brain absorb Bayesian analysis without constantly hearing my editor say “You are too stupid to get Bayes!” And I’m energized to overcome R code 4.55’s issues and keep moving forward!