Assume , and work on the support . In rejection sampling, choose a normalized proposal probability mass function and a known finite constant satisfying everywhere. Draw independent random variables and , accepting when . The joint probability of proposing and accepting is , so the overall acceptance probability is and the accepted value has probability mass function . Fresh trials therefore produce independent and identically distributed random variables with the desired probability distribution. For a fixed positive number of accepted values, the sample average is an unbiased estimator of the expectation when that expectation is finite. Its variance is if the second moment is finite. Finding a valid envelope can be difficult, and a small acceptance probability makes the method expensive.
For the Metropolis–Hastings algorithm, choose a proposal transition matrix and, at the current state , propose . Accept with the Metropolis–Hastings acceptance probabilityA proposal outside is rejected; an impossible proposal need not be assigned a ratio. Otherwise remain at . This constructs a Markov chain satisfying detailed balance with , without computing or a global envelope. Estimate the expectation by averaging over iterations, including repeated states after rejections. Keeping only accepted jumps generally changes the stationary distribution of the recorded process.
The Metropolis–Hastings algorithm produces dependent samples, so the variance of its average includes autocovariances; starting outside stationarity can also cause finite-run bias. With Markov chain irreducibility, suitable recurrence and an integrable , the countable-state Markov chain ergodic theorem gives consistency. Aperiodicity is additionally needed for the usual convergence of one-time probability distributions. In contrast, accepted rejection sampling values need no initial transient. Neither method is universally faster: envelope rejection competes with the proposal quality and mixing time of the Markov chain. Nonnegativity of alone does not guarantee a finite expectation or variance.
Neither Markov chain irreducibility nor fast convergence follows from detailed balance. On two states, the identity transition matrix satisfies detailed balance for the uniform probability distribution, but neither state can reach the other.
Even after imposing Markov chain irreducibility and aperiodicity, considerIt satisfies detailed balance for . Its nontrivial eigenvalue is , and, from state zero, its total variation distance from after steps is . This approaches zero arbitrarily slowly as decreases. Detailed balance without rapid convergence separates correctness of a stationary distribution from reachability and speed.
For each adjacent pair, the detailed balance equations follows directly:For nonadjacent distinct states both fluxes vanish, and diagonal fluxes agree trivially. Since , this is a genuine stationary distribution, rather than merely an invariant measure of infinite mass.
Every upward and downward transition probability between neighbouring states is positive for . Any two states can therefore be joined by a finite path of positive probability: the Markov chain is irreducible. Moreover,State zero has period one; Markov chain irreducibility makes every state aperiodic. Finally, the standard countable-state recurrence theorem states that an irreducible Markov chain admitting a stationary distribution of total mass one is positive recurrent, with that stationary distribution unique. The countable-state Markov chain convergence theorem then states that Markov chain irreducibility, positive recurrence and aperiodicity imply for all states . The hypotheses just verified hold on the infinite state space , not merely on a numerical truncation.[ref]
Markov Chains by James R. Norris. Sections 1.7–1.8, invariant distributions and convergence to equilibrium
Consequently, the unique stationary distribution and the limiting distribution are both , from every initial state. The countable-state Markov chain ergodic theorem also gives almost surely whenever .[ref]
Condition on the state after steps and use the Markov property and time-homogeneous Markov property:This is the Chapman-Kolmogorov equation, or . A stationary distribution is a probability row vector with nonnegative entries summing to one and . Inductively , so a chain started with that distribution retains it at every time.
For the given matrix, its first stationary equation is . Normalization gives . The third equation gives , hence . ThereforeDirect multiplication verifies the second equation as well. The finite chain is irreducible, so this stationary probability distribution is unique.
A stationary distribution is a nonnegative row vector with and . The balance equations giveThe first yields . Substitution into the middle pair yields and ; the fourth equation is then satisfied. Normalization gives , henceAll states communicate, so this is the unique stationary distribution. The self-loop at state 1 additionally makes this finite Markov chain aperiodic, although aperiodicity is not required for the balance calculation.
State one is left after one step and never revisited. The eventual probability mass in the closed class isWithin this class the stationary distribution is , because the balance equation is . The two-state recurrence shows convergence from either starting state, since . The other closed class never reaches state five. Therefore
Write the stationary probabilities as . The equation reduces to . Together with , this givesThe positive transition probabilities make the two states communicate, so the stationary distribution is unique.
On the class , the two-step transition matrix is symmetric with positive entries, so its stationary distribution is and its distribution converges to that law. ThereforeExplicitly the two eigenvalues are and , giving . The original chain has probability zero of being in state at odd times, consistent with its period two.
A stationary distribution is a probability row vector satisfying . Its coordinates obey and . ThusBecause both transitions between distinct states have positive probability, the finite Markov chain is irreducible; its positive self-transition probabilities also make it aperiodic.
The finite irreducible aperiodic Markov chain converges to its stationary distribution, regardless of its initial law. Therefore . Taking the arithmetic means of this convergent sequence givesThis uses linearity of expectation and convergence of Cesàro means; it does not require the variables to be independent.
Here the valid parameters lie in the irreducible aperiodic range. The finite-state theorem on convergence to an invariant distribution therefore implies convergence to the unique stationary distribution, independently of the initial state.
Solve and . The equations for states giveHence and . Normalization gives , soStationarity alone would not guarantee convergence of the one-time distributions; irreducibility and aperiodicity justify that final limit.
For an irreducible positive recurrent Markov chain, the Markov chain ergodic theorem gives a unique stationary distribution , with almost-sure long-run occupation fraction in state . More generally, time averages of an integrable state reward converge to its stationary mean. If the chain is also aperiodic, then for every initial state ; the aperiodicity assumption is needed for this last distributional conclusion.
For either transition rule in part (i), permits progression through the phase-A states and a return from phase B to zero. Both chains are finite and irreducible, hence positive recurrent. State has a positive self-loop, so both are aperiodic. Thereforeusing respectively the cumulative or consecutive stationary distribution given in part (i), for every starting distribution.
The excluded endpoint cases are simple: at , phase B is eventually reached and then absorbing, so the limiting law is the point mass at . At , the cumulative rule traps the chain at its current phase-A count (or eventually at zero if started in phase B), so the limit can depend on the initial count; under the consecutive rule zero is eventually absorbing. Irreducibility and the preceding stationary formulas must not be asserted unchanged at these endpoints.
Assume , as required by the source's selection probabilities, and put . Conditional on the red book's current position, the next independent selection determines its move without needing its earlier history. Selecting the red book moves it left, unless already leftmost. Selecting the plain book immediately to its right moves it right. Every other selection leaves its position unchanged. Thus this position process is a Markov chain on , withand boundary self-loop probabilities , . These account for every selection and each row sums to one.
Stationarity at the first state gives , hence . When , for the second state substitution of this identity into its stationarity equation gives . More generally, summing stationarity over the initial segment equates its sole outward and inward probability flows:Write . Then . Normalization givesThe expression is positive also for , since both numerator prefactor and denominator are negative. The uniform case is exactly , when all books are equally likely to be selected. Since both neighboring transition probabilities are positive, the finite chain is irreducible; the displayed stationary distribution is therefore unique.
Stationarity at zero gives , hence . At one, ; substituting gives . More generally the interior equations are . Induction givesSince , normalization of this geometric series givesThese probabilities satisfy detailed balance , including the boundary balance with the holding probability. Thus they do define a stationary distribution. Irreducibility then gives its uniqueness.
For , the only incoming transition is from , so a stationary distribution must satisfyNormalization gives , henceThe zero-state balance also holds: . Thus the Poisson distribution is indeed stationary, including when . Irreducibility gives uniqueness.
If , induction gives for every . Part (c) then makes the distribution of every equal to . Such a probability row vector is a stationary distribution.
Let and defineThe probabilities sum to . For , the incoming probability isusing a telescoping sum. Similarly,Thus is a stationary distribution. Every state can reach in one step, and can reach every lower positive state in one step, so the chain is irreducible. The self-loop at has probability , hence the chain is aperiodic. The convergence theorem for a finite irreducible aperiodic Markov chain now givesFor , the conclusion follows directly from the single absorbing/refilled state.
This is the limiting law of the uniform depletion and refill Markov chain.
Every state reaches state one by deterministic downward steps. From one, the chain can reach a given state exactly when it can jump to some with and then count down to . ThereforeIf the support is bounded by , states above cannot be reached from one, so the chain on the stated infinite state space is not irreducible. Its smaller closed class can still have a stationary distribution, as in part (e).
Write the stationary distribution as a row vector . For the first transition matrix, gives , , and . Hence and . Normalization yieldsBy the stated common-stationary distribution property, this is also the answer for the second transition matrix.
The answer isIt holds initially by construction. If it holds at step , then is a function of , so it is independent of the fresh inputs . Part (a)(iii) therefore gives . This completes the mathematical induction and identifies the stationary distribution of the recursion.