Calculator Input
Enter one row per group using this pattern: Group, Mean, SD, N. The page keeps a single-column flow, while input controls use a responsive three, two, or one column grid.
Example Data Table
This sample shows the summary data format accepted by the calculator.
| Group | Mean | SD | N | Sampling Variance = SD² / N |
|---|---|---|---|---|
| Group A | 12.4 | 2.2 | 18 | 0.2689 |
| Group B | 10.8 | 1.9 | 22 | 0.1641 |
| Group C | 13.1 | 2.6 | 16 | 0.4225 |
| Group D | 11.5 | 2.1 | 20 | 0.2205 |
| Group E | 12.9 | 2.4 | 14 | 0.4114 |
Formula Used
The calculator uses a normal-normal hierarchical model with a pooled mean prior and random group effects.
yᵢ | θᵢ ~ Normal(θᵢ, vᵢ), where vᵢ = SDᵢ² / nᵢ.
θᵢ | μ, τ² ~ Normal(μ, τ²) and μ ~ Normal(μ₀, V₀).
Vμ = 1 / (1 / V₀ + Σ 1 / (vᵢ + τ²))mμ = Vμ × (μ₀ / V₀ + Σ yᵢ / (vᵢ + τ²))
λᵢ = τ² / (τ² + vᵢ)E[θᵢ | y] = λᵢ yᵢ + (1 − λᵢ) mμVar(θᵢ | y) = τ²vᵢ / (τ² + vᵢ) + (1 − λᵢ)² Vμ
τ² = max(0, (Q − (k − 1)) / C), where Q = Σ wᵢ(yᵢ − ȳ)², wᵢ = 1 / vᵢ, and C = Σwᵢ − Σwᵢ² / Σwᵢ.
When you choose manual τ², the page uses your supplied between-group variance directly. Automatic mode estimates τ² first, then performs Bayesian updating with that plug-in value.
How to Use This Calculator
- Enter each group on a new line as
Group, Mean, SD, N. - Set a prior grand mean and prior variance for the overall pooled effect.
- Choose automatic or manual heterogeneity mode for τ².
- Select a credible level such as 90%, 95%, or 99%.
- Submit the form to view posterior summaries above the input area.
- Review shrinkage, credible intervals, heterogeneity, and the predictive interval for a new group.
- Download the summary table as CSV or PDF for reports or class notes.
FAQs
1) What does this calculator estimate?
It estimates posterior group means, a pooled grand mean, credible intervals, heterogeneity, and shrinkage under a hierarchical random-effects model using grouped summary statistics.
2) Why do group estimates shrink toward the grand mean?
Bayesian partial pooling balances each observed group mean against the pooled mean. Noisy groups receive stronger shrinkage, while precise groups keep more of their own observed information.
3) What is the role of τ²?
τ² measures between-group heterogeneity. Larger values allow groups to differ more. Smaller values pull groups closer together and increase pooling.
4) What happens in automatic heterogeneity mode?
The page first estimates τ² from the entered summary data using a method-of-moments style random-effects formula, then applies Bayesian updating with that heterogeneity value.
5) Can I use raw observations instead of summary rows?
This version expects one mean, one standard deviation, and one sample size for each group. Convert raw data into summary rows before using the calculator.
6) How should I choose the prior variance V₀?
Use a large value for a weak prior and a smaller value when you have strong knowledge about the grand mean. Keep units consistent with the group means.
7) What does the predictive interval mean?
It gives a plausible range for a new group effect after combining the estimated grand mean uncertainty with between-group heterogeneity.
8) Is this a full MCMC implementation?
No. It uses closed-form conjugate updating with either a user-supplied or automatically estimated heterogeneity term, which makes it fast and transparent for teaching and applied work.