What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
iTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
A Markov chain models a sequence of states in which the current state is enough to determine the probabilities of the next one. That “memoryless” rule helps explain the textbook PageRank model and Markov chain Monte Carlo (MCMC); it also offers a useful contrast with modern language models, which use prior token context rather than a tiny fixed table of word-to-word probabilities.
What is a Markov chain?
A Markov chain is a sequence of possible states connected by transitions, each with an assigned probability. A state might represent the weather, a web page, or a word. The probabilities describe which state can follow the current one.
Let Xt represent the state at time t. The Markov property is:
Free tools Windows power users keep installed
One-click scans. No signup required.
P(Xt+1 = j | Xt = i, Xt-1, …, X0) = P(Xt+1 = j | Xt = i)
#1 Best Overall
In plain language, once the current state is known, earlier states do not further change the model’s probabilities for the next step. This is a rule about how the model represents a process—not a claim that the real process has no history.
A three-state example
Imagine a weather model with three states: Sunny, Cloudy, and Rainy. From each state, the model assigns probabilities to tomorrow’s weather. If it is Sunny today, for instance, it might assign 0.6 to Sunny, 0.3 to Cloudy, and 0.1 to Rainy. Those numbers are illustrative, not a forecast.
For any current state, its outgoing probabilities must add up to 1. A transition matrix stores all the probabilities in one place. In this example, the rows and columns are ordered Sunny, Cloudy, Rainy:
Recommended Free Tools
Rank #2
| Current state | Next: Sunny | Next: Cloudy | Next: Rainy |
|---|---|---|---|
| Sunny | 0.6 | 0.3 | 0.1 |
| Cloudy | 0.3 | 0.4 | 0.3 |
| Rainy | 0.2 | 0.4 | 0.4 |
Each row describes the next-state distribution for one current state. In a row-vector convention, if x is the current probability distribution and P is the transition matrix, the distribution after one step is xP; after n steps it is xPn. Repeated multiplication propagates the probabilities forward.
What “memoryless” does—and does not—mean
“Memoryless” means the modeled next-step probabilities depend on the current state alone. It does not mean the world, a person, or a computer literally forgets what came before. If information from earlier states still matters but is missing from the current state, the model may not satisfy the Markov property as represented. One remedy is to define a richer state that carries the relevant context forward.
How the Markov idea explains PageRank
A textbook PageRank model treats each web page as a state and links as possible transitions. Picture a random surfer who starts on a page and moves through the web. Following links makes pages that receive links—especially from frequently visited pages—more likely to be visited.
Rank #3
A link-only model has a problem: a page might have no outgoing links, leaving the surfer with nowhere to go. The textbook solution is teleportation: with probability α, the surfer jumps to another page; with probability 1 − α, the surfer follows a uniformly selected outgoing link. The Stanford/Cambridge textbook presentation says α might typically be 0.1 in its illustrative model. That is a teaching parameter, not a disclosed setting for Google Search.
In this model, the long-run fraction of visits to each page is its PageRank. Google’s current Search Central guide says PageRank was among the core systems used when Google first launched, remains part of its core ranking systems, and has evolved substantially since its original version. The random-surfer model explains the conceptual foundation; it should not be mistaken for a full description of Google’s present ranking system.
Monte Carlo versus Markov chain Monte Carlo
Monte Carlo: estimate with random samples
Monte Carlo methods use random draws or simulations to estimate a quantity that may be difficult to calculate exactly. For example, a simulation can approximate an average by generating many representative outcomes and computing their mean.
Rank #4
MCMC: use a chain to sample a distribution
Markov chain Monte Carlo adds a Markov chain to the sampling process. The next sample depends on the current one, and the chain is designed—under suitable conditions—to explore a target probability distribution. The resulting samples can then help estimate expectations, parameters, or uncertainty. Bayesian inference is a central use case because it often requires working with a posterior distribution that is difficult to calculate or sample from directly.
Not every Monte Carlo method is MCMC: the distinguishing feature is the Markov-chain sampling process. Nor does a finite MCMC run automatically provide representative samples. Initialization, mixing, convergence checks, correlated draws, and the particular algorithm all affect how results should be assessed. Diagnostic choices depend on the method and application.
Are language models such as ChatGPT Markov chains?
N-gram models make the Markov assumption explicit
A simple text generator can treat words as states and estimate which word follows the current one. A first-order model uses only the immediately preceding state. An n-gram model uses a bounded sequence of recent words or tokens, so its next-word probabilities depend on that limited context. Such models can generate text resembling their training examples, but their fixed context limits what they can use to choose the next word.
Autoregressive prediction is related, but not the same model
Autoregressive language models predict a next token based on previously generated tokens. That makes text generation sequential, but it does not make a modern model equivalent to a small Markov chain with a fixed transition table. A neural language model computes token probabilities from a supplied context; the relationship to Markov chains is clearest as a comparison of assumptions and representations, not as an identity.
Google’s Machine Learning Glossary describes Transformer-based large language models as autoregressive. That general description does not establish ChatGPT’s exact internal architecture, context-window size, training details, or decoding settings. It is therefore more accurate to say that ChatGPT generates text autoregressively than to call it simply a first-order Markov chain.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.When the Markov-chain viewpoint is useful
- For a small, interpretable model: A transition matrix makes each modeled next-step probability visible and straightforward to propagate.
- For web-link intuition: The random-surfer model explains how link structure and long-run visit frequencies can produce a page score.
- For inference by sampling: MCMC provides a way to generate samples from difficult target distributions, with care needed to assess how well the chain explored them.
- For language modeling: N-grams show what a bounded-context Markov assumption looks like; neural autoregressive models use learned computations and broader supplied context.
When choosing among MCMC methods, useful comparison dimensions include the target distribution, mixing and convergence behavior, computational cost, and uncertainty in the resulting estimates. There is no universal “best” sampler independent of the problem.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

