Multi-site comparison usually reduces to a table of per-site means. When run counts differ across sites, those means are not comparable: each carries a different standard error, and the ranking that results is partly a ranking of sample sizes.

The case is common in practice. An acquired plant, a newly commissioned line, or a supplier trial has two or three runs while established sites have thirty.

The estimator

Empirical-Bayes partial pooling replaces each site mean with a weighted combination of that mean and the fleet mean:

B_i      = tau^2 / (tau^2 + sigma_i^2)
pooled_i = B_i * mean_i + (1 - B_i) * fleet_mean

tau^2 is the between-site variance, estimated here by REML. sigma_i^2 is the squared standard error of site i's own mean, and falls as that site's run count rises.

B_i is the weight the estimate places on the site's own data. As sigma_i^2 approaches zero the coefficient approaches one and the site retains its own mean. As sigma_i^2 grows large relative to tau^2 the coefficient approaches zero and the estimate approaches the fleet mean. The transition is continuous; no threshold is applied and no site is excluded.

Worked example

Seven site samples drawn from a single normal distribution, mean 82 and standard deviation 4. Six samples of size thirty, one of size two. No site effect exists in the generating distribution.

site n raw mean pooled B_i 95% interval
A 30 82.39 82.17 0.484 81.1 – 83.2
B 30 80.87 81.43 0.484 80.4 – 82.5
C 30 81.89 81.93 0.484 80.9 – 83.0
D 30 83.38 82.65 0.484 81.6 – 83.7
E 30 82.37 82.16 0.484 81.1 – 83.2
F 30 82.24 82.10 0.484 81.0 – 83.2
Newco 2 70.97 81.32 0.059 79.8 – 82.8

Fleet mean 81.97; between-site variance 0.48.

The size-two sample returned a mean of 70.97, eleven points below the fleet, from a distribution identical to the other six. Its two observations were 71.3 and 70.6. The pooled estimate is 81.32 and the interval covers the fleet mean, which is the correct inference: at n = 2 the data do not distinguish a site effect from sampling variation.

B_i = 0.059 quantifies that directly — 5.9 percent of the pooled estimate derives from the site's own observations. The size-thirty samples sit at 0.484 and move by less than a point.

Prior specification

The prior is the observed distribution of site effects in the fleet. It is computed from the supplied data rather than assumed, and the estimator returns the prior mean, the between-site variance and the prior source alongside the site estimates.

A caller holding evidence that the fleet is not representative of a given site may supply prior_variance directly, in which case the returned prior source records that substitution.

Limitations

Exchangeability. The estimator treats sites as draws from a common distribution. Where sites differ in known, systematic ways — different product mix, different equipment generations, different specification limits — that assumption does not hold, and shrinkage toward a common mean is not appropriate without stratification first.

Shrinkage decreases with evidence. A site whose low mean persists as its run count rises will see B_i increase and the pooled estimate converge on the raw mean. Partial pooling defers a judgment while precision is low; it does not suppress one once precision is adequate.

Point estimates remain estimates. The intervals above are the operative output. A pooled mean reported without its interval discards the information the method exists to supply.

References

James, W. and Stein, C. (1961). Estimation with quadratic loss. Proceedings of the Fourth Berkeley Symposium 1, 361–379.

Efron, B. and Morris, C. (1975). Data analysis using Stein's estimator and its generalizations. Journal of the American Statistical Association 70(350), 311–319.

DerSimonian, R. and Laird, N. (1986). Meta-analysis in clinical trials. Controlled Clinical Trials 7(3), 177–188.

Gelman, A. et al. Bayesian Data Analysis, chapter 5.