        </div>

        <div class="page-wrapper" tabindex="-1" role="main">
          <div class="page-inner">

            <section class="normal" id="section-">

<div>
This is an old version, <a href="https://mc-stan.org/docs/reference-manual/analysis.html#markov-chains">view current version</a>.
</div>
<div id="markov-chains" class="section level2" number="16.1">
<h2><span class="header-section-number">16.1</span> Markov chains</h2>
<p>A <em>Markov chain</em> is a sequence of random variables <span clas