Richard McElreath 🦔 Profile picture
Sep 11, 2023 9 tweets 3 min read Read on X
Forgive me, for I am about to Bayes. Lesson: Don't trust intuition, for even simple prior+likelihood scenarios defy it. Four examples below, each producing radically different posteriors. Can you guess what each does? Revealed in next tweet >> Image
Huzzah! Posterior distributions in red. The shape of the tails, which isn't so obvious to the eye, can do weird but logical things. Image
Gotta go to a meeting, but I will return to explain each of the four above later!
These are combinations of normal (Gaussian) & student-t (df=2) distributions. Gaussian has a very thin tails. Student-t has thicker tails.
Top-left: normal prior, normal likelihood
Top-right: student, student
Bottom-left: student, normal
Bottom-right: normal, student
>>
Normal prior, normal likelihood
y ~ Normal(mu,1)
mu ~ Normal(10,1)
The classic flavor of Bayesian updating - the posterior is a compromise between the prior and likelihood Image
Student prior, student likelihood (df=2)
y ~ Student(2,mu,1)
mu ~ Student(2,10,1)
The two modes persist - the extra mass in the tails means each distribution finds the other's mode more plausible and so the average isn't the best "compromise" Image
Student prior, normal likelihood
y ~ Normal(mu,1)
mu ~ Student(2,10,1)
Now the likelihood dominates - it's thin tails are very skeptical of the prior, but the prior's thick tails not so surprised by the likelihood Image
Normal prior, student likelihood
y ~ Student(2,mu,1)
mu ~ Normal(10,1)
Now the prior dominates, so reason as previous example but in reverse Image
Here's the code to reproduce:

The tail differences are easier to see on log scale. If I get some time later today, will make a version showing that.gist.github.com/rmcelreath/39d…

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Richard McElreath 🦔

Richard McElreath 🦔 Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @rlmcelreath

May 29, 2024
Selection makes false findings from sampling & data processing. e.g. Let happiness be constant from birth, increases prob of marriage. As ppl age, more are married. Conditional on marriage, neg corr btw age & happiness. Below: each point a person aging, red = married
Of course happiness is not constant from birth, but the example shows that stratifying by a seemingless innoccent variable like marriage status can create phantom associations of large size, should not be interpreted as causal. This example from Chapter 6 of my book
This post brought to you by endless threads on health findings that are probably mostly or entirely due to selection effects
Read 4 tweets
Oct 29, 2023
On another site, someone asked me how I feel about "standardized effect sizes". Like many statisticians, I don't much like them, when used to compare "effect sizes". Some sources in next tweets. Image
First, this article from Sander Greenland and colleagues. (Why is it that whatever the applied stats topic, there is always a useful Greenland article?) doi.org/10.1093/oxford…
And here is a 2nd article from Greenland et al that replies to some poor defenses of the practice: journals.lww.com/epidem/citatio…
Read 4 tweets
Jan 6, 2023
Week 1 of Statistical Rethinking 2023 is done. Here are the memes from this week's lectures
The Spidermen: Causal inference, descriptive studies, and research design are alike in that they all depend upon some generative/scientific model of how the sample was produced
Correlation implies causation is obviously (?) wrong. Correlation does not imply causation is true, but not helpful. Causation does not imply correlation either. *sad trombone* Reality is a simulation — a joke BUT when we simulate causation, what are we simulating?
Read 5 tweets
May 9, 2021
Okay so I made a transparent gif of Brandenburger Hasselhoff, in case anyone wants to add him to other historical events. Here he is e.g. at Zeppelinfeld in 1945
Hasselhoff alone for your creative pleasure
This version maybe easier to work with
Read 4 tweets
Apr 22, 2021
Working with a colleague on some household income data, where work is irregular. As usual, I start by writing a synthetic data simulation to talk through with colleague. Helps to ensure I understand the problem right. Also brings up fun (for me) like sources of measure error. Image
In this case, income data are reports and almost certainly suffer rounding and heaping. It's the little things like this that make even simple exercises not so simple.
Also beginning to worry I am a weird sort of economist now, since half of my recent projects are household income data and I've started using the word "elasticity" in casual conversation.

At least I don't use Stata.
Read 11 tweets
Jul 18, 2020
Many performers of music cannot read it. Okay. There are other, often more intuitive, ways to learn music.

Scientists perform stat models. Most scientists cannot read them. This is less OK, but there are other ways to learn models.

Short thread in which I strain this comparison
If you don't read music, the Rzewski excerpt above (left) is meaningless. If you do, it is perfectly clear. You'd read it not by each individual note, but through higher structure like chords & arpeggio patterns & progression.

It's not the notes so much as their relationships.
If you don't read math stats, the social network model above (right) is most meaningless. But again, when you do read these models, you read the model in chunks, through its grammar and phrasing.

It's not the variables so much as their relationships.
Read 7 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us!

:(