Grid Monte Carlo approximation
Definition taught in Hierarchical Bayes, part of Bayesian statistics
Grid Monte Carlo approximation

| Type | Definition |
| Taught in | Hierarchical Bayes |
| Part | Bayesian statistics |
Let w_{ab} be the unnormalised hyperposterior value at grid cell (a,b), including the Jacobian \alpha\beta. The discrete approximation is
\widehat p_{ab}=\frac{w_{ab}}{\sum_{r,s}w_{rs}}.
Sampling from the approximate full posterior proceeds as follows.
Flatten the grid weights into a one-dimensional list, form cumulative probabilities, draw U\sim\operatorname{Uniform}(0,1), and select the first cell whose cumulative probability exceeds U. Equivalently, draw a grid cell (Z_1,Z_2) with probabilities \widehat p_{ab}. Optionally add independent uniform jitter within the selected cell.
Transform (Z_1,Z_2) to (\alpha,\beta) using Equation (10) in Hierarchical Bayes.
For each study, draw independently
\theta_j\sim\operatorname{Beta}(y_j+\alpha,n_j-y_j+\beta)
using Equation (7) in Hierarchical Bayes.
- Repeat to obtain (\alpha^{(l)},\beta^{(l)},{\boldsymbol{\theta}}^{(l)}), l=1,\ldots,L.
These grid-cell draws are independent; this is Monte Carlo from a piecewise-constant approximation, not Markov-chain Monte Carlo. A 100\times100 grid has 10^4 cells and remains practical because only two hyperparameters are integrated numerically. A comparable grid over all J+2 unknowns would be impossible.
Used in
- Taught in Hierarchical Bayes, where the derivation and examples are.
- All 9 questions on Hierarchical Bayes
See also
Hyperparameter · Hierarchical Bayesian model · Normal hierarchical shrinkage · Exchangeability · Empirical Bayes · Study-rate full conditional · Marginal hyperposterior · Uniformity depends on a domain