Gelman-Rubin statistic

The Gelman-Rubin statistic allows a statement about the convergence of Monte Carlo simulations.

Definition
$$J$$ Monte Carlo simulations (chains) are started with different initial values. The samples from the respective burn-in phases are discarded. From the samples $$x_{1}^{(j)},\dots, x_{L}^{(j)}$$ (of the j-th simulation), the variance between the chains and the variance in the chains is estimated:
 * $$\overline{x}_j=\frac{1}{L}\sum_{i=1}^L x_i^{(j)}$$ Mean value of chain j
 * $$\overline{x}_*=\frac{1}{J}\sum_{j=1}^J \overline{x}_j$$ Mean of the means of all chains
 * $$B=\frac{L}{J-1}\sum_{j=1}^J (\overline{x}_j-\overline{x}_*)^2$$ Variance of the means of the chains
 * $$W=\frac{1}{J} \sum_{j=1}^J \left(\frac{1}{L-1} \sum_{i=1}^L (x^{(j)}_i-\overline{x}_j)^2\right)$$ Averaged variances of the individual chains across all chains

An estimate of the Gelman-Rubin statistic $$R$$ then results as
 * $$R=\frac{\frac{L-1}{L}W+\frac{1}{L}B}{W}$$.

When L tends to infinity and B tends to zero, R tends to 1.

Alternatives
The Geweke Diagnostic compares whether the mean of the first x percent of a chain and the mean of the last y percent of a chain match.