Stein's Paradox and What Partial Pooling Can Do for You (2019)

leonry1 pts0 comments

Stein's Paradox and What Partial Pooling Can Do For You | A. Solomon Kurz

[edited on January 18, 2021]

tl;dr

Sometimes a mathematical result is strikingly contrary to generally held belief even though an obviously valid proof is given.<br>Charles Stein of Stanford University discovered such a paradox in statistics in 1955. His result undermined a century and a half of work on estimation theory. (<br>Efron & Morris, 1977, p. 119)<br>The James-Stein estimator leads to better predictions than simple means. Though I don’t recommend you actually use the James-Stein estimator in applied research, understanding why it works might help clarify why it’s time social scientists consider<br>defaulting to multilevel models for their work-a-day projects.

The James-Stein can help us understand multilevel models.

I recently noticed someone—I wish I could recall who—tweet about Efron and Morris’s classic paper,<br>Stein’s paradox in statistics. At the time, I was vaguely aware of the paper but hadn’t taken the chance to read it. The tweet’s author mentioned how good a read it was. Now I’ve finally given it a look, I concur. I’m not a sports fan, but I really appreciated their primary example using batting averages from baseball players in 1970. It clarified why partial pooling leads to better estimates than taking simple averages.

In this post, I’ll walk out Efron and Morris’s baseball example and then link it to contemporary Bayesian multilevel models.

I assume things.

For this project, I’m presuming you are familiar with logistic regression, vaguely familiar with the basic differences between frequentist and Bayesian approaches to fitting regression models, and have heard of multilevel models. All code in is<br>R (<br>R Core Team, 2022), with a heavy use of the<br>tidyverse (<br>Wickham et al., 2019;<br>Wickham, 2022), and the<br>brms package for Bayesian regression (<br>Bürkner, 2017,<br>2018,<br>2022).

Behold the baseball data.

Stein’s paradox concerns the use of observed averages to estimate unobservable quantities. Averaging is the second most basic process in statistics, the first being the simple act of counting. A baseball player who gets seven hits in 20 official times at bat is said to have a batting average of .350. In computing this statistic we are forming an estimate of the payer’s true batting ability in terms of his observed average rate of success. Asked how well the player will do in his next 100 times at bat, we would probably predict 35 more hits. In traditional statistical theory it can be proved that no other estimation rule is uniformly better than the observed average.

The paradoxical element in Stein’s result is that it sometimes contradicts this elementary law of statistical theory. If we have three or more baseball players, and if we are interested in predicting future batting averages for each of them, then there is a procedure that is better than simply extrapolating from the three separate averages…

As our primary data we shall consider the batting averages of 18 major-league players as they were recorded after their first 45 times at bat in the 1970 season. (<br>Efron & Morris, 1977, p. 119)<br>Let’s enter the baseball data.

library(tidyverse)<br>baseball<br>tibble(player = c("Clemente", "F Robinson", "F Howard", "Johnstone", "Berry", "Spencer", "Kessinger", "L Alvarado", "Santo", "Swoboda", "Unser", "Williams", "Scott", "Petrocelli", "E Rodriguez", "Campaneris", "Munson", "Alvis"),<br>hits = c(18:15, 14, 14:12, 11, 11, rep(10, times = 5), 9:7),<br>times_at_bat = 45,<br>true_ba = c(.346, .298, .276, .222, .273, .27, .263, .21, .269, .23, .264, .256, .303, .264, .226, .286, .316, .2))

Here’s what those data look like.

glimpse(baseball)

## Rows: 18<br>## Columns: 4<br>## $ player "Clemente", "F Robinson", "F Howard", "Johnstone", "Berry", "Spencer", "Kessi…<br>## $ hits 18, 17, 16, 15, 14, 14, 13, 12, 11, 11, 10, 10, 10, 10, 10, 9, 8, 7<br>## $ times_at_bat 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45, 45<br>## $ true_ba 0.346, 0.298, 0.276, 0.222, 0.273, 0.270, 0.263, 0.210, 0.269, 0.230, 0.264, …

We have data from 18 players. The main columns are of the number of hits for their first 45 times_at_bat. I got the player, hits, and times_at_bat values directly from the paper. However, Efron and Morris didn’t include the batting averages for the end of the season in the paper. Happily, I was able to find those values in the<br>online posting of the first chapter of one of Effron’s books (<br>2010) . They’re included in the true_ba column.

These were all the players who happened to have batted exactly 45 times the day the data were tabulated. A batting average is defined, of course, simply as the number of hits divided by the number of times at bat; it is always a number between 0 and 1. (<br>Efron & Morris, 1977, p. 119)<br>I like use a lot of plots to better understand what I’m doing. Before we start plotting, I should point out the color theme in this project comes from<br>here. [Haters gonna hate.]

navy_blue "#0C2C56"<br>nw_green "#005C5C"<br>silver...

stein baseball batting averages hits efron

Related Articles