Hidden Markov Models of User Behaviour

Description

Infers unobserved user states (e.g. exploring, struggling, committed) from sequences of observable actions, with transition probabilities between states.

An HMM assumes a sequence of hidden states, each emitting observable events with characteristic probabilities, and Markov transitions between states. Fitted with the Baum-Welch (EM) algorithm and decoded with the Viterbi algorithm, it labels each moment of a session with the most likely latent state and estimates how users move between states. For UX this turns clickstreams into interpretable phases such as browsing, comparing, confused and ready-to-buy, and allows analysis of what triggers transitions into struggle or out of it. Model selection (number of states via BIC and interpretability) and validation against qualitative ground truth make it rigorous rather than a black box.

Attributes

Loss type
Unmigrated
Stage
Post-launch
Effort
Weeks

Steps

  1. Define observable event types and encode sessions as sequences, possibly with dwell times.
  2. Fit HMMs with different numbers of states (e.g. 2-8) using Baum-Welch with multiple random starts.
  3. Select the number of states using BIC, stability across runs and interpretability.
  4. Inspect emission and transition matrices; name states with help from session replays or think-aloud data.
  5. Decode sessions with Viterbi and analyse state durations and transitions associated with outcomes.
  6. Validate by checking decoded states against independently coded sessions (e.g. replay-coded 'struggling').

Sources

  • Rabiner, A tutorial on hidden Markov models and selected applications in speech recognition (1989), Proceedings of the IEEE
  • Zucchini, MacDonald & Langrock, Hidden Markov Models for Time Series (2nd ed., 2016)

Also known as

  • HMM
  • Latent state modelling
  • Markov switching models
  • Latent state sequence modelling
  • Hidden Markov Models for Navigation Analysis

Categories

  • Analytics & Behaviour
  • Computational & Machine Learning