A. A. Barker 2026-10-24
Author credited under these initials on the 1965 Monte Carlo method plasma paper Monte Carlo Calculations of the Radial Distribution Functions for a Proton-Electron Plasma by A. A. Barker. The initials are not expanded because an exact identity beyond the publication credit has not been established here. University of Adelaide thesis addendum identifying the 1965 publication.
The Barker acceptance probability accepts a proposal using the displayed ratio. If and , the accepted flux is , symmetric in the two states. This proves detailed balance; define acceptance as zero when . Rejected proposals contribute to the diagonal transition probability. Replacing by an unnormalized target leaves the ratio unchanged. For a common proposal, shows that its acceptance probability never exceeds the Metropolis–Hastings acceptance probability. The name refers to A. A. Barker's work on Monte Carlo methods for a plasma; the initials are retained without an unverified expansion.[ref]
Central limit theorem Created 2026-09-24 Updated 2026-10-14
Let be real independent and identically distributed random variables with expected value and finite, strictly positive variance . Write and for their sum and sample mean. The central limit theorem states
Precisely, for every real ,
where is the standard normal distribution function. The conclusion is convergence in distribution to the standard normal distribution. If the variance is zero, every observation equals almost surely; the displayed normalization is then undefined and there is no fluctuating error to describe.
The striking feature is that the observations need not have a normal distribution. They may be binary, bounded, or strongly skewed. Their detailed probability distribution disappears from this limit except through the expected value and variance. The subtraction removes predictable growth: . The division implements variance normalization: variance additivity for independent random variables gives , so every has expected value zero and variance one. For nonzero , an uncentered sum drifts; without rescaling its spread grows.
For a concrete example, let each have a Bernoulli distribution with success probability . Then has a binomial distribution, with expected value and variance . Its exact probability mass function and its normalized count are
Here is a binomial coefficient. Individual trials are conspicuously skewed, yet their centered, rescaled counts approach the same standard normal distribution as sums of fair trials.
Figure 1.
Exact standardized binomial distributions approach the standard normal curve
. For independent Bernoulli trials with , each blue bar has width equal to the normalized lattice spacing and area equal to the exact binomial distribution mass at its center. Heights are mass divided by spacing, so they can be compared with the orange probability density function of the standard normal distribution. All four normalized counts have expected value zero and variance one. The rectangles visualize discrete masses; they do not make the discrete probability distributions continuous. Details.
At , has expected value and standard deviation . The exact binomial distribution gives . A normal approximation with the continuity correction uses the interval to :
The small discrepancy is an approximation error, not an equality supplied by the central limit theorem.
The strong law of large numbers and weak law of large numbers locate the average: , respectively by almost sure convergence and convergence in probability. The central limit theorem magnifies that shrinking error and describes its shape. In terms of the sample mean, the resulting normal approximation is , with standard error . This explains why four times as many independent observations halve the standard error. When is known, has approximately coverage for at large , giving a confidence interval. This coverage refers to repeated samples, not a guarantee for an individual interval.
A useful application is the Monte Carlo method: estimate a success probability by the proportion of successful simulated trials. Nicholas Metropolis and S. Ulam's original paper, "The Monte Carlo Method" (1949), illustrates this with games of solitaire and estimation of a region's volume by randomly selected points, and discusses why estimates require probabilistic error control. The strong law of large numbers justifies convergence of such proportions for independent repetitions; the central limit theorem supplies their large-sample error scale when .[ref]
There are three useful limits to this picture:
A historical original-paper reference is J. W. Lindeberg's "Eine neue Herleitung des Exponentialgesetzes in der Wahrscheinlichkeitsrechnung" (1922), published in Mathematische Zeitschrift 15, pp. 211–225. The Lindeberg condition and Lindeberg-Feller central limit theorem below describe a version for sums whose summands need not share a probability distribution.[ref]
A brief proof outline uses the characteristic function of . Its expected value is zero and its variance is one, so the finite second moment gives
The Taylor expansion of the complex exponential, with its remainder controlled by , and the dominated convergence theorem justify this step without a third-moment assumption. Independence then gives the characteristic function of :
The limit is the characteristic function of the standard normal distribution; the Lévy continuity theorem turns this into convergence in distribution.
Path tracing estimates the rendering equation by a Monte Carlo method. Launch camera rays; at each surface hit sample an outgoing continuation direction according to a chosen probability density function, trace to the next hit, and continue through successive reflections. Accumulate emitted light or environment light with the product of scattering, cosine and inverse-density factors along the path. A bounce sampled with density updates the path weight by
Average many independently sampled paths per pixel. Multiple bounces account for indirect illumination, including colour bleeding between surfaces, instead of approximating all of it by one ambient constant. Termination can use Russian roulette: continue with probability and divide surviving weights by , preserving the expected contribution. A fixed bounce cutoff is simpler but truncates transport.
The elementary strategy that obtains illumination only when a randomly continued path hits an emitter fails for ideal point lights. From a surface point, an ideal point source occupies zero solid angle; sampling a direction from an ordinary continuous probability density function hits that one direction with probability zero. Thus this strategy almost surely never discovers the light, regardless of the number of samples. An area emitter occupies nonzero solid angle and can be hit.
The qualification matters: practical path tracing can use point lights by explicitly sampling a source and connecting the current surface to it with a shadow ray, a technique called next-event estimation. For a point source the connection direction is known exactly, rather than discovered by a random hemisphere hit. Thus the restriction applies to naive emitter-hit path tracing, not to all path tracing algorithms.[ref]
For a binary state, its expected value is its probability of being one. Hence the Monte Carlo method estimate of the posterior methylation profile under the chosen target is
The averaging axis must be zero: average over sampled patterns while keeping the site index. A provisional choice for this particular trace is , retaining 2000 states:
def mean_methylation(meths, burnin):
    if not 0 <= burnin < len(meths):
        raise ValueError("burn-in must leave at least one state")
    return np.asarray(meths)[burnin:].mean(axis=0)

