stationary_distribution
std.stats.stationary_distribution · Level L3The stationary distribution π of a finite Markov chain, with π·P = π and Σπ = 1: one solve of (Pᵀ − I)·π = 0 with its last equation replaced by the normalization. Unique for an irreducible chain. The reference solves the full system with every equation and the normalization, by least squares, which is exact for a consistent system.
Signature
stationary_distribution(Pm: f64[k, k]) → f64[k]
Structure
The function as NOVA stores it: one box per input, operation and output, and arrows that carry values. A double border marks another library function this one runs — called once, or by Scan once per element; select it to open that function.
- input
- operation
- constant
- call
- output
Verification
- Signature proven by NOVA’s shape solver, for every size.
- Equal to the reference
the full system (Pᵀ − I)π = 0, 1ᵀπ = 1, by the normal equationsin exact rational arithmetic, on all 40 test cases. - All 161 float64 results inside the running error bound; the closest uses <1% of it.
- Interpreter and NumPy backend return bit-identical results.
- At float32 too: the 40 test cases rounded to float32, and 27 of them inside the running error bound at u = 2⁻²⁴; the closest uses <1% of it. Uncertified, too ill-conditioned at float32 for a finite bound: 13.
- correctly rounded (the float64 nearest the exact value)
- 41%
- bit-equal to the NumPy formula in float64
- 29%
- largest error, in units in the last place
- 16
Large ulp counts appear where a result is tiny next to the numbers it is computed from (after cancellation, for example), so one unit in the last place is tiny too; the absolute error is still inside the bound. Results within their own error of zero are not counted.
Identity
sha256:74ce632c28517368fa0b72be6d7029da9b100e4b20e5dc651aba3543906444ddThe semantic hash of the graph. It changes when the program changes, and never when only its documentation does.
Control handle
- Symbol
- Ω:std.stats.stationary_distribution · Ω:stationary_distribution
- Pins
sha256:d3273c3b9c367cf308aa2cc87658596f7e8b2b2a6f5f5bf78afef2ee5bc4870dthis graph alone- Evidence
sha256:50b44d7fbc2a04a233cd4f8931043020a88925746c3a22219e6c933144b19e5bthe hash of its verification record- Needs
- no capability: a pure function
Through NOVA’s control layer, the symbol launches this function only while the program still matches what it pins: a change to this graph, or to any graph it reaches, needs a migration first.