1001Ferramentas
πŸ”€Calculators

Markov Chain Steady State (2 States)

Enter a = P(1 to 2) and b = P(2 to 1) for a two-state chain and get the stationary vector: pi1 = b/(a+b) and pi2 = a/(a+b).

Ο€ = (π₁, Ο€β‚‚)

β€”

Two-state Markov chain β€” stationary distribution

In a Markov chain, where you go next depends only on where you are now, not on the path that got you there. That is the memoryless property. Take two states with the transition matrix P = [[1βˆ’a, a], [b, 1βˆ’b]]. The stationary distribution Ο€ is the one that stays put under the dynamics, so Ο€P = Ο€, with π₁ + Ο€β‚‚ = 1. Solve that little linear system and you get Ο€ = (b/(a+b), a/(a+b)). With a = 0.3 and b = 0.2, for instance, Ο€ comes out to (0.4, 0.6). Whatever distribution you start from, the chain settles toward Ο€ in O(log) iterations, and the second eigenvalue of P sets how quickly.

Applications

Google's PageRank treats web pages as states. You also see two-state and larger chains in population modeling (urban versus rural migration), queueing theory (M/M/1 systems), chemical state transitions, NLP for word generation and text models, allele frequencies in population genetics, reliability engineering with working and failed states, and the classic sunny/rainy weather forecast.

FAQ

Does a stationary distribution always exist? When the chain is irreducible and aperiodic (a + b > 0 and not (a = b = 1)), yes, and there's exactly one. A degenerate case like a = b = 0 gives an absorbing chain that never mixes.

What does the stationary distribution mean? Over the long run, it's the share of time the chain spends in each state, and it doesn't depend on where you began.

How fast does it converge? That comes down to |1 βˆ’ a βˆ’ b|, the second eigenvalue. The nearer it sits to 0, the quicker the chain converges.

Related Tools

πŸš—

Car Savings Goal Calculator

Calculate how much to set aside each month to buy a car in cash within your chosen time frame. Reach the goal without paying loan interest.

βš’οΈ

Warhammer Fantasy Army Points

Calculate the total points of your army in Warhammer (The Old World/Fantasy) by adding up units. Build balanced lists within the game point limit.

πŸ§‚

Sodium Corrected by Glucose

Corrects serum sodium in hyperglycemia (Hillier formula) β€” useful in decompensated diabetes.

β›΅

Sailing Apparent Wind Knots Calculator

Computes apparent wind speed in knots from true wind speed and boat speed under sail using direct vector sum in a head wind sailing course.

πŸŽ›οΈ

Implementation Shortfall

Computes the implementation shortfall of a buy order, AndrΓ© Perold's concept that measures the gap between the return of a paper portfolio executed instantly at the decision price and that of the actually executed portfolio with all costs. It separates the execution cost (price impact and commissions) from the opportunity cost of the shares that went unfilled. The result comes in money, percentage and basis points, always as a cost (positive is worse). Enter the decision price, the execution price, the quantities, the commissions and the final price.

πŸ–¨οΈ

Steps per Millimeter (3D Printer)

Compute the steps per millimeter (steps/mm) of a 3D-printer or CNC axis, steps/mm = (steps per revolution Β· microsteps)/travel per revolution, the calibration value entered in the firmware. For a GT2-belt axis (40 mm/rev travel), a 200-step motor and 16 microsteps, it gives 80 steps/mm. Correct calibration ensures accurate part dimensions. Enter the steps per revolution, the microsteps and the travel per revolution.

The results provided by this tool are for general informational and educational purposes only and do not constitute professional, financial, medical, legal, tax or accounting advice. Always confirm important decisions with a qualified professional and official sources.