burnin = 3000
profile_estimate = mean_methylation(meths, burnin)
print(lls[burnin:].mean())
plt.plot(profile_estimate, label="retained-sample mean")
plt.scatter(np.arange(len(obs)), .2*obs, s=10, label="0.2 × observation")
plt.xlabel("Site index")
plt.ylabel("Methylation probability")
plt.legend()
plt.show()
The retained mean log score is , and the profile is shown below the trace in part (b). The fixed endpoints have estimate exactly one; adjacent sites are often smoothed into methylated or unmethylated stretches despite individual conflicting observations. The rescaled observations are only a visual comparison and are not another estimate of the posterior probability.
This is a finite-chain estimate for the conditional-product target defined in part (a). A burn-in chosen by inspection does not establish convergence, and the long excursions in this short Markov chain leave substantial uncertainty in individual-site estimates; several longer runs would be needed for precise inference. To sample the coherent joint alternative instead, pass score=joint_methylation_score and inspect that new trace before choosing its own burn-in.
For the Metropolis–Hastings algorithm, start at a point with positive target probability density function. Draw from a proposal probability density function , generate an independent uniform distribution value , and set the next state to if
Otherwise retain , including that repeated state in the sample. Where a proposed forward move is possible but its reverse probability density function vanishes, its acceptance probability is zero. Unknown normalizing constants in cancel.
For distinct states, the accepted probability flow is
which is symmetric in . This detailed balance identity, together with the holding probability, proves that is invariant. Under appropriate irreducibility and aperiodicity conditions the chain converges to ; successive states are generally dependent.
The Gibbs sampler updates coordinates from their full conditional distributions. In a systematic sweep, draw successively
Each update preserves the target joint law: integrating the old coordinate against its conditional probability density function and replacing it by an independent draw from that same conditional leaves the joint probability density function unchanged. The composition of the coordinate updates therefore also preserves . A Gibbs sampler coordinate move can be regarded as a Metropolis–Hastings algorithm move with acceptance probability one. Systematic sweeps preserve stationarity but need not themselves be reversible. Initialization away from stationarity requires convergence before treating the draws as approximately target-distributed, and dependence must be accounted for in Monte Carlo method error estimates.
Assuming independent digits under Benford law, put and . The count vector has a multinomial distribution, with expected counts . Suitable predictive discrepancy statistics include the Pearson chi-squared statistic and multinomial deviance:
The zero-count terms of have limiting value zero. A Monte Carlo method gives a direct null comparison even when expected counts are small.
For example, an original R implementation is:
benford_check <- function(y, B = 9999L) {
  p <- log10(1 + 1/(1:9))
  n <- sum(y)
  expected <- n*p
  observed <- sum((y - expected)^2/expected)
  replicas <- rmultinom(B, size = n, prob = p)
  simulated <- colSums((replicas - expected)^2/expected)
  (1 + sum(simulated >= observed))/(B + 1)
}
Each column returned by rmultinom is a replicated count vector. R recycles the nine expected counts down each column. The add-one ratio is a Monte Carlo test estimate. In WinBUGS, alternatively generate a replicated dmulti vector using fixed , compute its discrepancy and monitor exceedance of the observed value. The null does not estimate unknown digit probabilities. Dependence or selection in the accounts would require an appropriate simulation model.
The printed identity needs an expectation on its right-hand side. For fixed , condition on and use independence of :
The expression inside this expectation is generally random and cannot equal the unconditional probability by itself.
For each independent Monte Carlo method replicate, draw from its given distribution. If , draw independent -variables, form and set . For the empty sum is . If may equal zero, use when , since . The law of total expectation gives
Since , the estimator has statistical consistency by the strong law of large numbers. It is the conditional Monte Carlo estimator obtained by Rao-Blackwellization of the direct indicator , and the law of total variance gives .
This version assumes that the cumulative distribution function can be evaluated. An easy sampler alone does not automatically supply an easy cumulative distribution function evaluation. If only sampling is available, use the direct indicator estimator, or replace each conditional cumulative distribution function by the average of several independent indicators ; the nested version remains an unbiased estimator. With such inner draws its variance per outer replicate is .
Here , with fresh proposal randomness independent of the past. For , the Metropolis–Hastings acceptance probability is
Thus is independent of , and are independent and identically distributed random variables with probability distribution , even if was chosen arbitrarily in . The method becomes ordinary Monte Carlo method sampling from . The average of is an unbiased estimator, with the variance stated in part (a). Including an arbitrary initial state would spoil this finite-sample property. This is the independent stationary proposal lemma.
Variational inference replaces exact Bayesian inference by an optimization problem over a tractable family . A guide program samples from this approximating family. Optimizing an evidence lower bound is equivalent to minimizing . Its appeal is that a fitted approximation can be cheap to sample and may scale well when an exact posterior distribution is inaccessible. A restricted family, such as mean-field variational inference, can miss dependence or entire modes; a local optimum can add further error. More optimization cannot remove approximation error caused by an inadequate family.
Monte Carlo method inference instead estimates posterior expectations using simulated values or weighted values. Examples include rejection sampling, importance sampling and Markov chain Monte Carlo. Under their respective support and convergence assumptions, increasing computation can yield consistent estimates without choosing a finite-dimensional posterior family. Their uncertainty includes simulation error; an inefficient proposal or slow mixing time can make that error large. Markov chain Monte Carlo additionally requires convergence and dependence diagnostics.
The central trade-off is optimization within an approximate family versus simulation under a target probability distribution. It is not an absolute distinction between deterministic and random computation: variational inference often uses Monte Carlo method estimates of its gradient, while Monte Carlo method inference may use fitted proposals. Neither method automatically guarantees accurate uncertainty estimates or superiority at a fixed computational budget.
Let , take supported where , and assume the following expectations exist. By the definition of Kullback-Leibler divergence and Bayes' theorem,
Therefore the evidence lower bound is
Nonnegativity of Kullback-Leibler divergence proves . The marginal likelihood is constant with respect to the variational parameter , so maximizing minimizes the stated Kullback-Leibler divergence.
The practical advantage is that evaluating logarithms of joint probabilities and requires no evaluation of the usually intractable marginal likelihood. One can estimate and its gradient with Monte Carlo method. Equality with the log marginal likelihood occurs only when almost everywhere. Merely maximizing the evidence lower bound over a restricted family neither computes the exact posterior distribution nor proves that the maximum attains this equality.
Path tracing 2026-10-31
A Monte Carlo method for estimating light transport through random paths of successive surface interactions. A sampled continuation contributes its scattering response and cosine divided by its sampling probability density function. Next-event estimation makes direct source connections explicit, including connections to ideal point lights.