Partial pooling and the shrinkage it buys
Today let's understand partial pooling: a way to estimate several related groups from one shared dataset, so that every group borrows a little strength from all the others.
A retail chain piloted a new onboarding course for its newly hired sales associates in 8 of its branches. In each branch, it tracked how much an associate's monthly sales rose after taking the course, in dollars. The branches range from 3 associates in the smallest to 70 in the largest, 181 associates in total, and the raw average lift per branch ranges from \$13.3 to \$47.3.
Here is every branch's raw average lift plotted against how many associates it has.
Notice the branches with the fewest associates sit furthest from the pack, one of them the highest point on the whole chart, another near the lowest. The branches with the most associates sit much closer together. That pattern, small branches swinging wide and large branches settling down, is exactly what this lesson explains, and what to do about it.
Two easy answers and what each one costs you
Before getting to partial pooling, it helps to see the two simpler answers that sit on either side of it, and what each one costs you.
The first is called no pooling. It trusts each branch's own average completely, no matter how few associates it rests on. The branch with only 3 associates reported an average lift of \$47.3, and no pooling takes that \$47.3 as the branch's true effect, exactly as reported.
The second is called complete pooling. It throws away the branch labels altogether and pools every one of the 181 associates into one number: a single headcount-weighted average lift, applied to every branch alike. That discards any real difference between branches, treating the smallest branch and the largest branch as if they were identical.
Compute both.
#> 1 2 3 4 5 6 7 8
#> 47.3 18.9 13.3 24.6 21.1 20.8 32.4 17.2
#> [1] 22.32
tapply() splits branches$lift by branch and applies mean() inside each group, so means holds each branch's own raw average. weighted.mean() then folds all 8 branch means back into one number, weighted by each branch's headcount n_i, the same number you would get by averaging all 181 associates directly: \$22.32.
So there are the two easy answers, side by side. No pooling says branch 1's true effect is \$47.3. Complete pooling says every branch's true effect, including branch 1's, is \$22.32.
Branch 1 only has 3 associates behind its number, so which of those two answers would you actually bet on? Neither one, fully, and closing that gap is exactly what partial pooling is for.