Abstract
Consider a realization of a stochastic process X and a noisy measurement M of a function of that process. We give a general method, called conditional coding, for sampling from the conditional distribution of X given M. The main idea is to apply Markov chain Monte Carlo (MCMC) sampling to the uniform random numbers used by a simulation algorithm. Conditional coding is an implementation of the MCMC method that requires only that X be formulated as a simulation algorithm. It is therefore applicable to processes that lack the structure required for traditional uses of MCMC methods. In one example we show how conditional coding can be used with a model that has a conditional distribution whose only tractable formulation is the algorithm that defines it.