WorksMathematics
Sliding-Window Detection of Hidden Regimes under Stochastic Switching
Abstract
A sliding-window average is a simple estimator of the current state of a hidden regime-switching process, such as a hidden Markov model. A longer window averages out more noise but is more likely to contain a switch, and the question is what such a switch costs. We analyse the decoder that assigns the average of the last observations to the nearest regime mean. For two regimes with conditionally independent, stochastically ordered observations, a switch inside the window, averaged uniformly over its positions and directions, causes an error with probability exactly . Consequently, for every stationary switching law, the error is at most , where is the stationary-weighted single-regime error and the switch rate. Under Markov switching, time reversal shows that a window whose oldest and current regimes differ is misclassified with probability exactly , however many switches it contains, and the bound is attained up to a factor . For Gaussian noise with common variance, minimizing the bound gives an explicit window length which, in units of , depends only on the expected number of switches in that time. As switching probabilities vanish proportionally, the optimal error is , with the single-regime Chernoff exponent. In the Gaussian case this is twice the Bayes error. For symmetric switching, exponentially weighted moving averages reduce this factor to at most , and two-block weights adapted to the switch rate attain the Bayes rate. For three or more regimes, long-window switch costs are set by the geometry of the regime means. For Markov-modulated random walks with steps on a reflecting lattice, a position-aware decoder learns as fast as without walls under holding boundaries, while steps at bouncing boundaries carry none.