Hello! In our previous lesson, we concluded our exploration of game theory by using the Nash Bargaining Solution to model how two rational individuals can negotiate a mutually optimal agreement. This provided a powerful tool for understanding cooperative outcomes.
We now pivot from strategic interactions to the dynamics of systems that evolve over time under uncertainty. This brings us to the third module of our course, "Advanced Stochastic Process Applications." Our focus will be on modeling processes where the future is probabilistic, not deterministic. We'll begin with one of the most fundamental tools in this area: the Markov Chain.
Today's lesson addresses the first two critical steps in using this tool. Our learning outcome is to validate the Markov assumption for modeling transitions between photoshoot energy states, and estimate the transition matrix from observational data. We will first explore what the "memoryless" Markov property means in the context of a boudoir photoshoot and, crucially, how to statistically test if this assumption is justified by the data. Then, we will learn how to quantify the system's dynamics by estimating its transition probabilities.
1. The Markov Property and the Transition Matrix
A Markov Chain is a model for a system that transitions between a set of states over time. Let's imagine a boudoir photoshoot. The model's creative energy is a key resource that fluctuates. We can define a set of discrete energy states:
- State 0: High Energy (creative, engaged, spontaneous)
- State 1: Moderate Energy (focused, professional, executing planned poses)
- State 2: Low Energy (fatigued, needing a break, losing focus)
If we observe the model's state at regular intervals (say, every 15 minutes), we get a sequence of states. A Markov model simplifies the dynamics of this sequence with a powerful assumption: the Markov Property.
This property asserts that the probability of transitioning to the next state depends only on the current state, and not on the sequence of states that preceded it. In our scenario, this means the model's energy level in the next 15 minutes depends only on her current energy, not on whether she was full of energy for the past hour or just recovered from a dip.
The following short video introduces this core concept and how the transition probabilities are organized into a transition matrix.
This video from William Lindsey provides a clear, concise introduction to the idea of a Markov process and the structure of a transition matrix.
Please watch the first few minutes, focusing on these two segments: The explanation of a Markov process and its "states". The segment that shows how to collect probabilities into a transition matrix, defining it with "current state" (columns) and "next state" (rows).
The transition matrix, typically denoted by , is a square matrix where the entry is the probability of moving from state to state in one time step.
Here, would be the probability that a model in a "Moderate Energy" state transitions to a "Low Energy" state in the next 15 minutes.
2. Validating the Markov Assumption
The Markov property is a simplifying assumption. But is it a valid one? Perhaps the model's energy level has "momentum" or a "boom-bust" cycle, where a long period of high energy makes a crash more likely. This would violate the memoryless property. As a statistician, you know that assumptions must be tested.
We can frame this as a formal hypothesis test:
- Null Hypothesis (): The process is a first-order Markov chain. The state at time depends only on the state at time .
- Alternative Hypothesis (): The process is a second-order Markov chain. The state at time depends on the states at both time and .
If we fail to reject , we can proceed with the simpler first-order model. The standard method for this is a likelihood-ratio test, which in this context is often implemented as a chi-squared test. We compare how well a first-order model explains the data versus a second-order model.
A highly relevant discussion on this topic can be found on the statistics forum Stack Exchange.
How Do I Know If A Markov Chain Follows The Markov Property?
This forum thread directly addresses our question. It provides a concise explanation of the hypothesis testing framework.
Please read the original question, followed by the two answers. The first answer by user "Ben" introduces the idea of using a 3-D contingency table to test for conditional independence. The second answer formalizes this by framing it as a comparison between two regression models using a likelihood-ratio test.
The core idea is to test for conditional independence: Is the future state independent of the past state, given the present state?
To conduct this test formally, we can use the methodology developed by Anderson and Goodman (1957), which uses a chi-squared statistic. A detailed guide to this test is provided in the following resource.
[PDF] Statistical inference and hypothesis testing for Markov chains with ...
This document provides a rigorous statistical treatment for testing the properties of Markov chains. We will focus on the test for the order of the chain.
Please read Section 4.2, "Hypothesis test on the order of the Markov chain" (pages 28-30). Pay close attention to: The formulation of the null and alternative hypotheses. The definition of the chi-squared statistic Q_j and its degrees of freedom. This test is performed for each "present" state j. The method for combining these into a single overall test statistic, Q. You can skim the example tables; the main goal is to understand the structure of the test statistic and its interpretation. If the calculated p-value for the test statistic Q is greater than our significance level (e.g., \alpha=0.05), we do not reject the null hypothesis, and we conclude that the first-order Markov assumption is a reasonable approximation for our data.
3. Estimating the Transition Matrix
If our hypothesis test supports the first-order Markov assumption, our next step is to estimate the transition matrix . The most common method for this is Maximum Likelihood Estimation (MLE). Given your background, you'll recognize the principle: we find the parameter values (the transition probabilities) that make our observed data most probable.
For a Markov chain, the maximum likelihood estimator for the transition probability has a very intuitive form. It is simply the observed frequency of transitions from state to state .
Let be the number of times we observed a transition from state to state in our data. Let be the total number of times the system was in state . Then the MLE is:
Example: Photoshoot Energy Data
Suppose we observed a model's energy state every 15 minutes over a portion of a shoot and recorded the following sequence of 16 states:[0, 0, 1, 1, 0, 1, 2, 1, 2, 2, 1, 0, 1, 1, 2, 2]
First, we create a transition count matrix:
| From \ To | State 0 (High) | State 1 (Mod) | State 2 (Low) | Row Total () |
|---|---|---|---|---|
| State 0 | 1 | 3 | 0 | 4 |
| State 1 | 2 | 2 | 3 | 7 |
| State 2 | 0 | 1 | 2 | 4 |
Note: There are 15 transitions in a sequence of 16 states. The final '2' in state 2 did not transition anywhere in the observed sequence.
Now, we normalize each row by its total to get the estimated transition probability matrix :
This matrix now serves as our model of the energy dynamics. For example, it predicts that from a "High Energy" state, there is a 75% chance of moving to "Moderate Energy" and a 25% chance of staying in "High Energy" in the next 15 minutes.
For a formal treatment of the MLE procedure, you can review the following resource.
[PDF] Statistical inference and hypothesis testing for Markov chains with ...
This section formalizes the intuitive "counting" method we just used by deriving it from the principle of maximum likelihood.
Please read Section 5.2, "Maximum Likelihood Method to estimate transition probabilities" (pages 38-42). Focus on the setup of the likelihood function for a Markov chain. You will see that maximizing this function leads directly to the frequency-based calculation we performed.
4. An Extension: State-Dependent vs. State-Independent Models
The resource LINK also introduces a more subtle question we can ask about our model. In our estimated matrix , the probability of deteriorating (e.g., transitioning to a worse energy state) is different depending on the current state. For example, while . This is a state-dependent model.
We could hypothesize a simpler model where the probability of dropping one energy level is the same, regardless of the current state (a state-independent model). This is another testable hypothesis. The generalized likelihood-ratio test provides the framework for comparing these two nested models.
[PDF] Statistical inference and hypothesis testing for Markov chains with ...
This section applies the generalized likelihood-ratio test, a familiar concept from statistics, to compare the fit of a state-dependent model versus a simpler state-independent one.
Please read Section 5.4, "Testing state independence against state dependence" (pages 47-50). The key is to understand how the two models (state-independent vs. state-dependent) are framed as null and alternative hypotheses. The subsequent calculation uses the chi-squared distribution to determine whether the more complex state-dependent model provides a significantly better fit to the data, justifying its use.
This type of model comparison is a fundamental part of the statistical modeling process, allowing us to select a model that is just complex enough to capture the dynamics in the data, but no more.
Conclusion
In this lesson, we established the foundational steps for building a discrete-time Markov Chain model from observational data. We saw that building such a model is not just a matter of calculation, but also requires rigorous statistical validation.
Key Takeaways:
- The Markov Property assumes that a process is "memoryless," with future state probabilities depending only on the present state.
- This assumption is not a given; it must be validated using data. A common method is a chi-squared or likelihood-ratio test comparing a first-order model (memoryless) against a second-order model (with memory).
- If the Markov assumption holds, the transition probabilities can be estimated using Maximum Likelihood Estimation (MLE), which simplifies to calculating the observed frequencies of each transition.
- The resulting transition matrix provides a compact, quantitative model of the system's one-step dynamics.
In our next lesson, we will address a crucial question: What do we do if the Markov assumption is violated? We will compare the suitability of Markov Chains versus Renewal Theory for modeling cyclical phenomena, exploring how Renewal Theory provides a more general framework for processes that do possess memory.