Aditya Makkar
Markov Decision Processes

INTRODUCTION

Markov decision processes (MDPs), also known as discrete-time controlled Markov processes in the control literature, are a class of discrete-time stochastic control processes with a simple structure that makes them useful in many applications. For example, in reinforcement learning it is assumed that the underlying dynamics can be modeled using MDPs. This blog post isn’t about the applications though, but rather about the more technical existence and uniqueness questions—questions which are often ignored. We will start with carefully defining the Markov decision process and then show a few intuitive results, the last of them being the famous dynamic programming equation.

In an MDP there is an underlying discrete-time Markov process whose trajectory can be influenced by a decision maker by choosing actions from a pre-specified class of admissible actions. The goal is choose actions in such a way so as to optimize a performance criterion. The state of the system at time n+1n+1 then depends, in a Markovian way, on the state of the system and the action chosen at time n.n. Depending on how general the state spaces and action space are, this framework can model a wide variety of interesting problems.

Let us discuss a toy problem—inventory control problem—for motivation. You are the manager of a distribution centre which sells the product to shops and buys the product in bulk from a factory. Suppose the maximum capacity of the distribution centre is CC units, and therefore the state space is S=[0,C],\mathsf S = [0, C], i.e., the state of the distribution centre at time nn is a random variable XnX_n taking values in S.\mathsf S. The action that you can take is order some quantity of product from the factory. The action space A\mathsf A also equals [0,C][0,C]. At time nn you can observe the state XnX_n of the system, and with a policy in mind you order AnA_n units from the factory. Of course, AnA_n must take values in [0,C−Xn][0, C-X_n]. The demand from the shops is given by the i.i.d. random variables {ξn}n≥0\{\xi_n\}_{n \ge 0} with a common distribution μ\mu on S.\mathsf S. It costs hh dollars per unit of product to hold the product, bb dollars per unit of product to buy the product, and earns ss dollars per unit of product to sell the product. Any unmet demand is simply lost revenue. How should you choose a policy π={An}n=0N\pi = \{A_n\}_{n=0}^N to maximize the revenue over, say, NN days?

Let us write the model more precisely. Suppose on day 00 you start with X0=x0X_0 = x_0 units of product, which is a constant. Then we have

Xn+1=max⁡{0,Xn+An−ξn}=:f(Xn,An,ξn),0≤n<N.\begin{aligned} X_{n+1} = \max\{0, X_{n}+A_{n}-\xi_{n}\} =: f(X_{n}, A_{n}, \xi_{n}), \quad 0 \le n < N.\end{aligned}

The revenue on day nn is

Rn=smin⁡{ξn,Xn}−bAn−hXn,0≤n≤N.\begin{aligned} R_n = s \min\{\xi_n, X_n\} - b A_n - h X_n, \quad 0 \le n \le N.\end{aligned}

The total expected revenue is

JN(π,x0)=E[∑n=1NRn].\begin{aligned} J_N(\pi, x_0) = \mathbb E \left[ \sum_{n=1}^N R_n \right].\end{aligned}

Does there exist an admissible policy π∗\pi^* such that it maximises the total expected revenue? That is,

JN(π∗,x0)=sup⁡πJN(π,x0).\begin{aligned} J_N(\pi^*, x_0) = \sup_{\pi} J_N(\pi, x_0).\end{aligned}

Is π∗\pi^* optimal for every starting state x0x_0? It will be more convenient to model the transition dynamics of such a model using stochastic kernels, which informally model the transition probabilities of the process. That is, we want to find a stochastic kernel κ\kappa from S×A\mathsf S \times \mathsf A to S\mathsf S which gives the probability of the state at day n+1n+1 being in B⊆SB \subseteq \mathsf S given that on day nn the state was XnX_{n} and we took action AnA_n. We can do this as follows

κ((Xn,An),B)=μ({s∈S:f(Xn,An,s)∈B}).\begin{aligned} \kappa((X_n,A_n), B) = \mu(\{s \in \mathsf S : f(X_n,A_n,s) \in B\}).\end{aligned}

We haven’t been very precise about our formulation. To this end, let us start by defining the objects like stochastic kernels and sets which will define our action and state spaces.

SETTING THE STAGE

I had initially intended for this section to be a small one, but as I wrote I couldn’t help but go on a ramble since it helped me learn. If you are already comfortable with the notions of standard Borel spaces, stochastic kernels (also known as Markov kernels or transition probability kernels) and regular conditional distributions, or if you don’t want to be fully rigorous and are okay with understanding the core ideas without bothering too much with rigour and notation, feel free to skip directly to the section on Markov Decision Process.

Note on notation: I will be using sans serif typestyle for spaces, for example S,T,A\mathsf{S}, \mathsf{T}, \mathsf{A} etc., and script typestyle for σ−\sigma-algebras, for example, S,T,A\mathscr{S}, \mathscr{T}, \mathscr{A} etc. In this section I will be fastidiously careful about writing the σ−\sigma-algebra, but starting from the next section on Markov Decision Processes I often won’t write the σ−\sigma-algebra explicitly because we will dealing with topological spaces and Borel σ−\sigma-algebra is to be assumed implicit. But if I am forced to write, then I’ll use the script typestyle of a letter to denote the Borel σ−\sigma-algebra of the space written in sans serif typestyle of the corresponding letter; for example, A\mathscr{A} for A.\mathsf A. We denote the vector space of measurable functions from (X,X)(\mathsf X, \mathscr X) to R\mathbb R by X\mathscr X — the context will make it clear if we are referring to a function or a set, and what the domain of the function is. We denote the cone (i.e., stable under sums and multiplication by positive constants) of measurable functions from (X,X)(\mathsf X, \mathscr X) to [0,+∞][0, +\infty] by X+.\mathscr X_+.

Standard Borel Space

I discussed the notion of standard Borel spaces in the blog post on conditional probability, but since they play an important role in our discussion on Markov decision processes, let me elaborate on them a bit more here. Standard Borel spaces are usually studied under the banner of descriptive set theory and are intimately connected with other descriptive set theoretic concepts like analytic spaces, Lusin spaces and Souslin spaces. We will not focus on this side of the standard Borel spaces though, but rather on some important probabilistic results that can be formulated at this level of generality.

Generally speaking, very few meaningful statements can be made about Markov decision processes when we impose no regularity structure on the spaces involved and let them be any measurable spaces. This is where standard Borel spaces come in — powerful results can be concluded with this structure, and yet they are sufficiently general to be satisfying.

Polish Space

Let us start by recalling Polish spaces.

Definition 1 (Polish Space): A Polish space is a separable, completely metrizable topological space.

Examples

  1. Any set with the discrete topology is completely metrizable, and therefore if it is countable it is Polish. So, for example, {0,1}\{0,1\}, N\mathbb N and Z\Z, each with the discrete topology, are Polish.

  2. Rn\mathbb R^n with the usual topology is Polish, for each n∈N.n \in \mathbb N.

  3. The topology of any (real or complex) Banach space is completely metrizable, and therefore separable Banach spaces are Polish.

  4. The completion of a separable metric space is Polish.

  5. Any closed subspace of a Polish space is Polish.

  6. The disjoint union of countably many Polish spaces is Polish.

  7. The product of countably many Polish spaces is Polish.

All of these examples follow from elementary properties of metric spaces. So, for example, to show the last example, first show that the product of countably many separable metric spaces is itself separable using the definition of product topology, and then show that the product of countably many complete metric spaces is itself a complete metric space using the idea of the product metric and the definition of Cauchy sequences.

Polish spaces are the probabilist’s favourite spaces to work with since they are simple to deal with and a lot of spaces are Polish, while almost all results that hold in R\mathbb R still hold in a Polish space. For example, if (X,dX)(\mathsf X,d_{\mathsf X}) is a compact metric space and (Y,dY)(\mathsf Y, d_{\mathsf Y}) is Polish, then C(X,Y)C(\mathsf X,\mathsf Y), the set of continuous functions from X\mathsf X to Y\mathsf Y with the uniform metric d(f,g)=sup⁡x∈XdY(f(x),g(y))d(f,g) = \sup_{x \in \mathsf X} d_{\mathsf Y}(f(x), g(y)), is Polish.

Standard Borel Space

Recall the notion of isomorphism between algebraic objects or the notion of homeomorphism between topological spaces. Both these notions give a bijective correspondence between two objects that preserves the algebraic or the topological structure. In a similar spirit we have the notion of isomorphism between two measurable spaces.

Definition 2 (Isomorphism and Borel isomorphism): Two measurable spaces (S,S)(\mathsf S, \mathscr{S}) and (T,T)(\mathsf T, \mathscr{T}) are called isomorphic iff there is a bijective function f ⁣:S→Tf \colon \mathsf S \to \mathsf T such that both ff and its inverse f−1f^{-1} are measurable. The function ff is called an isomorphism. In the special case where S\mathsf S and T\mathsf T are topological spaces equipped with their Borel σ−\sigma-algebras and f ⁣:S→Tf \colon \mathsf S \to \mathsf T is an isomorphism, ff is called a Borel isomorphism, and S\mathsf S and T\mathsf T are called Borel isomorphic.
Definition 3 (Standard Borel space): A standard Borel space is a measurable space isomorphic to a Polish space endowed with its Borel σ−\sigma-algebra.

Let me list some properties about standard Borel spaces without proof–mostly to justify using them as our default spaces.

Proposition 1: The product of countably many standard Borel spaces is a standard Borel space.
Proposition 2: A measurable subset S\mathsf S of a standard Borel space (T,T)(\mathsf T, \mathscr T), where we endow S\mathsf S with the σ−\sigma-algebra S={T∩S : T∈T}\mathscr S = \{ T \cap \mathsf S \,: \, T \in \mathscr T\}, is a standard Borel space. For the other direction, if S\mathsf S is a metrizable topological space endowed with its Borel σ−\sigma-algebra S\mathscr S, then (S,S)(\mathsf S, \mathscr S) is a standard Borel space if and only if S\mathsf S is homeomorphic to a Borel subset of a Polish space.

It is obvious from the definition that two countable metrizable spaces are Borel isomorphic if and only if they have the same cardinality. For the uncountable case, it is not immediately obvious when two spaces are Borel isomorphic. The next proposition is a deep and surprising result.

Proposition 3: All uncountable standard Borel spaces are mutually isomorphic.

Observe that [0,1][0,1] endowed with its Borel σ−\sigma-algebra is a Polish space, and therefore every uncountable standard Borel space is isomorphic to ([0,1],B([0,1])),([0,1], \mathscr{B}([0,1])), where the notation B(T)\mathscr B(\mathsf T) denotes the Borel σ−\sigma-algebra of a topological space T.\mathsf T. This observation will prove to be very helpful in proving existence result for regular conditional distributions, in proving the disintegration theorem etc.

Proposition 4: If a bijective map between standard Borel spaces is measurable, then the inverse map is also measurable.

This, in particular, implies that if both (S,S1)(\mathsf S, \mathscr S_1) and (S,S2)(\mathsf S, \mathscr S_2) are standard Borel spaces, then S1=S2.\mathscr S_1 = \mathscr S_2. Now recall that the Borel σ−\sigma-algebra on [0,1][0,1] is a strict subset of the Lebesgue σ−\sigma-algebra on it. This gives us a simple example of a measurable space which is not a standard Borel space.

A very useful result that further justifies the case for using standard Borel spaces is the following: Let (S,S)(\mathsf S, \mathscr S) be a standard Borel space and let P(S)\mathcal{P}(\mathsf S) denote the collection of all probability measures on (S,S).(\mathsf S, \mathscr S). Endow P(S)\mathcal{P}(\mathsf S) with the topology of weak convergence, i.e., the topology generated by the evaluation maps P(S)∋μ↦μ(S)∈[0,1]\mathcal{P}(\mathsf S) \ni\mu \mapsto \mu(S) \in [0,1], where SS varies over S\mathscr S (or equivalently, by the maps μ↦∫f dμ\mu \mapsto \int f \, \mathrm{d}\mu, where ff varies over Cb(S)C_b(\mathsf S)). Then P(S)\mathcal{P}(\mathsf S) equipped with its Borel σ−\sigma-algebra is a standard Borel space. This fact becomes useful when dealing with partially observable MDPs. Here a standard approach is to transform them into an equivalent “completely observable” MDP (the one in Definition 14 ahead) with a larger state space, a space of probability measures.

A cool fact, which has no bearing on our discussion ahead, is the following.

Proposition 5: If (X,X)(\mathsf X, \mathscr X) and (Y,Y)(\mathsf Y, \mathscr Y) are two standard Borel spaces, then the map f ⁣:X→Yf \colon \mathsf X \to \mathsf Y is measurable if and only if its graph ⟦f⟧:={(x,f(x)) : x∈X}\llbracket f \rrbracket := \{(x, f(x)) \,:\, x \in \mathsf X\} is a measurable subset of the product space (X×Y,X⊗Y).(\mathsf X \times \mathsf Y, \mathscr X \otimes \mathscr Y).

Stochastic Kernels

Suppose that a particle is moving randomly in a state space given by a measurable space (S,S)(\mathsf S, \mathscr{S}). We would like to be able to know the probability, denoted with say κ(x,B)\kappa(x, B), of the particle finding itself in a set B∈SB \in \mathscr{S} after a unit of time given that it started at state x∈S.x \in \mathsf S. Stochastic kernels model this notion of transition probabilities in a natural manner and we will rely heavily on them in our discussion.

Definition 4 (Stochastic kernel): Let (S,S)(\mathsf S, \mathscr{S}) and (T,T)(\mathsf T, \mathscr{T}) be two measurable spaces. A map

κ ⁣:S×T→[0,1] \kappa \colon \mathsf S \times \mathscr{T} \to [0,1]
is called a stochastic kernel or a Markov kernel or a transition probability kernel from (S,S)(\mathsf S, \mathscr{S}) to (T,T)(\mathsf T, \mathscr{T})–or, briefly, from S\mathsf S to T\mathsf T–if

  1. x↦κ(x,B)x \mapsto \kappa(x, B) is S−\mathscr{S}-measurable for each B∈TB \in \mathscr{T}, and

  2. B↦κ(x,B)B \mapsto \kappa(x,B) is a probability measure on (T,T)(\mathsf T, \mathscr{T}) for each x∈S.x \in \mathsf S.

We often denote κ(x,B)\kappa(x, B) with κx(B)\kappa_x(B) and the mapping x↦κ(x,B)x \mapsto \kappa(x, B) with κ(B).\kappa(B). If (T,T)=(S,S)(\mathsf T, \mathscr{T}) = (\mathsf S, \mathscr{S}), we simply say a kernel on (S,S)(\mathsf S, \mathscr{S}) or, even more simply, on S\mathsf S. Instead of saying a stochastic kernel from (S,S)(\mathsf S, \mathscr{S}) to (T,T),(\mathsf T, \mathscr{T}), some books and papers say a stochastic kernel on (T,T)(\mathsf T, \mathscr{T}) given (S,S).(\mathsf S, \mathscr{S}). We can view the stochastic kernel κ\kappa as a measurable function from S\mathsf S to the space P(T)\mathcal{P}(\mathsf T) of probability measures on (T,T)(\mathsf T, \mathscr{T}), where the σ−\sigma-algebra on P(T)\mathcal{P}(\mathsf T) is generated by the weak topology, as mentioned above. For this reason, stochastic kernel are also called random probability measures. We can also view the stochastic kernel κ\kappa as a probabilistic generalization of the concept of function from S\mathsf S to T\mathsf T–instead of associating with each x∈Sx \in \mathsf S a unique value from T\mathsf T, we associate a probability distribution on T.\mathsf T.

The term kernel, without the adjective stochastic, will be used to denote a similar object as a stochastic kernel except that the property 2 in the definition above states B↦κ(x,B)B \mapsto \kappa(x,B) is a measure on (T,T)(\mathsf T, \mathscr{T}) for each x∈S.x \in \mathsf S.

Examples

  1. Given a measurable space (S,S)(\mathsf S, \mathscr{S}), the function

    S×S∋(x,B)↦κ(x,B)={1if x∈B,0if x∈S∖B\begin{aligned} \mathsf S \times \mathscr{S} \ni (x,B) \mapsto \kappa(x,B) = \begin{cases} 1 &\text{if } x \in B, \\ 0 &\text{if } x \in \mathsf S \setminus B \end{cases}\end{aligned}
    defines a stochastic kernel on (S,S)(\mathsf S, \mathscr{S}), called the unit kernel. For each x∈Sx \in \mathsf S, the measure B↦κ(x,B)B \mapsto \kappa(x,B) is the Dirac measure δx\delta_x on (S,S)(\mathsf S, \mathscr{S}) at x.x.

  2. Given two measurable spaces (S,S)(\mathsf S, \mathscr{S}) and (T,T)(\mathsf T, \mathscr{T}) and a measure ν\nu on (T,T)(\mathsf T, \mathscr{T}), the function

    S×T∋(x,B)↦κ(x,B):=ν(B)\begin{aligned} \mathsf S \times \mathscr{T} \ni (x,B) \mapsto \kappa(x, B) := \nu(B)\end{aligned}
    defines a kernel from (S,S)(\mathsf S, \mathscr{S}) to (T,T)(\mathsf T, \mathscr{T}) which does not depend on x.x. Therefore, every measure can be seen as a special type of a kernel.

  3. Given two measurable spaces (S,S)(\mathsf S, \mathscr{S}) and (T,T)(\mathsf T, \mathscr{T}) and a measurable function f ⁣:S→Tf \colon \mathsf{S} \to \mathsf T, the function

    S×T∋(x,B)↦κ(x,B):=1B(f(x))\begin{aligned} \mathsf S \times \mathscr T \ni (x,B) \mapsto \kappa(x,B) := \mathbf{1}_B(f(x))\end{aligned}
    defines a stochastic kernel from (S,S)(\mathsf S, \mathscr{S}) to (T,T).(\mathsf T, \mathscr{T}).

  4. Consider the two measurable spaces (S={1,2,…,n},P(S))(\mathsf S = \{1, 2, \ldots, n\}, \mathfrak{P}(\mathsf S)) and (T={1,2,…,m},P(T))(\mathsf T = \{1, 2, \ldots, m\}, \mathfrak{P}(\mathsf T)) for two positive integers nn and mm, with P(X)\mathfrak{P}(\mathsf X) denoting the power set of a set X.\mathsf X. Suppose we are given an n×mn \times m matrix K\mathbf K containing non-negative elements such that the sum along each row is 1.1. Then the function κ\kappa defined by

    S×P(T)∋(i,B)↦κ(i,B):=∑j∈BKi,j\begin{aligned} \mathsf S \times \mathfrak{P}(\mathsf T) \ni (i,B) \mapsto \kappa(i, B) := \sum_{j \in B} \mathbf K_{i,j}\end{aligned}
    is a stochastic kernel from S\mathsf S to T.\mathsf T. The case where S\mathsf S or T\mathsf T are countably infinite is similar.

Regular Conditional Distribution

In most discussions of MDPs the notion of conditional distribution and the associated notation are left frustratingly ambiguous. To remedy this let us spend some time discussing regular conditional distribution and disintegration in this subsection and the next. I also discussed the idea of regular conditional distribution in a previous blog post.

Let us start with a well-known but important result.

Lemma 1 [Doob-Dynkin factorization lemma]: Let (Ω,F)(\Omega, \mathscr{F}) and (T,T)(\mathsf T, \mathscr T) be arbitrary measurable spaces, and (S,S)(\mathsf S, \mathscr S) be a standard Borel space endowed with its Borel σ−\sigma-algebra. Let f ⁣:Ω→Sf \colon \Omega \to \mathsf S and g ⁣:Ω→Tg \colon \Omega \to \mathsf T be measurable functions. Then ff is σ(g)−\sigma(g)-measurable if and only if f=h∘gf = h \circ g for some measurable function h ⁣:T→S.h \colon \mathsf T \to \mathsf S.
missing

The sufficiency is very easy to verify. Indeed, if f=h∘gf = h \circ g for some measurable function h ⁣:T→S,h \colon \mathsf T \to \mathsf S, then for any S∈SS \in \mathscr S we have f−1(S)=g−1(h−1(S))∈σ(g).f^{-1}(S) = g^{-1}(h^{-1}(S)) \in \sigma(g).

For the necessity, we first prove the lemma for the case S=[0,1].\mathsf S = [0,1]. Then using Propositions 2 and 3 we will extend the argument to an arbitrary standard Borel space. This is the typical way to deal with standard Borel spaces.

So suppose that S=[0,1].\mathsf S = [0,1]. If f=1Af = \mathbf{1}_A for A∈σ(g),A \in \sigma(g), then by the definition of σ(g)\sigma(g) there exists a set B∈TB \in \mathscr{T} such that A=g−1(B).A = g^{-1}(B). Then we can write f=1B∘g,f = \mathbf{1}_B \circ g, where 1B ⁣:T→S\mathbf{1}_B \colon \mathsf T \to \mathsf S is of course measurable. Linearity allows us to deduce our desired conclusion for the case when ff is a simple function. For a general σ(g)−\sigma(g)-measurable f,f, we know that we can find a sequence {fn}\{f_n\} of nonnegative simple σ(g)−\sigma(g)-measurable functions with fn↑f.f_n \uparrow f. Therefore, for each nn we may choose measurable hn ⁣:T→Sh_n \colon \mathsf T \to \mathsf S such that fn=hn∘g.f_n = h_n \circ g. Then h:=sup⁡nhnh := \sup_n h_n is again measurable, and we have

f=sup⁡nfn=sup⁡n(hn∘g)=(sup⁡nhn)∘g=h∘g.\begin{aligned} f = \sup_n f_n = \sup_n (h_n \circ g) = \left(\sup_n h_n\right) \circ g = h \circ g.\end{aligned}

Finally, we extend the proof to the general case of S\mathsf S being a standard Borel space. Propositions 2 and 3 imply that there exists an isomorphism ι ⁣:S→[0,1].\iota \colon \mathsf S \to [0,1]. The preceding argument applied to the σ(g)−\sigma(g)-measurable function ι∘f ⁣:Ω→[0,1]\iota \circ f \colon \Omega \to [0,1] implies that there exists a measurable function hι ⁣:T→[0,1]h_\iota \colon \mathsf T \to [0,1] such that ι∘f=hι∘g.\iota \circ f = h_\iota \circ g. But since ι\iota is a bijection, we can write f=(ι−1∘hι)∘g.f = (\iota^{-1} \circ h_\iota) \circ g. The function h:=ι−1∘hι ⁣:T→Sh := \iota^{-1} \circ h_\iota \colon \mathsf T \to \mathsf S is our desired measurable function.

Under the setting of the above lemma, suppose X ⁣:Ω→[0,∞]X \colon \Omega \to [0, \infty] is a random variable and Y ⁣:Ω→TY \colon \Omega \to \mathsf T is a measurable function. Then the lemma above implies that the conditional expectation E[X∣Y]\mathbb{E}[X \mid Y] can be written as h∘Yh \circ Y for some measurable h ⁣:T→[0,∞].h \colon \mathsf T \to [0, \infty].

Notation: We use E[X∣Y=y]\mathbb{E}[X \mid Y=y] to denote h(y).h(y).

Here the non-negativity of XX is inessential, except for ensuring that the conditional expectation exists—we could have assumed XX to be real-valued and integrable.

Before we discuss regular conditional distribution in full generality, let us discuss the simpler concept of regular conditional probability.

Regular Conditional Probability

Let (Ω,F,P)(\Omega, \mathscr{F}, \mathbb P) be a probability space and G\mathscr G be a sub-σ\sigma-algebra of F.\mathscr F. For A∈F,A \in \mathscr F, if we denote with κ(A)\kappa(A) a version of the conditional probability P(A∣G),\mathbb{P}(A \mid \mathscr G), and use κω(A)\kappa_\omega(A) to denote κ(A)(ω),\kappa(A)(\omega), then we have

  1. κ(∅)=0\kappa(\varnothing) = 0 a.s.;

  2. κ(Ω)=1\kappa(\Omega) = 1 a.s.;

  3. the mapping ω↦κω(A)\omega \mapsto \kappa_\omega(A) is G−\mathscr G-measurable for each A∈FA \in \mathscr F; and

  4. by the monotone convergence theorem for conditional expectations, for every disjointed sequence {An}\{A_n\} in F,\mathscr F,

    κω(⋃nAn)=∑nκω(An)\begin{aligned} \kappa_\omega\left( \bigcup_n A_n \right) = \sum_n \kappa_\omega(A_n)\end{aligned}
    for every ω\omega outside a null set.

With these properties the function (ω,A)↦κω(A)(\omega, A) \mapsto \kappa_\omega(A) looks very much like a stochastic kernel. But the fact that the null set in property 4 depends on the sequence {An}\{A_n\} and that there could be uncountably many such sequences, means that κ\kappa is, in general, not a stochastic kernel. When κ\kappa can be made into a stochastic kernel we get a very special object called a regular version of the conditional probability, or simply regular conditional probability.

Definition 5 (Regular conditional probability): Let (Ω,F,P)(\Omega, \mathscr{F}, \mathbb P) be a probability space and G\mathscr G be a sub-σ\sigma-algebra of F.\mathscr F. For A∈FA \in \mathscr F let κ(A)\kappa(A) be a version of the conditional probability P(A∣G).\mathbb{P}(A \mid \mathscr G). Then Ω×F∋(ω,A)↦κω(A)∈[0,1]\Omega \times \mathscr F \ni (\omega, A) \mapsto \kappa_\omega(A) \in [0,1] is said to be a regular version of the conditional probability P(⋅∣G)\mathbb{P}(\cdot \mid \mathscr G) if it is a stochastic kernel from (Ω,G)(\Omega , \mathscr G) to (Ω,F).(\Omega, \mathscr F).

Recall Theorem 2 from a previous blog post which I state here again:

Proposition 6: Under the setting of Definition 5, if XX is a real-valued random variable whose expectation exists, then
ω↦∫ΩX dκω\begin{aligned} \omega \mapsto \int_\Omega X \, \mathrm{d}\kappa_\omega\end{aligned}
is a version of the conditional expectation E[X∣G].\mathbb{E}\left[ X \mid \mathscr G \right].

When does a regular conditional probability exist? Intuitively, we need to impose conditions on either the sub-σ\sigma-algebra G\mathscr G or on the probability space (Ω,F,P).(\Omega, \mathscr{F}, \mathbb P). In the first case, suppose G\mathscr G is generated by a countable partition {An}\{A_n\} of Ω,\Omega, which is the case when G\mathscr G is generated by a random variable taking values in a countable space. Then define

κω(A)=∑nPAn(A) 1An(ω),ω∈Ω, A∈F,\begin{aligned} \kappa_\omega(A) = \sum_n \mathbb{P}_{A_n}(A) \;\mathbf{1}_{A_n}(\omega), \quad \omega \in \Omega, \, A \in \mathscr F,\end{aligned}
where PB(A)\mathbb{P}_B(A) is defined to be any number in [0,1][0,1] satisfying P(A∩B)=P(B) PB(A).\mathbb{P}(A \cap B) = \mathbb{P}(B)\, \mathbb{P}_B(A). This makes κ\kappa a regular conditional probability because A↦PB(A)A \mapsto \mathbb{P}_B(A) is a probability measure.

For the case where G\mathscr{G} could be arbitrary, we have the following result.

Theorem 1: If (Ω,F)(\Omega, \mathscr{F}) is a standard Borel space, then a regular version of the conditional probability P(⋅∣G)\mathbb{P}(\cdot \mid \mathscr G) as in Definition 5 exists.

The proof of this theorem will be a simple consequence of the existence of regular conditional distributions which we discuss next.

Regular Conditional Distribution

Definition 6 (Regular conditional distribution): Let (Ω,F,P)(\Omega, \mathscr{F}, \mathbb P) be a probability space, G\mathscr G be a sub-σ\sigma-algebra of F,\mathscr F, (S,S)(\mathsf S, \mathscr S) be a measurable space, and X ⁣:Ω→SX \colon \Omega \to \mathsf S be a random element. The regular conditional distribution of XX given G\mathscr G, or simply, conditional distribution of XX given G\mathscr G is any stochastic kernel κ\kappa from (Ω,G)(\Omega, \mathscr G) to (S,S)(\mathsf S, \mathscr S) such that κ(B)=P({X∈B}∣G) a.s.,B∈S.\begin{aligned} \kappa(B) = \mathbb{P}(\{X \in B\} \mid \mathscr G) \text{ a.s.}, \quad B \in \mathscr S.\end{aligned}
Theorem 2: Under the setting of Definition 6, if (S,S)(\mathsf S, \mathscr S) is a standard Borel space, then there exists a version of the regular conditional distribution of XX given G.\mathscr G.

(From (Cinlar, 2011) Theorem IV.2.10) As in the proof of Lemma 1, we first give the proof for a special case of S\mathsf S, which here we assume S=R‾:=[−∞,+∞]\mathsf S = \overline{\mathbb R} := [-\infty, +\infty] and S\mathscr S being its Borel σ−\sigma-algebra. For each q∈Q,q \in \mathbb{Q}, define

Cq:=P({X≤q}∣G).\begin{aligned} C_q := \mathbb{P}(\{X \le q\} \mid \mathscr G).\end{aligned}

We shall construct the regular conditional distribution κ\kappa of XX given G\mathscr G from these countably many random variables {Cq}q∈Q.\{C_q\}_{q \in \mathbb Q}. For q<r,q < r, we have {X≤q}⊆{X≤r},\{X \le q \} \subseteq \{X \le r\}, and therefore by the monotonicity of conditional expectations the event

Ωqr={Cq≤Cr}\begin{aligned} \Omega_{qr} = \{C_q \le C_r\}\end{aligned}
is an almost sure event and is in G.\mathscr G. Then the countable intersection
Ω0=⋂q<rq,r∈QΩqr\begin{aligned} \Omega_0 = \bigcap_{\stackrel{q,r \in \mathbb Q}{q < r}} \Omega_{qr}\end{aligned}
is also an almost sure event and is in G.\mathscr G. Fix an arbitrary ω0∈Ω0.\omega_0 \in \Omega_0. Then the mapping
Q∋q↦Cq(ω0)∈[0,1]\begin{aligned} \mathbb{Q} \ni q \mapsto C_q(\omega_0) \in [0,1]\end{aligned}
is non-decreasing, and thus, for each t∈R,t \in \mathbb R, we can define
Ct(ω0)=lim⁡q>tq∈QCq(ω0).\begin{aligned} C_t(\omega_0) = \lim_{\stackrel{q \in \mathbb Q}{q > t}} C_q(\omega_0).\end{aligned}

The resulting extension R∋t↦Ct(ω0)∈[0,1]\mathbb{R} \ni t \mapsto C_t(\omega_0) \in [0,1] is non-decreasing, right-continuous, and satisfies lim⁡t→−∞Ct(ω0)=0\lim_{t \to -\infty} C_t(\omega_0) = 0 and lim⁡t→∞Ct(ω0)=1,\lim_{t \to \infty} C_t(\omega_0) = 1, and therefore is a probability distribution function. Denote with κ‾ω0\overline{\kappa}_{\omega_0} the probability measure on S\mathscr S associated with this probability distribution function. Now define

κω(B):=1Ω0(ω) κ‾ω(B)+1Ω∖Ω0(ω) δ0(B),ω∈Ω,B∈S.\begin{aligned} \kappa_\omega(B) := \mathbf{1}_{\Omega_0}(\omega) \;\overline{\kappa}_\omega(B) + \mathbf{1}_{\Omega \setminus \Omega_0}(\omega) \; \delta_0(B), \quad \omega \in \Omega, B \in \mathscr S.\end{aligned}

We claim that κ\kappa is a regular conditional distribution of XX given G.\mathscr G. Let us verify the required properties one by one—the first two being the two properties in Definition 4 and the last being (1).

  1. We will use Dynkin’s theorem (Theorem 4 here), which is a type of monotone class argument. Consider the collection

    D={B∈S : ω↦κω(B) is G-measurable}.\begin{aligned} \mathscr D = \left\{B \in \mathscr S \; : \; \omega \mapsto \kappa_\omega(B) \text{ is } \mathscr G\text{-measurable}\right\}.\end{aligned}

    κω(S)=1\kappa_\omega(\mathsf S) = 1 for all ω∈Ω\omega \in \Omega and therefore ω↦κω(S)\omega \mapsto \kappa_\omega(\mathsf S) is G−\mathscr G-measurable, showing S∈D.\mathsf S \in \mathscr D. For A⊆BA \subseteq B with A,B∈S,A, B \in \mathscr S, we have κω(B∖A)=κω(B)−κω(A),\kappa_\omega(B \setminus A) = \kappa_\omega(B) - \kappa_\omega(A), and therefore if AA and BB are in D\mathscr D with A⊆BA \subseteq B then so does B∖A.B \setminus A. Finally, if B1⊆B2⊆⋯B_1 \subseteq B_2 \subseteq \cdots is an increasing sequence in D,\mathscr D, then using the continuity of measure from below and the fact that the pointwise limit of measurable functions is again measurable, we get that ⋃nBn∈D.\bigcup_n B_n \in \mathscr D. We conclude that D\mathscr D is a d-system.

    By the Dynkin’s theorem, to show that D=S,\mathscr D = \mathscr S, it is enough to show that D\mathscr D contains the π\pi-system {[−∞,t] : t∈R‾}.\left\{ \lbrack - \infty, t \rbrack \,:\, t \in \overline{\mathbb R}\right\}. For t=+∞t = +\infty we have already shown that [−∞,t]∈D.[-\infty, t] \in \mathscr D. Similarly it is easy to see that for t=−∞t = -\infty we have [−∞,t]=∅∈D.[-\infty, t] = \varnothing \in \mathscr D. Fix a t∈Rt \in \mathbb R and note that we can write

    κω([−∞,t])=1Ω0(ω) Ct(ω)+1Ω∖Ω0(ω) δ0([−∞,t])=lim⁡q>tq∈Q1Ω0(ω) Cq(ω)+1Ω∖Ω0(ω) δ0([−∞,t]).\begin{aligned} \kappa_\omega([-\infty, t]) &= \mathbf{1}_{\Omega_0}(\omega) \; C_t(\omega) + \mathbf{1}_{\Omega \setminus \Omega_0}(\omega) \; \delta_0([-\infty, t]) = \lim_{\stackrel{q \in \mathbb Q}{q > t}} \mathbf{1}_{\Omega_0}(\omega) \; C_q(\omega) + \mathbf{1}_{\Omega \setminus \Omega_0}(\omega) \; \delta_0([-\infty, t]). \end{aligned}

    Since each of {Cq, q∈Q},1Ω0\left\{ C_q,\, q \in \mathbb Q\right\}, \mathbf{1}_{\Omega_0} and 1Ω∖Ω0\mathbf{1}_{\Omega \setminus \Omega_0} is G−\mathscr G-measurable, and δ0([−∞,t])\delta_0([-\infty, t]) is a constant, the map ω↦κω([−∞,t])\omega \mapsto \kappa_\omega([-\infty, t]) is G−\mathscr G-measurable.

    We conclude that ω↦κω(B)\omega \mapsto \kappa_\omega(B) is G−\mathscr G-measurable for each B∈S.B \in \mathscr S.

  2. For each ω∈Ω,\omega \in \Omega, B↦κω(B)B \mapsto \kappa_\omega(B) is clearly a probability measure on S.\mathscr S.

  3. To verify (1), we need to show that ∫Gκ(B) dP=P(G∩{X∈B}),G∈G,B∈S.\begin{aligned} \int_G \kappa(B) \, \mathrm{d}\mathbb{P} = \mathbb{P}(G \cap \{X \in B\}), \quad G \in \mathscr{G}, B \in \mathscr S.\end{aligned} By the same Dynkin’s theorem-type argument as in 1. above, we need to show (2) for B=[−∞,t]B = [-\infty, t] with t∈R.t \in \mathbb R. By the definition of CqC_q we get

    P(G∩{X∈B})=P(G∩{X≤t})=lim⁡q>tq∈QP(G∩{X≤q})=lim⁡q>tq∈Q∫GCq dP.\begin{aligned} \mathbb{P}(G \cap \{X \in B\}) = \mathbb{P}(G \cap \{X \le t\}) = \lim_{\stackrel{q \in \mathbb Q}{q > t}} \mathbb{P}(G \cap \{X \le q\}) = \lim_{\stackrel{q \in \mathbb Q}{q > t}} \int_G C_q \, \mathrm{d}\mathbb{P}.\end{aligned}
    Now note that for ω∈Ω0,\omega \in \Omega_0, Cq(ω)→Ct(ω)=κω(B)C_q(\omega) \to C_t(\omega) = \kappa_\omega(B) as q↓t.q \downarrow t. Therefore using monotone convergence theorem and the fact that Ω0\Omega_0 is of full measure, we can write
    lim⁡q>tq∈Q∫GCq dP=lim⁡q>tq∈Q∫G∩Ω0Cq dP=∫Gκ(B) dP.\begin{aligned} \lim_{\stackrel{q \in \mathbb Q}{q > t}} \int_G C_q \, \mathrm{d}\mathbb{P} = \lim_{\stackrel{q \in \mathbb Q}{q > t}} \int_{G \cap \Omega_0} C_q \, \mathrm{d}\mathbb{P} = \int_G \kappa(B) \, \mathrm{d}\mathbb{P}.\end{aligned}
    This implies (2).

This completes the proof for the special case when S=R‾.\mathsf S = \overline{\mathbb R}. To extend the proof to arbitrary standard Borel spaces, suppose ι ⁣:S→[0,1]\iota \colon \mathsf S \to [0,1] is an isomorphism. The preceding argument applied to the real-valued random variable ι∘X\iota \circ X shows the existence of the regular conditional distribution κι\kappa^\iota of ι∘X\iota \circ X given G.\mathscr G. Now define

κω(B)=κωι(ι(B)),ω∈Ω, B∈S.\begin{aligned} \kappa_\omega(B) = \kappa^\iota_\omega(\iota(B)), \quad \omega \in \Omega,\, B \in \mathscr S.\end{aligned}
Here ι(B)\iota(B) is the image of BB under ι.\iota. It is easy to check that κ\kappa is a stochastic kernel from (Ω,G)(\Omega, \mathscr G) to (S,S).(\mathsf S, \mathscr S). To verify property (1) observe that, for G∈GG \in \mathscr G and B∈S,B \in \mathscr S,
P(G∩{X∈B})=P(G∩{ι∘X∈ι(B)})=∫Gκι(ι(B)) dP=∫Gκ(B) dP.\begin{aligned} \mathbb{P}(G \cap \{X \in B\}) = \mathbb{P}(G \cap \{\iota \circ X \in \iota(B)\}) = \int_G \kappa^\iota(\iota(B)) \, \mathrm{d}\mathbb{P} = \int_G \kappa(B) \, \mathrm{d}\mathbb{P}.\end{aligned}

Regular conditional probabilities and regular conditional distributions are closely related. If κ\kappa is a regular version of the conditional probability P(⋅∣G),\mathbb{P}(\cdot \mid \mathscr G), then κX\kappa^X defined as

κωX(B):=κω({X∈B})\begin{aligned} \kappa_\omega^X(B) := \kappa_\omega(\{X \in B\})\end{aligned}
is easily seen to be a regular conditional distribution of XX given G.\mathscr G. On the other hand, Theorem 1 follows from Theorem 2. Suppose that (Ω,F)(\Omega, \mathscr F) is a standard Borel space and let (S,S)=(Ω,F).(\mathsf S, \mathscr S) = (\Omega, \mathscr F). Define X(ω)=ωX(\omega) = \omega for all ω∈Ω.\omega \in \Omega. Then Theorem 2 gives a regular conditional distribution κ\kappa of XX given G\mathscr G which is precisely a regular version of the conditional probability P(⋅∣G).\mathbb{P}(\cdot \mid \mathscr G).

Suppose in the setting of Definition 6, we also have a measurable space (T,T)(\mathsf T, \mathscr T) and a random element Y ⁣:Ω→T.Y \colon \Omega \to \mathsf T. Then by the conditional distribution of XX given YY we will mean the conditional distribution of XX given σ(Y).\sigma(Y).

Disintegration

Let us first recall the construction of measures on a product space, which is closely tied with disintegrations. Suppose (S,S)(\mathsf S, \mathscr{S}) and (T,T)(\mathsf T, \mathscr{T}) are measurable spaces, μ\mu is a measure on (S,S)(\mathsf S, \mathscr{S}), and κ\kappa is a kernel from (S,S)(\mathsf S, \mathscr{S}) to (T,T)(\mathsf T, \mathscr{T}) that can be written as κ=∑n=1∞κn\kappa = \sum_{n=1}^\infty \kappa_n for kernels κn\kappa_n from (S,S)(\mathsf S, \mathscr{S}) to (T,T)(\mathsf T, \mathscr{T}) that satisfy κn(x,T)<∞\kappa_n(x, \mathsf{T}) < \infty for each x∈Sx \in \mathsf{S} (such kernels κ\kappa are called Σ−\Sigma-finite). If f ⁣:S×T→[−∞,+∞]f \colon \mathsf{S} \times \mathsf{T} \to [-\infty, +\infty] is measurable, recall that x↦f(x,y)x \mapsto f(x,y) is measurable for each y∈Ty \in \mathsf T and y↦f(x,y)y \mapsto f(x,y) is measurable for each x∈S.x \in \mathsf S. If f∈(S⊗T)+f \in (\mathscr S \otimes \mathscr T)_+, then

S∋x↦κf(x):=∫Tf(x,y) κ(x,dy)∈[0,+∞]\begin{aligned} \mathsf S \ni x \mapsto \kappa f(x) := \int_{\mathsf T} f(x,y) \, \kappa(x, \mathrm{d}y) \in [0, +\infty]\end{aligned}
defines a non-negative measurable function. The iterated integral γf≡∫S×Tf dγ:=∫S(∫Tf(x,y) κ(x,dy)) μ(dx)\begin{aligned} \gamma f \equiv \int_{\mathsf S \times \mathsf T} f \, \mathrm{d}\gamma := \int_{\mathsf S} \left( \int_{\mathsf T} f(x,y) \, \kappa(x, \mathrm{d}y)\right)\,\mu(\mathrm{d}x)\end{aligned} for f∈(S⊗T)+f \in (\mathscr S \otimes \mathscr T)_+ defines a measure γ\gamma on the product space (S×T,S⊗T).(\mathsf{S} \times \mathsf T, \mathscr S \otimes \mathscr T). Moreover, if μ\mu is σ−\sigma-finite and κ\kappa is σ−\sigma-bounded (i.e., there exists a measurable partition {Tn}\{\mathsf T_n\} of T\mathsf T such that x↦κ(x,Tn)x \mapsto \kappa(x, \mathsf T_n) is bounded for each nn), then γ\gamma is σ−\sigma-finite and is the unique measure on the product space satisfying
γ(A×B)=∫Aκ(x,B) μ(dx),A∈S,B∈T.\begin{aligned} \gamma(A \times B) = \int_A\kappa(x,B) \, \mu(\mathrm{d} x), \quad A \in \mathscr{S}, B \in \mathscr{T}.\end{aligned}
We denote γ\gamma with μ⊗κ.\mu \otimes \kappa. For the special case when κ(x,B)=ν(B)\kappa(x,B) = \nu(B) for some measure ν\nu on T\mathscr T, like in the example above, we denote γ\gamma with μ⊗ν.\mu \otimes \nu. In this special case we can interchange the order of integrals, i.e.,
∫S(∫Tf(x,y) ν(dy)) μ(dx)=∫T(∫Sf(x,y) μ(dx)) ν(dy),\begin{aligned} \int_{\mathsf S} \left( \int_{\mathsf T} f(x,y) \, \nu( \mathrm{d}y)\right)\,\mu(\mathrm{d}x) = \int_{\mathsf T} \left( \int_{\mathsf S} f(x,y) \, \mu( \mathrm{d}x)\right)\,\nu(\mathrm{d}y),\end{aligned}
for f∈(S⊗T)+f \in (\mathscr S \otimes \mathscr T)_+ (this is known as the Tonelli’s theorem). Also if f ⁣:S×T→[−∞,+∞]f \colon \mathsf{S} \times \mathsf{T} \to [-\infty, +\infty] is μ⊗ν−\mu \otimes \nu-integrable, then x↦f(x,y)x \mapsto f(x,y) is μ−\mu-integrable for ν−\nu-a.e. yy, and y↦f(x,y)y \mapsto f(x,y) is ν−\nu-integrable for μ−\mu-a.e. xx, and the interchange above holds again (this is known as the Fubini’s theorem).

Disintegration asks the converse to the construction of measures on product spaces: Given a measure γ\gamma on the product space (S×T,S⊗T)(\mathsf{S} \times \mathsf T, \mathscr S \otimes \mathscr T) does there exist a measure μ\mu on (S,S)(\mathsf S, \mathscr{S}) and a kernel κ\kappa from (S,S)(\mathsf S, \mathscr{S}) to (T,T)(\mathsf T, \mathscr{T}) such that (3) holds? We will answer this in the affirmative for the special case for probability measures and stochastic kernels. For a more thorough discussion see the paper (Chang and Pollard, 1997).

Theorem 3 (Disintegration): Suppose (S,S)(\mathsf S, \mathscr{S}) and (T,T)(\mathsf T, \mathscr{T}) are measurable spaces with (T,T)(\mathsf T, \mathscr T) being a standard Borel space endowed with its Borel σ−\sigma-algebra, and γ\gamma is a probability measure on the product space (S×T,S⊗T).(\mathsf{S} \times \mathsf T, \mathscr S \otimes \mathscr T). Then there exists a probability measure μ\mu on (S,S)(\mathsf S, \mathscr{S}) and a stochastic kernel κ\kappa from (S,S)(\mathsf S, \mathscr{S}) to (T,T)(\mathsf T, \mathscr{T}) such that (3) holds for all f∈(S⊗T)+.f \in (\mathscr S \otimes \mathscr T)_+.

(From (Cinlar, 2011) Theorem IV.2.18)

We will use Theorem 2 by converting the theorem above to its special case. Define the probability space (Ω,F,P)=(S×T,S⊗T,γ).(\Omega, \mathscr F, \mathbb P) = (\mathsf{S} \times \mathsf T, \mathscr S \otimes \mathscr T, \gamma). Define the random elements Y ⁣:Ω→SY \colon \Omega \to \mathsf S and X ⁣:Ω→TX \colon \Omega \to \mathsf T as the projections (s,t)↦s(s,t) \mapsto s and (s,t)↦t(s,t) \mapsto t respectively. Let μ\mu be the distribution of YY, i.e., μ(A)=γ(A×T)\mu(A) = \gamma(A \times \mathsf T) for every A∈S.A \in \mathscr S. Applying Theorem 2 to G=σ(Y)\mathscr G = \sigma(Y) shows that there exists a version of the regular conditional distribution of XX given G,\mathscr G, which we will denote by κ‾.\overline\kappa. Recall that κ‾\overline\kappa is a stochastic kernel from (Ω,G)(\Omega, \mathscr G) to (T,T)(\mathsf T, \mathscr T) such that

E[g κ‾(B)]=E[1{X∈B}g],B∈T, g∈G+.\begin{aligned} \mathbb{E}\left[ g\,\overline\kappa(B)\right] = \mathbb{E}\left[\mathbf{1}_{\{X \in B\}} g\right], \quad B \in \mathscr T, \, g \in \mathscr G_+.\end{aligned}

By the structure of YY, we see that G\mathscr G consists of measurable rectangles of the form A×TA \times \mathsf T for A∈S.A \in \mathscr S. Therefore, the Doob-Dynkin factorization lemma implies that a function g ⁣:Ω→[0,∞]g \colon \Omega \to [0, \infty] is G−\mathscr G-measurable if and only if g((s,t))=g‾(s)g((s,t)) = \overline{g}(s) for some measurable g‾ ⁣:S→[0,∞].\overline{g} \colon \mathsf S \to [0, \infty]. Now using equation (4), we conclude that κ‾((s,t),B)=κ(s,B)\overline \kappa((s,t), B) = \kappa(s, B) for some stochastic kernel κ\kappa from (S,S)(\mathsf S, \mathscr S) to (T,T).(\mathsf T, \mathscr T).

If A∈SA \in \mathscr S and B∈TB \in \mathscr T, equation (4) allows to write

γ(A×B)=E[1{Y∈A}1{X∈B}]=E[1{Y∈A}κ(B)]=∫S1A(s)κ(s,B) μ(ds)\begin{aligned} \gamma(A \times B) = \mathbb{E}\left[\mathbf{1}_{\{Y \in A\}} \mathbf{1}_{\{X \in B\}}\right] = \mathbb{E}\left[\mathbf{1}_{\{Y \in A\}}\kappa(B)\right] = \int_{\mathsf S} \mathbf{1}_A(s) \kappa(s,B) \,\mu(\mathrm{d}s)\end{aligned}
which is equation (3) for f=1A×B.f = \mathbf{1}_{A \times B}. Finally, a monotone class argument proves (3) for all f∈(S⊗T)+.f \in (\mathscr S \otimes \mathscr T)_+.

Now a natural question is if μ\mu is a probability measure, corresponding to the law of a random variable Y ⁣:Ω→S,Y \colon \Omega \to \mathsf S, and κ\kappa is a stochastic kernel, such that the product measure μ⊗κ\mu \otimes \kappa corresponds to the law of a random vector (Y,X) ⁣:Ω→S×T,(Y, X) \colon \Omega \to \mathsf{S} \times \mathsf T, with X ⁣:Ω→TX \colon \Omega \to \mathsf T being some random variable, can we associate κ\kappa with the conditional distribution for XX given Y?Y? The next theorem answers this question.

Theorem 4: Suppose (Ω,F,P)(\Omega, \mathscr F, \mathbb P) is a probability space, (S,S)(\mathsf S, \mathscr{S}) and (T,T)(\mathsf T, \mathscr{T}) are measurable spaces, and Y ⁣:Ω→SY \colon \Omega \to \mathsf S and X ⁣:Ω→TX \colon \Omega \to \mathsf T are random elements such that the law of YY is μ\mu and the law of (Y,X)(Y, X) is μ⊗κ\mu \otimes \kappa for a stochastic kernel κ\kappa from (S,S)(\mathsf S, \mathscr{S}) to (T,T).(\mathsf T, \mathscr{T}). Denote G=σ(Y).\mathscr G = \sigma(Y). Then the stochastic kernel η\eta from (Ω,G)(\Omega, \mathscr{G}) to (T,T)(\mathsf T, \mathscr T) defined by
η(ω,B):=κ(Y(ω),B),ω∈Ω,B∈T,\begin{aligned} \eta(\omega, B) := \kappa(Y(\omega), B), \quad \omega \in \Omega, B \in \mathscr T,\end{aligned}
is a version of the conditional distribution of XX given Y.Y. Moreover, for every measurable f ⁣:S×T→[0,∞],f \colon \mathsf S \times \mathsf T \to [0, \infty], E[f(Y,X)∣G]=∫Tf(Y,t) κ(Y,dt).\begin{aligned} \mathbb{E}\left[f(Y,X) \mid \mathscr G\right] = \int_{\mathsf T}f(Y, t) \, \kappa(Y, \mathrm{d}t).\end{aligned}

The proof for the statement about η\eta follows the same line of reasoning as the proof of Theorem 3.

To see (5), note that for h∈T+h \in \mathscr T_+ and g∈S,g \in \mathscr S, property (3) for μ⊗κ\mu \otimes \kappa implies that

E[g(Y)h(X)]=∫S×Tg(s)h(t) d(μ⊗κ)(s,t)=∫S(∫Tg(s)h(t) κ(s,dt)) μ(ds)=E[g(Y)∫Th(t) κ(Y,dt)].\begin{aligned} \mathbb{E}[g(Y)h(X)] = \int_{\mathsf S \times \mathsf T} g(s) h(t) \, \mathrm{d}(\mu \otimes \kappa)(s,t) = \int_{\mathsf S} \left( \int_{\mathsf T} g(s)h(t) \, \kappa(s, \mathrm{d}t)\right)\,\mu(\mathrm{d}s) = \mathbb{E}\left[g(Y) \int_{\mathsf T} h(t) \, \kappa(Y, \mathrm{d}t)\right]. \end{aligned}

Since every function in G+\mathscr G_+ is of the form g(Y),g(Y), we get

E[h(X)∣G]=∫Th(t) κ(Y,dt).\begin{aligned} \mathbb{E}[h(X) \mid \mathscr G] = \int_{\mathsf T} h(t) \, \kappa(Y, \mathrm{d}t).\end{aligned}

Now if f∈(S⊗T)+f \in (\mathscr S \otimes \mathscr T)_+ is such that it is the product f=g⋅h,f = g \cdot h, then since g(Y)g(Y) is G−\mathscr G-measurable, we get

E[f(Y,X)∣G]=g(Y)E[h(X)∣G]=g(Y)∫Th(t) κ(Y,dt)=∫Tf(Y,t) κ(Y,dt).\begin{aligned} \mathbb{E}\left[f(Y,X) \mid \mathscr G\right] = g(Y) \mathbb{E}[h(X) \mid \mathscr G] = g(Y)\int_{\mathsf T} h(t) \, \kappa(Y, \mathrm{d}t) = \int_{\mathsf T}f(Y, t) \, \kappa(Y, \mathrm{d}t).\end{aligned}

Finally, a monotone class argument finishes the proof.

Although we won’t be needing it, let me briefly mention the notion of generalized disintegration.

Definition 7 (General disintegration): Let (E,E)(\mathsf E, \mathscr E) and (S,S)(\mathsf S, \mathscr{S}) be measurable spaces, ψ ⁣:E→S\psi \colon \mathsf E \to \mathsf S be a measurable mapping, γ\gamma be a measure on (E,E),(\mathsf E, \mathscr E), and μ\mu be a measure on (S,S).(\mathsf S, \mathscr S). We call a kernel κ\kappa from (S,S)(\mathsf S, \mathscr{S}) to (E,E)(\mathsf E, \mathscr{E}) a (ψ,μ)−(\psi, \mu)-disintegration of γ\gamma if

  1. κx{ψ≠x}=0\kappa_x\{\psi \neq x\} = 0 for μ−\mu-a.e. xx, and

  2. we have the following iterated integral for each f∈E+,f \in \mathscr E_+,

∫Ef dγ=∫S(∫Ef(y) κx(dy))μ(dx).\begin{aligned} \int_{\mathsf E} f \, \mathrm{d}\gamma = \int_{\mathsf S} \left( \int_{\mathsf E} f(y) \,\kappa_x(\mathrm{d}y) \right) \mu(\mathrm{d}x).\end{aligned}

Note that, because of property 1, we can write (6) as

∫Ef dγ=∫S(∫{ψ=x}f(y) κx(dy))μ(dx).\begin{aligned} \int_{\mathsf E} f \, \mathrm{d}\gamma = \int_{\mathsf S} \left( \int_{\{\psi=x\}} f(y) \,\kappa_x(\mathrm{d}y) \right) \mu(\mathrm{d}x).\end{aligned}

The disintegration discussed in Theorem 3 is a special case of the disintegration discussed in Definition 7. To see this, let (E,E)(\mathsf E, \mathscr E) be the product space (S×T,S⊗T)(\mathsf{S} \times \mathsf T, \mathscr S \otimes \mathscr T) and ψ ⁣:S×T→S\psi \colon \mathsf S \times \mathsf T \to \mathsf S be the canonical projection. {ψ=x}\{\psi = x\} is then simply T\mathsf T and equation (6) becomes equation (3).

The following existence theorem is taken from Pollard’s book (Pollard, 2010).

Theorem 5: Under the setting of Definition 7, assume that

  1. (E,E)(\mathsf E, \mathscr E) is a metric space endowed with its Borel σ−\sigma-algebra,

  2. γ\gamma and μ\mu are σ−\sigma-finite with γ\gamma being a Radon measure (i.e., γ(K)<∞\gamma(K) < \infty for each compact KK and γ(B)=sup⁡K⊆Bγ(K),\gamma(B) = \sup_{K \subseteq B} \gamma(K), the supremum being taken over compact sets, for each B∈EB \in\mathscr E),

  3. the image measure γ∘ψ−1\gamma \circ \psi^{-1} of γ\gamma under ψ\psi is absolutely continuous with respect to μ,\mu, and

  4. the graph ⟦ψ⟧:={(y,x)∈(E,S):ψ(y)=x}\llbracket \psi \rrbracket := \{(y,x) \in (\mathsf E, \mathsf S) : \psi(y) = x\} is contained in the product σ−\sigma-algebra E⊗S.\mathscr E \otimes \mathscr S.

Then γ\gamma has a (ψ,μ)−(\psi, \mu)-disintegration κ\kappa, unique up to a μ−\mu-equivalence, in the sense that if κ‾\overline \kappa is another (ψ,μ)−(\psi, \mu)-disintegration, then μ{x∈S:κx≠κ‾x}=0.\mu\{x \in \mathsf S : \kappa_x \neq \overline\kappa_x\} = 0.

As an example of a Radon measure, every σ−\sigma-finite measure on the Borel σ−\sigma-algebra of a Polish space which assigns finite measure to compact sets is Radon.

As a curiosity check out lifting theory.

MARKOV DECISION PROCESS

Markov Decision Model

Let us start by defining the moving parts of a Markov decision process. Our model evolves through time such that we can observe the state of the model and take admissible actions at discrete times n=0,1,2,….n = 0, 1, 2, \ldots. We will say n≥0n \ge 0 to mean nn is a non-negative integer.

State Space

We denote by Sn\mathsf{S}_n the state space of the model at time n≥0.n \ge 0. We will assume that for each n≥0n \ge 0, Sn\mathsf{S}_n is a standard Borel space endowed with its Borel σ−\sigma-algebra.

Action Space

We denote by An\mathsf A_n the action space at time n≥0.n \ge 0. This is the set from which possible actions can be chosen at time n.n. It is possible that the admissible actions at time nn is a strict subset of An\mathsf A_n depending on the state of the model. We will again assume that for each n≥0n \ge 0, An\mathsf A_n is a standard Borel space endowed with its Borel σ−\sigma-algebra.

Admissible Actions

For each n≥0n \ge 0, we have a mapping

αn ⁣:Sn→An\begin{aligned} \alpha_n \colon \mathsf S_n \to \mathscr A_n\end{aligned}
from the state space Sn\mathsf S_n to the measurable subsets of the action space An\mathsf A_n, which assigns to each x∈Snx \in \mathsf S_n the set αn(x)\alpha_n(x) of admissible actions. We will assume that
⟦αn⟧∈Sn⊗An,∀ n≥0,\begin{aligned} \llbracket\alpha_n\rrbracket \in \mathscr S_n \otimes \mathscr A_n, \quad \forall \; n \ge 0,\end{aligned}
and that
there exists a measurable fn ⁣:Sn→An such that ⟦fn⟧⊆⟦αn⟧,∀ n≥0.\begin{aligned} \text{there exists a measurable } f_n \colon \mathsf S_n \to \mathsf A_n \text{ such that } \llbracket f_n \rrbracket \subseteq \llbracket \alpha_n \rrbracket, \quad \forall \; n \ge 0.\end{aligned}
Here the notation

⟦αn⟧:={(x,a)∈Sn×An∣a∈αn(x)}⟦fn⟧:={(x,a)∈Sn×An∣a=fn(x)}\begin{aligned} \llbracket\alpha_n\rrbracket &:= \{(x,a) \in \mathsf S_n \times \mathsf A_n \mid a \in \alpha_n(x)\} \\ \llbracket f_n\rrbracket &:= \{(x,a) \in \mathsf S_n \times \mathsf A_n \mid a= f_n(x)\} \end{aligned}

denotes the graphs of αn\alpha_n and fnf_n respectively. For a justification of these assumptions, see the section “A Note About Admissible Actions” below.

Transition Law

For each time n≥0n \ge 0, we have a stochastic kernel

κn ⁣:⟦αn⟧×Sn+1→[0,1]\begin{aligned} \kappa_n \colon \llbracket\alpha_n\rrbracket \times \mathscr S_{n+1} \to [0,1]\end{aligned}
from the graph ⟦αn⟧\llbracket\alpha_n\rrbracket (endowed with the Borel σ−\sigma-algebra on the subspace topology) to Sn+1\mathsf S_{n+1}, called the transition law. Therefore, if at time nn the model’s state is xnx_n and we took an admissible action ana_n, then the probability of finding the model in state B∈Sn+1B \in \mathscr S_{n+1} at time n+1n+1 is κn((xn,an),B).\kappa_n((x_n, a_n), B).

Reward Function

For each time n≥0n \ge 0, we have a measurable reward function

rn ⁣:⟦αn⟧×Sn+1→[−∞,∞).\begin{aligned} r_n \colon \llbracket \alpha_n \rrbracket \times \mathsf S_{n+1} \to [-\infty, \infty).\end{aligned}
For (xn,an)∈⟦αn⟧(x_n, a_n) \in \llbracket \alpha_n \rrbracket and xn+1∈Sn+1x_{n+1} \in \mathsf S_{n+1}, rn((xn,an),xn+1)r_n((x_n, a_n), x_{n+1}) models the reward received at time nn when at state xnx_n the admissible action ana_n was taken and the system transitioned to state xn+1.x_{n+1}. Under many performance criteria, it will suffice to model the rewards using r‾n ⁣:⟦αn⟧→[−∞,∞)\overline r_n \colon \llbracket \alpha_n \rrbracket \to [-\infty, \infty) which we can get from rnr_n (assuming appropriate integrability) using
r‾n(x,a)=∫Sn+1rn((x,a),y)κn((x,a),dy),\begin{aligned} \overline r_n(x,a) = \int_{\mathsf S_{n+1}} r_n((x,a),y) \kappa_n((x,a), \mathrm{d}y),\end{aligned}
and, in fact, moving forward, we will assume that rnr_n has the form
rn ⁣:⟦αn⟧→[−∞,∞).\begin{aligned} r_n \colon \llbracket \alpha_n \rrbracket \to [-\infty, \infty).\end{aligned}

Stationary Markov Decision Model

The sequence

{(Sn,An,αn,κn,rn)}n≥0\begin{aligned} \left\{\left(\mathsf S_n, \mathsf A_n, \alpha_n, \kappa_n, r_n\right)\right\}_{n \ge 0}\end{aligned}
of tuples defined above is called the non-stationary Markov decision model. We can find an equivalent stationary Markov decision model (S,A,α,κ,r)(\mathsf S, \mathsf A, \alpha, \kappa, r) from a non-stationary Markov decision model by a standard augmentation procedure:

Define the tuple (S,A,α,κ,r)(\mathsf S, \mathsf A, \alpha, \kappa, r) as follows:

S:={(x,n)∣x∈Sn,n≥0},A:={(a,n)∣x∈An,n≥0},S∋(x,n)↦α((x,n)):={(a,t)∈A∣a∈αn(x)},κ(((x,n),(a,n)),{(b,n+1)∣b∈B}):=κn((x,a),B),B∈Sn+1,⟦α⟧∋((x,n),(a,n))↦r((x,n),(a,n)):=rn(x,a).\begin{aligned} \mathsf S &:= \{(x,n) \mid x \in \mathsf S_n, n \ge 0\},\\ \mathsf A &:= \{(a,n) \mid x \in \mathsf A_n, n \ge 0\},\\ \mathsf S \ni (x,n) \mapsto \alpha((x,n)) &:= \{(a,t) \in \mathsf A \mid a \in \alpha_n(x)\}, \\ \kappa(((x,n), (a,n)), \{(b,n+1) \mid b \in B\}) &:= \kappa_n((x,a), B), \quad B \in \mathscr S_{n+1}, \\ \llbracket \alpha\rrbracket \ni ((x,n), (a,n)) \mapsto r((x,n), (a,n)) &:= r_n(x,a). \end{aligned}

We will thus assume a stationary Markov decision model from now on.

Definition 8: A Markov decision model is a tuple

(S,A,α,κ,r)\begin{aligned} (\mathsf S, \mathsf A, \alpha, \kappa, r)\end{aligned}
consisting of

  1. the state space S\mathsf S which is a standard Borel space;

  2. the action space or the control space A\mathsf A which is a standard Borel space;

  3. the mapping α ⁣:S→A\alpha \colon \mathsf S \to \mathscr A from the state space to the measurable subsets of the action space, which assigns to each x∈Sx \in \mathsf S the set α(x)\alpha(x) of admissible actions satisfying the assumptions: ⟦α⟧∈S⊗A,\begin{aligned} \llbracket\alpha\rrbracket \in \mathscr S \otimes \mathscr A,\end{aligned} there exists a measurable f ⁣:S→A such that ⟦f⟧⊆⟦α⟧;\begin{aligned} \text{there exists a measurable } f \colon \mathsf S \to \mathsf A \text{ such that } \llbracket f \rrbracket \subseteq \llbracket \alpha \rrbracket;\end{aligned}

  4. the stochastic kernel κ\kappa from the graph ⟦α⟧\llbracket \alpha \rrbracket of α\alpha to S\mathsf S called the transition law; and

  5. the measurable reward function r ⁣:⟦α⟧→[−∞,∞).r \colon \llbracket \alpha \rrbracket \to [-\infty, \infty).

A Note About Admissible Actions

The raison d'être for the assumptions (7) and (8) is to avoid measurability hell. This is the topic of measurable selection theorems. I discussed these theorems under special cases in two previous blog posts for their applications to general theory of processes (they are called section theorems there which means the same thing as selection theorems).

Let us very briefly discuss measurable selection in a general setting. Let (T,T)(\mathsf T, \mathscr T) be a measurable space, X\mathsf X be a topological space, and ϕ ⁣:T→P(X)\phi \colon \mathsf T \to \mathfrak{P}(\mathsf X) be a set-valued function (also called a multifunction or a correspondence) taking values in the class of all subsets of X.\mathsf X. We say that a multifunction ϕ\phi is closed if ϕ(t)\phi(t) is closed for each t∈T.t \in \mathsf T. Note that ϕ\phi can be equivalently identified with a subset of T×X.\mathsf T \times \mathsf X. A selection (also called a section) of ϕ\phi is a function f ⁣:T→Xf \colon \mathsf T \to \mathsf X such that f(t)∈ϕ(t)f(t) \in \phi(t) for each t∈T.t \in \mathsf T. If ϕ(t)≠∅\phi(t) \neq \varnothing for each t∈Tt \in \mathsf T, then at least one selection exists by the axiom of choice. Note that writing ⟦f⟧⊆⟦ϕ⟧\llbracket f \rrbracket \subseteq \llbracket \phi \rrbracket is same as saying ff is a selection of ϕ.\phi. If we denote

S(ϕ):={f ⁣:T→X∣f is a measurable selection of ϕ},\begin{aligned} \mathfrak{S}(\phi) := \{f \colon \mathsf T \to \mathsf X \mid f \text{ is a measurable selection of }\phi\},\end{aligned}
then measurable selection theorems tell us when S(ϕ)\mathfrak{S}(\phi) is nonempty. Note that if the σ−\sigma-algebra T\mathscr T is P(T),\mathfrak{P}(\mathsf T), for example if T\mathsf T is countable, then any function f ⁣:T→Xf \colon \mathsf T \to \mathsf X satisfying ⟦f⟧⊆⟦ϕ⟧\llbracket f \rrbracket \subseteq \llbracket \phi \rrbracket is measurable.

To be able to study measurability of selections it seems natural to first define measurability of multifunctions, and then relate the two notions. It turns out doing so isn’t straightforward. But before we get to measurability, we need a notion of inverse for multifunctions, of which there are two natural ones. The upper inverse ϕ∗\phi^{*} and the lower inverse ϕ∗\phi_* are defined by

ϕ∗(A):={t∈T:ϕ(t)⊆A},A⊆X,ϕ∗(A):={t∈T:ϕ(t)∩A≠∅},A⊆X.\begin{aligned} \phi^*(A) &:= \{t \in \mathsf T : \phi(t) \subseteq A\}, \quad A \subseteq \mathsf X, \\ \phi_*(A) &:= \{t \in \mathsf T : \phi(t) \cap A \neq \varnothing \}, \quad A \subseteq \mathsf X. \end{aligned}

Note that ϕ∗(A)=X∖ϕ∗(X∖A)\phi^*(A) = \mathsf X \setminus \phi_*(\mathsf X \setminus A), and therefore we can equivalently use either of the two inverses to define measurability notions. We say that ϕ\phi is

  1. weakly measurable, if ϕ∗(G)∈T\phi_*(G) \in \mathscr T for each open G⊆XG \subseteq \mathsf X;

  2. measurable, if ϕ∗(F)∈T\phi_*(F) \in \mathscr T for each closed F⊆XF \subseteq \mathsf X;

  3. Borel measurable, if ϕ∗(B)∈T\phi_*(B) \in \mathscr T for each Borel subset B⊆X.B \subseteq \mathsf X.

For the inverses we have that

ϕ∗(⋂i∈IAi)=⋂i∈Iϕ∗(Ai) and ϕ∗(⋃i∈IAi)=⋃i∈Iϕ∗(Ai),\begin{aligned} \phi^*\left(\bigcap_{i \in I} A_i\right) = \bigcap_{i \in I}\phi^*(A_i) \text{ and } \phi_*\left(\bigcup_{i \in I} A_i\right) = \bigcup_{i \in I}\phi_*(A_i),\end{aligned}

but unlike functions, the inverses of multifunctions don’t behave well with complements, thereby necessitating three notions of measurability above.

The most well-known measurable selection theorem is the Kuratowski–Ryll-Nardzewski selection theorem, which states that a weakly measurable closed multifunction into a Polish space admits a measurable selection. It can be shown that a weakly measurable closed multifunction into a separable metrizable space has measurable graph (in the product σ−\sigma-algebra), and conversely if a closed multifunction into a separable metrizable space is compact-valued such that its graph is measurable, then it is weakly measurable. The converse allows usage of Kuratowski–Ryll-Nardzewski selection theorem to justify existence of a measurable selection. This explains why many papers and books in control, instead of having the lazy assumption (8), assume that the mapping α\alpha in definition 8 is compact-valued, an assumption which also has the advantage of being more explicit and avoiding inconsistencies.

Assumption (8) circumvents bringing conditions for measurable selection theorems in our discussion ahead, while assumption (7) allows us to define κ.\kappa. For more details check the two review papers (Wagner, 1977), (Wagner, 1980) or Chapter 18 of the book (Aliprantis and Border, 2006).

Policy

A policy π={πn}n≥0\pi = \{\pi_n\}_{n \ge 0}, also known as an admissible control, is a sequence of prescriptions πn\pi_n that at time nn gives a rule for selecting an action. πn\pi_n can be a randomized procedure or a deterministic procedure; it can depend on the entire history of the model or only on the current state. Let us formalize this concept.

History

Definition 9: For each time n≥0n \ge 0, define the space Hn\mathsf H_n of admissible histories up to time nn by H0=S\mathsf H_0 = \mathsf S, and
Hn=S×⟦α⟧n=Hn−1×⟦α⟧,n≥1.\begin{aligned} \mathsf H_n = \mathsf S \times \llbracket \alpha \rrbracket ^n = \mathsf H_{n-1} \times \llbracket \alpha \rrbracket, \quad n \ge 1.\end{aligned}

An element hn∈Hnh_n \in \mathsf H_n is of the form hn=(x0,a0,x1,a1,…,xn−1,an−1,xn).h_n = (x_0, a_0, x_1, a_1, \ldots, x_{n-1}, a_{n-1}, x_n).

Definition 10: A policy π={πn}n≥0\pi = \{\pi_n\}_{n \ge 0} is a sequence of stochastic kernels πn\pi_n from Hn\mathsf H_n to A\mathsf A subject to the constraint πn(hn,α(xn))=1,∀ hn∈Hn,n≥0.\begin{aligned} \pi_n(h_n, \alpha(x_n)) = 1, \quad \forall \; h_n \in \mathsf H_n, n \ge 0.\end{aligned} The set of all policies is denoted by Π.\Pi.

Classes of Policies

The largest class of policies we consider is Π\Pi defined above. If instead of using the entire history, the policy makes a decision using only the current state, then we get a Markov policy.

Definition 11: If a policy π={πn}n≥0∈Π\pi = \{\pi_n\}_{n \ge 0} \in \Pi is such that for each n≥0n \ge 0, there exists a stochastic kernel φn\varphi_n from S\mathsf S to A\mathsf A such that
πn(hn,⋅)=φn(xn,⋅),∀ hn=(x0,a0,…,xn−1,an−1,xn)∈Hn,\begin{aligned} \pi_n(h_n, \cdot) = \varphi_n(x_n, \cdot), \quad \forall \; h_n = (x_0, a_0, \ldots, x_{n-1}, a_{n-1}, x_n) \in \mathsf H_n,\end{aligned}
then π\pi is called a Markov policy. We denote the set of all Markov policies by ΠM.\Pi_M.

We will sometimes abuse notation and write π={φn}n≥0\pi = \{\varphi_n\}_{n \ge 0} for a Markov policy, where φn\varphi_n are the stochastic kernels as above. Even more simply, if our policy at each time doesn’t depend on the time but only on the current state, we get a stationary policy. A stationary policy is necessarily Markovian.

Definition 12: If a policy π={πn}n≥0∈Π\pi = \{\pi_n\}_{n \ge 0} \in \Pi is such that there exists a stochastic kernel φ\varphi from S\mathsf S to A\mathsf A such that for each n≥0n \ge 0,
πn(hn,⋅)=φ(xn,⋅),∀ hn=(x0,a0,…,xn−1,an−1,xn)∈Hn,\begin{aligned} \pi_n(h_n, \cdot) = \varphi(x_n, \cdot), \quad \forall \; h_n = (x_0, a_0, \ldots, x_{n-1}, a_{n-1}, x_n) \in \mathsf H_n,\end{aligned}
then π\pi is called a stationary policy. We denote the set of all stationary policies by ΠS.\Pi_S.

What about deterministic policies?

Definition 13: A policy ϕ={fn}n≥0\phi = \{f_n\}_{n \ge 0} is called a deterministic policy if it is a sequence of measurable functions fn ⁣:Hn→Af_n \colon \mathsf H_n \to \mathsf A such that fn(hn)∈α(xn)f_n(h_n) \in \alpha(x_n) for all hn∈Hnh_n \in \mathsf H_n and n≥0.n \ge 0. We denote the set of deterministic policies by ΠD.\Pi_D. Similar to definitions 11 and 12, we can define the class of deterministic Markov policies ΠDM\Pi_{DM} and deterministic stationary policies ΠDS.\Pi_{DS}.

The set Π\Pi contains these deterministic policies, as can be easily seen by observing that for the deterministic policy ϕ={fn}n≥0\phi = \{f_n\}_{n \ge 0} the corresponding policy π={πn}n≥0\pi = \{\pi_n\}_{n \ge 0} is given by

πn(hn,C)=δfn(hn)(C),hn∈Hn,C∈A.\begin{aligned} \pi_n(h_n, C) = \delta_{f_n(h_n)}(C), \quad h_n \in \mathsf H_n, C \in \mathscr A.\end{aligned}

We thus have the following inclusions:

ΠDS⊆ΠS⊆ΠM⊆Π, ΠDS⊆ΠDM⊆ΠD⊆Π, ΠDM⊆ΠM.\begin{aligned} \Pi_{DS} \subseteq\Pi_S \subseteq \Pi_{M} \subseteq \Pi, \; \Pi_{DS} \subseteq \Pi_{DM} \subseteq \Pi_{D} \subseteq \Pi, \; \Pi_{DM} \subseteq \Pi_{M}.\end{aligned}

Canonical Construction

A natural question now arises to the suspicious reader about the existence of a probability space on which the random quantities discussed above are from. More precisely:

Given a Markov decision model (S,A,α,κ,r)(\mathsf S, \mathsf A, \alpha, \kappa, r), a policy π∈Π,\pi \in \Pi, and a probability measure ν\nu on S\mathsf S, does there exist a probability space (Ω,F,Pνπ),(\Omega, \mathscr{F}, \mathbb{P}_{\nu}^{\pi}), and two stochastic processes {Xn}n≥0\{X_n\}_{n \ge 0} and {An}n≥0\{A_n\}_{n \ge 0} on this probability space, with the random variable XnX_n taking values in S\mathsf S and the random variable AnA_n taking values in A\mathsf A for each n≥0n \ge 0, such that the following three properties hold true?

  1. The law of X0X_0 equals ν\nu, i.e.,

    Pνπ{X0∈B}=ν(B),B∈S.\begin{aligned} \mathbb{P}_\nu^\pi\{X_0 \in B\} = \nu(B), \quad B \in \mathscr S.\end{aligned}
  2. If Hn=(X0,A0,…,Xn−1,An−1,Xn) ⁣:Ω→HnH_n = (X_0, A_0, \ldots, X_{n-1}, A_{n-1}, X_n) \colon \Omega \to \mathsf{H}_n denotes the history random variable, the joint distribution of (Hn,An)(H_n,A_n) is given by (Pνπ∘Hn−1)⊗πn.(\mathbb{P}_\nu^\pi \circ H_n^{-1}) \otimes \pi_n. More intuitively, by Theorem 4, this means that the stochastic kernel π‾n\overline{\pi}_n from (Ω,σ(Hn))(\Omega, \sigma(H_n)) to (A,A)(\mathsf{A}, \mathscr A) defined by π‾n(ω,C)=πn(Hn(ω),C),ω∈Ω, C∈A,\begin{aligned} \overline\pi_n(\omega, C) = \pi_n(H_n(\omega), C), \quad \omega \in \Omega,\, C \in\mathscr A,\end{aligned} is a version of the conditional distribution of AnA_n given Hn.H_n.

  3. The joint distribution of (Hn,An,Xn+1)(H_n, A_n, X_{n+1}) is given by (Pνπ∘(Hn,An)−1)⊗κ.(\mathbb{P}^\pi_\nu \circ (H_n, A_n)^{-1}) \otimes \kappa. More intuitively, by Theorem 4, this means that the stochastic kernel κ‾n\overline\kappa_n from (Ω,σ(Hn,An))(\Omega, \sigma(H_{n}, A_n)) to (S,S)(\mathsf S, \mathscr S) defined by κ‾n(ω,B)=κ((Xn(ω),An(ω)),B),ω∈Ω, B∈S,\begin{aligned} \overline\kappa_n(\omega, B) = \kappa((X_n(\omega), A_n(\omega)), B), \quad \omega \in \Omega,\, B \in \mathscr S,\end{aligned} is a version of the conditional distribution of Xn+1X_{n+1} given (Hn,An).(H_n, A_n).

The answer to our question is, of course, yes. At this point recall the Ionescu-Tulcea theorem:

Theorem 6 [Ionescu-Tuclea]: Let {En,En}n≥0\{\mathsf E_n, \mathscr{E}_n\}_{n \ge 0} be sequence of arbitrary measurable spaces. For each n≥0n \ge 0, let ηn+1\eta_{n+1} be a stochastic kernel from (E0×⋯×En,E0⊗⋯⊗En)(\mathsf E_0\times \cdots \times \mathsf E_n, \mathscr{E}_0 \otimes \cdots \otimes \mathscr{E}_n) to (En+1,En+1)(\mathsf E_{n+1}, \mathscr{E}_{n+1}). Finally, let μ\mu be a probability measure on (E0,E0)(\mathsf E_{0}, \mathscr{E}_{0}). Then there exists a unique probability measure P\mathbb P on the measurable space (E,E)=(E0×E1×⋯ ,E0⊗E1⊗⋯ )(\mathsf E, \mathscr{E}) = (\mathsf E_0\times \mathsf E_1\times \cdots, \mathscr{E}_0 \otimes \mathscr{E}_1 \otimes \cdots) whose value on every cylinder set B=B0×⋯×Bm×Em+1×Em+2×⋯B = B_0 \times \cdots \times B_m \times \mathsf E_{m+1} \times \mathsf E_{m+2} \times \cdots for all m≥0m \ge 0, where Bi∈EiB_i \in \mathscr E_i for i=0,…,mi = 0, \ldots, m, is given by
P(B)=∫B0μ(dx0)∫B1η1(x0,dx1)⋯∫Bmηm((x0,x1,…,xn−1),dxn).\begin{aligned} \mathbb P(B) = \int_{B_0} \mu(\mathrm{d}x_0) \int_{B_1} \eta_1(x_0, \mathrm{d}x_1)\cdots \int_{B_m} \eta_m((x_0, x_1, \ldots, x_{n-1}), \mathrm{d}x_n).\end{aligned}
More generally, for any non-negative random variable ZZ on (E,E)(\mathsf E, \mathscr{E}) which only depends on the coordinates up to some finite index m≥0m \ge 0, we have
∫EZ dP=∫B0μ(dx0)∫B1η1(x0,dx1)⋯∫Bmηm((x0,x1,…,xn−1),dxn)Z(x0,…,xm).\begin{aligned} \int_{\mathsf E} Z \, \mathrm{d}\mathbb{P} = \int_{B_0} \mu(\mathrm{d}x_0) \int_{B_1} \eta_1(x_0, \mathrm{d}x_1)\cdots \int_{B_m} \eta_m((x_0, x_1, \ldots, x_{n-1}), \mathrm{d}x_n) Z(x_0, \ldots, x_m).\end{aligned}

To this end, define

Ω=(S×A)∞\begin{aligned} \Omega = (\mathsf S \times \mathsf A)^{\infty}\end{aligned}
and F\mathscr{F} to be the product σ−\sigma-algebra on Ω\Omega. The elements of Ω\Omega are sequences of the form ω=(x0,a0,x1,a1,…).\omega = (x_0, a_0, x_1, a_1, \ldots). Comparing our formulation to the one in Theorem 6, we let E2n\mathsf E_{2n} correspond to S\mathsf S and E2n+1\mathsf E_{2n+1} correspond to A\mathsf A for each n≥0.n \ge 0. We let μ\mu correspond to ν.\nu. We let η2n\eta_{2n} correspond to the stochastic kernel πn\pi_n from (S×A)n×S(\mathsf S \times \mathsf A)^n \times \mathsf S to A\mathsf A, and we let η2n+1\eta_{2n+1} correspond to the stochastic kernel from (S×A)n+1(\mathsf S \times \mathsf A)^{n+1} to S\mathsf S obtained from κ\kappa, for each n≥0.n \ge 0. More concretely,
η2n+1((x0,a0,…,xn,an),B):=κ((xn,an),B).\begin{aligned} \eta_{2n+1}((x_0, a_0, \ldots, x_n, a_n), B) := \kappa((x_n, a_n), B).\end{aligned}

Then Theorem 5 implies that there exists a probability space (Ω,F,Pνπ)(\Omega, \mathscr{F}, \mathbb{P}_{\nu}^{\pi}) satisfying (10), (11) and (12), where we define the random variables {Xn}n≥0\{X_n\}_{n \ge 0} and {An}n≥0\{A_n\}_{n \ge 0} by the projection maps:

Ω∋ω=(x0,a0,x1,a1,…)↦Xn(ω):=xn∈S,Ω∋ω=(x0,a0,x1,a1,…)↦An(ω):=an∈A.\begin{aligned} \Omega \ni \omega = (x_0, a_0, x_1, a_1, \ldots)&\mapsto X_n(\omega) := x_n \in \mathsf S, \\ \Omega \ni \omega = (x_0, a_0, x_1, a_1, \ldots)&\mapsto A_n(\omega) := a_n \in \mathsf A. \end{aligned}

We denote by Eνπ\mathbb{E}_\nu^\pi the expectation operator with respect to the probability space (Ω,F,Pνπ).(\Omega, \mathscr{F}, \mathbb{P}_\nu^\pi). If ν=δx\nu = \delta_x is a Dirac measure at x∈S,x \in \mathsf S, we will simply write Pxπ\mathbb{P}_x^\pi and Exπ\mathbb{E}_x^\pi for Pδxπ\mathbb{P}_{\delta_x}^\pi and Eδxπ.\mathbb{E}_{\delta_x}^\pi.

Note that (1) implies that we can write (11) and (12) as Pνπ[{An∈C}∣σ(Hn)]=πn(Hn,C),C∈A,\begin{aligned} \mathbb{P}_\nu^\pi\left[\{A_n \in C\} \mid \sigma(H_n)\right] = \pi_n(H_n, C), \quad C \in \mathscr A,\end{aligned} Pνπ[{Xn+1∈B}∣σ(Hn,An)]=κ((Xn,An),B),B∈S.\begin{aligned} \mathbb{P}_\nu^\pi\left[\{X_{n+1} \in B\} \mid \sigma(H_n, A_n)\right] = \kappa((X_n, A_n), B), \quad B \in \mathscr S.\end{aligned}

Also notice that because of the constraint (9) on a policy, the probability measure Pνπ\mathbb{P}_\nu^\pi is supported on the closure of the set of all possible histories H∞:=S×⟦α⟧∞.\mathsf H_\infty := \mathsf S \times \llbracket \alpha \rrbracket^\infty.

Definition 14: Given a Markov decision model (S,A,α,κ,r)(\mathsf S, \mathsf A, \alpha, \kappa, r), an initial distribution ν,\nu, and a policy π∈Π,\pi \in \Pi, the associated stochastic process (Ω,F,Pνπ,{Xn}n≥0)(\Omega, \mathscr{F}, \mathbb{P}_\nu^\pi, \{X_n\}_{n \ge 0}) is called a Markov decision process.
Definition 15: We call {Xn}n≥0\{X_n\}_{n \ge 0} the state process and {An}n≥0\{A_n\}_{n \ge 0} the action process.

Markov State Process

Although equation (14) looks like a Markov condition, the state process {Xn}\{X_n\} may not be a Markov process because of the dependence on history through the action process. It seems intuitively plausible that if the policy is Markov, then the state process should also be Markov. We prove this now.

Notation: If φ\varphi is a stochastic kernel from S\mathsf S to A\mathsf A, then for every x∈Sx \in \mathsf S, define

r(x,φ):=∫Ar(x,a)φ(x,da), andκ((x,φ),⋅):=∫Aκ((x,a),⋅)φ(x,da).\begin{aligned} r(x,\varphi) &:= \int_{\mathsf A} r(x,a) \varphi(x, \mathrm{d}a), \text{ and} \\ \kappa((x, \varphi), \cdot) &:= \int_{\mathsf A} \kappa((x,a), \cdot) \varphi(x, \mathrm{d}a). \end{aligned}

Note that r(⋅,φ)r(\cdot, \varphi) is a measurable function and κ((⋅,φ),⋅)\kappa((\cdot, \varphi), \cdot) is a stochastic kernel on S.\mathsf S.

Theorem 7: Under the setting of Definition 14, but where the policy π={φn}n≥0∈ΠM\pi = \{\varphi_n\}_{n \ge 0} \in \Pi_M, the state process {Xn}n≥0\{X_n\}_{n \ge 0} is a non-homogeneous Markov process with transition kernels {κ((⋅,φn),⋅)}n≥0\{\kappa((\cdot,\varphi_n),\cdot)\}_{n \ge 0}, i.e., for every B∈SB \in \mathscr S and n≥0n \ge 0, almost surely Pνπ[{Xn+1∈B}∣σ(X0,X1,…,Xn)]=κ((Xn,φn),B)=Pνπ[{Xn+1∈B}∣σ(Xn)].\begin{aligned} \mathbb{P}_\nu^\pi\left[\{X_{n+1} \in B\} \mid \sigma(X_0, X_1, \ldots, X_n)\right]= \kappa((X_n, \varphi_n), B)= \mathbb{P}_\nu^\pi\left[\{X_{n+1} \in B\} \mid \sigma(X_n)\right].\end{aligned} In particular, if π∈ΠS\pi \in \Pi_{S}, then the state process is a homogeneous Markov process.

Let us start by fixing any policy π={πn}n≥0∈Π\pi = \{\pi_n\}_{n \ge 0} \in \Pi and any B∈S.B \in \mathscr S. Then

Pνπ[{Xn+1∈B}∣σ(Hn)]=Eνπ[Pνπ[{Xn+1∈B}∣σ(Hn,An)]∣σ(Hn)]=Eνπ[κ((Xn,An),B)∣σ(Hn)]=∫Aκ((Xn,a),B) πn(Hn,da),\begin{aligned} \mathbb{P}_\nu^\pi\left[\{X_{n+1} \in B\} \mid \sigma(H_n)\right] &=\mathbb{E}_\nu^\pi\left[\mathbb{P}_\nu^\pi\left[\{X_{n+1} \in B\} \mid \sigma(H_n, A_n)\right] \mid \sigma(H_n)\right] \\ &=\mathbb{E}_\nu^\pi\left[\kappa((X_n, A_n), B) \mid \sigma(H_n)\right] \\ &= \int_{\mathsf A} \kappa((X_n, a), B) \,\pi_n(H_n, \mathrm{d}a), \end{aligned}

where the first equality follows from the tower rule for conditional expectation, the second equality follows from (14), and the third equality follows from (11) and (5).

Now if π={φn}n≥0∈ΠM\pi = \{\varphi_n\}_{n \ge 0} \in \Pi_M, then the equation above becomes Pνπ[{Xn+1∈B}∣σ(Hn)]=∫Aκ((Xn,a),B) φn(Xn,da)=κ((Xn,φn),B).\begin{aligned} \mathbb{P}_\nu^\pi\left[\{X_{n+1} \in B\} \mid \sigma(H_n)\right] =\int_{\mathsf A} \kappa((X_n, a), B) \,\varphi_n(X_n, \mathrm{d}a) = \kappa((X_n, \varphi_n), B).\end{aligned}

Then using the tower rule again, substituting equation (16), and using the fact that κ((Xn,φn),B)\kappa((X_n, \varphi_n), B) is σ(Xn)−\sigma(X_n)-measurable, the LHS of equation (15) can be written

Pνπ[{Xn+1∈B}∣σ(X0,X1,…,Xn)]=Eνπ[Pνπ[{Xn+1∈B}∣σ(Hn)]∣σ(X0,X1,…,Xn)]=Eνπ[κ((Xn,φn),B)∣σ(X0,X1,…,Xn)]=κ((Xn,φn),B),\begin{aligned} \mathbb{P}_\nu^\pi\left[\{X_{n+1} \in B\} \mid \sigma(X_0, X_1, \ldots, X_n)\right] &= \mathbb{E}_\nu^\pi\left[\mathbb{P}_\nu^\pi\left[\{X_{n+1} \in B\} \mid \sigma(H_n)\right] \mid \sigma(X_0, X_1, \ldots, X_n)\right] \\ &= \mathbb{E}_\nu^\pi\left[\kappa((X_n, \varphi_n), B) \mid \sigma(X_0, X_1, \ldots, X_n)\right] \\ &= \kappa((X_n, \varphi_n), B), \end{aligned}
showing the first equality in equation (15). Similarly we can write
Pνπ[{Xn+1∈B}∣σ(Xn)]=Eνπ[Pνπ[{Xn+1∈B}∣σ(Hn)]∣σ(Xn)]=Eνπ[κ((Xn,φn),B)∣σ(Xn)]=κ((Xn,φn),B),\begin{aligned} \mathbb{P}_\nu^\pi\left[\{X_{n+1} \in B\} \mid \sigma(X_n)\right] &= \mathbb{E}_\nu^\pi\left[\mathbb{P}_\nu^\pi\left[\{X_{n+1} \in B\} \mid \sigma(H_n)\right] \mid \sigma(X_n)\right] \\ &= \mathbb{E}_\nu^\pi\left[\kappa((X_n, \varphi_n), B) \mid \sigma(X_n)\right] \\ &= \kappa((X_n, \varphi_n), B), \end{aligned}
showing the second equality in equation (15).

OPTIMAL POLICIES

Until now we have implicitly assumed that the total period of time over which the system is observed is infinite. In many situations we are interested in the finite horizon problem. So let us denote by T∈N∪{+∞}T \in \mathbb N \cup \{+\infty\} the length of this planning or control horizon. This gives a way to classify Markov decision processes—finite horizon or infinite horizon problems.

Markov decision processes can also be classified according to the performance criterion used.

Performance Criteria

Given a Markov decision model and an initial distribution, we have a choice over which policy to choose. We will need to define what performance criterion we are optimizing for to choose an optimal policy. Suppose we have a class ΠA\Pi_A of admissible policies, where ΠA\Pi_A could be Π\Pi or ΠDM\Pi_{DM} or any other class we discussed above. The performance criterion measures how “good” a policy is. There are two performance criteria which are common in the literature: expected total reward and the long-run average expected reward per unit time.

Expected Total Reward

Definition 16: Given an initial state X0=x∈SX_0 = x \in \mathsf S, a policy π∈ΠA\pi \in \Pi_A, and a discount factor β∈(0,1]\beta \in (0,1], the expected total reward is given by
J(π,x):=Exπ[∑n=0Tβnr(Xn,An,Xn+1)]\begin{aligned} J(\pi, x) := \mathbb{E}^\pi_{x}\left[ \sum_{n=0}^T \beta^n r(X_n, A_n, X_{n+1}) \right]\end{aligned}
if T=+∞,T = +\infty, and
J(π,x):=Exπ[∑n=0T−1βnr(Xn,An,Xn+1)+rT(XT)]\begin{aligned} J(\pi, x) := \mathbb{E}_x^\pi \left[ \sum_{n=0}^{T-1} \beta^n r(X_n, A_n, X_{n+1}) + r_T(X_T) \right]\end{aligned}
if T∈N,T \in \mathbb N, with rN ⁣:S→[−∞,∞)r_N \colon \mathsf S \to [-\infty, \infty), a measurable function, denoting the terminal reward.

Recall that Exπ\mathbb{E}_x^\pi simply means Eδxπ.\mathbb{E}_{\delta_x}^\pi. In this setting it is usually assumed that the reward function rr is bounded, so that J(π,x)J(\pi, x) is a bounded function.

We use J∗J^* to denote the value function

J∗(x):=sup⁡π∈ΠAJ(π,x),x∈S.\begin{aligned} J^*(x) := \sup_{\pi \in \Pi_A} J(\pi, x), \quad x \in \mathsf S.\end{aligned}

The problem is to find (if it exists!) a policy π∗∈ΠA\pi^* \in \Pi_A such that

J(π∗,x)=J∗(x),∀ x∈S.\begin{aligned} J(\pi^*, x) = J^*(x), \quad \forall \; x \in \mathsf S.\end{aligned}

Long-run Average Expected Reward

Definition 17: Given an initial state x0=x∈Sx_0 = x \in \mathsf S and a policy π∈ΠA\pi \in \Pi_A, the long-run average expected reward per unit time is given by
J(π,x):=lim inf⁡m→∞1mExπ[∑n=0mr(Xn,An)].\begin{aligned} J(\pi, x) := \liminf_{m \to \infty} \frac{1}{m} \mathbb{E}^\pi_{x}\left[ \sum_{n=0}^m r(X_n, A_n) \right].\end{aligned}

We could have taken lim sup⁡\limsup, and both give different results, but the lim inf⁡\liminf case is easier to handle. Intuitively, the lim inf⁡\liminf case gives a more pessimistic picture, while the lim sup⁡\limsup gives a more optimistic picture. See the survey (ABFGM, 1993) for a detailed treatment of this performance criterion. We will be focusing on the expected total reward next.

The choice of the performance criterion is application dependent. For example, if the future rewards are to be valued less than immediate rewards, then using expected total reward with β<1\beta < 1 would make sense. On the other hand, if the long term behaviour is to be studied and initial transient period is to be ignored, then using the long-run average expected reward makes sense.

Deterministic Markov Policy

Suppose that we are in the finite horizon with the expected total reward regime. Assume that the terminal reward is 00 for simplicity, and that the

reward function r ⁣:S×A→R is bounded.\begin{aligned} \text{reward function } r \colon \mathsf S \times \mathsf A \to \mathbb R \text{ is bounded.}\end{aligned}

As the notation suggests, we have also implicitly assumed that α(x)=A\alpha(x) = \mathsf A for every x∈S.x \in \mathsf S. In this setting we want to compare the classes ΠD\Pi_D and ΠDM\Pi_{DM} of policies. We claim that there is no loss of optimality in restricting attention to the smaller class ΠDM\Pi_{DM} of deterministic Markov policies. This is a surprising result! Policies in ΠD\Pi_D can depend on the entire history in a very complicated manner, and it is not clear why a deterministic Markov policy should be just as good. I came across this result in a blog post by Maxim Raginsky (Raginsky, 2010). The key result which we will use is from a 1964 paper by David Blackwell (Blackwell, 1964). We state this result without proof.

Theorem 8 [Blackwell]: Let S,T,\mathsf S,\mathsf T, and A\mathsf A be standard Borel spaces, let Q\mathbb Q be any probability measure on the product space S×T\mathsf S \times \mathsf T, and let R ⁣:S×A→RR \colon \mathsf S \times \mathsf A \to \mathbb R be a bounded measurable reward function. Then for any measurable function g ⁣:S×T→Ag \colon \mathsf S \times \mathsf T \to \mathsf A there exists another measurable function f ⁣:S→Af \colon \mathsf S \to \mathsf A such that
∫S×TR(x,f(x)) Q(dx,dy)≥∫S×TR(x,g(x,y)) Q(dx,dy).\begin{aligned} \int_{\mathsf S \times \mathsf T} R(x, f(x)) \, \mathbb{Q}(\mathrm{d}x, \mathrm{d}y) \ge \int_{\mathsf S \times \mathsf T} R(x, g(x,y))\, \mathbb{Q}(\mathrm{d}x, \mathrm{d}y).\end{aligned}

Let us now state and prove our theorem. Instead of fixing an initial state xx as above in the total expected reward function, we let the initial distribution be any probability measure ν\nu on S.\mathscr S.

Theorem 9: For any policy π∈ΠD\pi \in \Pi_D, there exists a policy τ∈ΠDM\tau \in \Pi_{DM} such that J(τ)≥J(π).J(\tau) \ge J(\pi).

Here, J(π)J(\pi), of course, denotes

J(π):=Eνπ[∑n=0N−1r(Xn,An)].\begin{aligned} J(\pi) := \mathbb{E}_\nu^\pi \left[ \sum_{n=0}^{N-1} r(X_n, A_n) \right].\end{aligned}

Before we prove the theorem, let us establish two lemmas. The first lemma states that the theorem holds true for N=2.N=2.

Lemma 2: If N=2N=2, then for any policy π=(π0,π1)∈ΠD\pi = (\pi_0, \pi_1) \in \Pi_D there exists a policy τ=(τ0,τ1)∈ΠDM\tau = (\tau_0, \tau_1) \in \Pi_{DM} such that J(τ)≥J(π).J(\tau) \ge J(\pi).
Writing J(π)J(\pi) explicitly,
J(π)=Eνπ[r(X0,π0(X0))]+Eνπ[r(X1,π1(X0,π0(X0),X1))],\begin{aligned} J(\pi) = \mathbb{E}_\nu^\pi \left[ r(X_0, \pi_0(X_0)) \right] + \mathbb{E}_\nu^\pi \left[ r(X_1, \pi_1(X_0, \pi_0(X_0), X_1)) \right],\end{aligned}
we note that the first term of RHS does not depend on π1.\pi_1. Using Blackwell’s theorem for the second term, with S,A\mathsf S, \mathsf A being the same, T=A×S\mathsf T=\mathsf A \times \mathsf S, g=π1g = \pi_1, Q\mathbb Q being the product of ν\nu with the kernel determined by the function π0\pi_0 and the kernel κ\kappa, as noted in the section of Policy, and R=rR=r, we conclude that there exists a measurable function τ1 ⁣:S→A\tau_1 \colon \mathsf S \to \mathsf A such that
Eντ[r(X1,τ1(X1))]≥Eνπ[r(X1,π1(X0,π0(X0),X1))].\begin{aligned} \mathbb{E}_\nu^\tau \left[ r(X_1,\tau_1(X_1)) \right] \ge \mathbb{E}_\nu^\pi \left[ r(X_1, \pi_1(X_0, \pi_0(X_0), X_1)) \right].\end{aligned}
The claim follows after noting that we can take τ0=π0.\tau_0 = \pi_0.

The next lemma states that when N=3N=3 and the last policy π2\pi_2 is Markov, then we can choose even the second policy to be Markov. More precisely,

Lemma 3: If N=3N=3 and π=(π0,π1,π2)∈ΠD\pi = (\pi_0, \pi_1, \pi_2) \in \Pi_D is such that π2 ⁣:S×A×S×A×S→A\pi_2 \colon \mathsf S \times \mathsf A \times \mathsf S \times \mathsf A \times \mathsf S \to \mathsf A is constant except in the last argument S\mathsf S, then there is a policy τ∈ΠDM\tau \in \Pi_{DM} such that J(τ)≥J(π).J(\tau) \ge J(\pi).
We let τ=(τ0,τ1,τ2)∈ΠDM\tau = (\tau_0, \tau_1, \tau_2) \in \Pi_{DM} be such that τ0=π0\tau_0 = \pi_0, τ2=π2\tau_2 = \pi_2, and define τ1\tau_1 as follows. Writing J(π)J(\pi) explicitly, J(π)=Eνπ[r(X0,π0(X0))]+Eνπ[r(X1,π1(X0,π0(X0),X1))]+Eνπ[r(X2,π2(X2))],\begin{aligned} J(\pi) = \mathbb{E}_\nu^\pi \left[ r(X_0, \pi_0(X_0)) \right] + \mathbb{E}_\nu^\pi \left[ r(X_1, \pi_1(X_0, \pi_0(X_0), X_1)) \right] + \mathbb{E}_\nu^\pi \left[ r(X_2, \pi_2(X_2)) \right],\end{aligned} where we ignored the irrelevant terms in π2\pi_2, we note that the first term does not depend on π1\pi_1 and π2.\pi_2. Since X2X_2 depends on the action π1(X0,π0(X0),X1)\pi_1(X_0, \pi_0(X_0), X_1) taken at time 11, both the second and the third terms depend on π1.\pi_1. Focusing on the third term,
Eνπ[r(X2,π2(X2))]=Eνπ[Eνπ[r(X2,π2(X2))∣X1,A1]]=:Eνπ[h(X1,A1)].\begin{aligned} \mathbb{E}_\nu^\pi \left[ r(X_2, \pi_2(X_2)) \right] = \mathbb{E}_\nu^\pi \left[\mathbb{E}_\nu^\pi \left[ r(X_2, \pi_2(X_2)) \mid X_1, A_1 \right]\right] =: \mathbb{E}_\nu^\pi \left[h(X_1, A_1)\right].\end{aligned}
Using (5) and (14) we can write,
h(X1,A1)=∫Sr(x2,π2(x2))κ((X1,A1),dx2).\begin{aligned} h(X_1, A_1) = \int_{\mathsf S} r(x_2, \pi_2(x_2)) \kappa((X_1, A_1), \mathrm{d}x_2).\end{aligned}
Then the function hh is measurable and bounded. Now define
R(x,a)=r(x,a)+h(x,a),\begin{aligned} R(x,a) = r(x,a) + h(x,a),\end{aligned}
which is also measurable and bounded, and note that by combining the previous results we can write the last two two terms of RHS of (17) as
Eνπ[r(X1,π1(X0,π0(X0),X1))]+Eνπ[r(X2,π2(X2))]=Eνπ[R(X1,π1(X0,π0(X0),X1))].\begin{aligned} \mathbb{E}_\nu^\pi \left[ r(X_1, \pi_1(X_0, \pi_0(X_0), X_1)) \right] + \mathbb{E}_\nu^\pi \left[ r(X_2, \pi_2(X_2)) \right] = \mathbb{E}_\nu^\pi \left[ R(X_1, \pi_1(X_0, \pi_0(X_0), X_1)) \right].\end{aligned}
Applying Blackwell’s theorem, with S,A,R\mathsf S, \mathsf A, R being the same, T=A×S\mathsf T=\mathsf A \times \mathsf S, g=π1g = \pi_1, and Q\mathbb Q being the product of ν\nu with the kernel determined by the function π0\pi_0 and the kernel κ\kappa, as noted in the section of Policy, we conclude that there exists a measurable function τ1 ⁣:S→A\tau_1 \colon \mathsf S \to \mathsf A such that
Eντ[R(X1,τ1(X1))]≥Eνπ[R(X1,π1(X0,π0(X0),X1))].\begin{aligned} \mathbb{E}_\nu^\tau \left[ R(X_1,\tau_1(X_1)) \right] \ge \mathbb{E}_\nu^\pi \left[ R(X_1, \pi_1(X_0, \pi_0(X_0), X_1)) \right].\end{aligned}
But note that we can write
Eντ[R(X1,τ1(X1))]=Eντ[r(X1,τ1(X0,π0(X0),X1))]+Eνπ[r(X2,τ2(X2))],\begin{aligned} \mathbb{E}_\nu^\tau \left[ R(X_1,\tau_1(X_1)) \right] = \mathbb{E}_\nu^\tau \left[ r(X_1, \tau_1(X_0, \pi_0(X_0), X_1)) \right] + \mathbb{E}_\nu^\pi \left[ r(X_2, \tau_2(X_2)) \right],\end{aligned}
and thus J(τ)≥J(π)J(\tau) \ge J(\pi), and the lemma is proved.

Finally, we come to the proof of Theorem 9.

(of Theorem 9) Let π∈ΠD.\pi \in \Pi_D. The cases N=1N=1 and N=2N=2 follow from the lemmas 2 and 3. For N≥3N \ge 3 we analyze as follows:

View π\pi as a two-step policy ((π0,…,πN−2),πN−1)((\pi_0, \ldots, \pi_{N-2}), \pi_{N-1}) in an alternative two-step MDP. Then by Lemma 2, we can assume that πN−1\pi_{N-1} is a Markov policy.

Now view π\pi as a three-step policy ((π0,…,πN−3),πN−2,πN−1)((\pi_0, \ldots, \pi_{N-3}), \pi_{N-2}, \pi_{N-1}). The policy in the third time-step πN−1\pi_{N-1} is Markov, and so we can apply Lemma 3 to conclude that πN−2\pi_{N-2} is also Markov.

We continue in a similar manner for smaller indices k=N−3,N−4,…k = N-3, N-4, \ldots to get our result.

This can be generalized to the class of all, and not necessarily deterministic, policies. I have not verified the proof, but it can be found in (Derman and Strauch, 1966) or Section 3.8 of (Dynkin and Yushkevich, 1979).

Dynamic Programming

Suppose, again, that we are in the finite horizon with the expected total reward regime. When can we say that there exists an optimal policy which is a deterministic Markov policy? Making some assumptions with regard to measurable selections, we can find, using dynamic programming, the optimal policy and the value function.

Theorem 10: Define the real-valued functions JN,JN−1,…,J0J_N, J_{N-1}, \ldots, J_0 on S\mathsf S inductively as follows: for each x∈S,x \in \mathsf S,
JN(x):=rN(x),Jn(x):=sup⁡{r(x,a)+∫SJn+1(y) κ((x,a),dy) ∣ a∈α(x)},n=N−1,N−2,…,0.\begin{aligned} J_N(x) &:= r_N(x), \\ J_n(x) &:= \sup \left\{\left. r(x,a) + \int_{\mathsf S} J_{n+1}(y) \,\kappa((x,a), \mathrm{d}y) \; \right\vert \; a \in \alpha(x) \right\}, \quad n = N-1, N-2, \ldots, 0. \end{aligned}
Suppose that these functions are measurable and that, for each n=0,…,N−1n = 0, \ldots, N-1, there exists a measurable selector fn ⁣:S→Af_n \colon \mathsf S \to \mathsf A satisfying fn(x)∈α(x)f_n(x) \in \alpha(x) for all x∈Sx \in \mathsf S (or equivalently ⟦fn⟧⊆⟦α⟧\llbracket f_n \rrbracket \subseteq \llbracket \alpha \rrbracket), and that fn(x)f_n(x) attains the maximum in the supremum above, i.e.,
Jn(x)=r(x,fn(x))+∫SJn+1(y) κ((x,fn(x)),dy),∀ x∈S, n=0,…,N−1.\begin{aligned} J_n(x) = r(x,f_n(x)) + \int_{\mathsf S} J_{n+1}(y) \,\kappa((x, f_n(x)), \mathrm{d}y), \quad \forall \, x \in \mathsf S,\, n = 0, \ldots, N-1.\end{aligned}
Then the deterministic Markov policy π∗:=(f0,…,fN−1)\pi^* := (f_0, \ldots, f_{N-1}) is optimal, and the value function J∗J^* equals J0.J_0.
Let π=(π0,…,πN−1)∈Π\pi = (\pi_0, \ldots, \pi_{N-1}) \in \Pi be an arbitrary policy, and for n=0,…,N−1n = 0, \ldots, N-1 let Rn(π,x)R_n(\pi, x) be the corresponding expected total cost from time nn to the terminal time NN, given that Xn=xX_n = x. That is, Rn(π,x):=Exπ[r(x,An)+∑m=n+1N−1r(Xm,Am)+rN(XN)].\begin{aligned} R_n(\pi, x) := \mathbb{E}_x^\pi \left[ r(x, A_n) + \sum_{m=n+1}^{N-1} r(X_m, A_m) + r_N(X_N) \right].\end{aligned} Also let RN(π,x):=rN(x).R_N(\pi, x) := r_N(x). Note that we have
R0(π,x)=J(π,x).\begin{aligned} R_0(\pi, x) = J(\pi, x).\end{aligned}
To prove the theorem it is sufficient to show that, for all x∈Sx \in \mathsf S and n=0,…,Nn = 0, \ldots, N, Rn(π,x)≤Jn(x) and Rn(π∗,x)=Jn(x).\begin{aligned} R_n(\pi, x) \le J_n(x) \text{ and } R_n(\pi^*, x) = J_n(x).\end{aligned} (19) holds for n=Nn = N by definition. We proceed by induction in the backward direction. Assume that for some k∈{N−1,…,0}k \in \{N-1, \ldots, 0\},
Rk+1(π,x)≤Jk+1(x),∀ x∈S.\begin{aligned} R_{k+1}(\pi, x) \le J_{k+1}(x), \quad \forall \, x \in \mathsf S.\end{aligned}
Then by (18), (5), (13) and (14), Rk(π,x)=Exπ[r(x,Ak)+∑m=k+1N−1r(Xm,Am)+rN(XN)]=∫A[r(x,a)+∫SRk+1(π,y)κ((x,a),dy)]πk(x,da)≤∫A[r(x,a)+∫SJk+1(y)κ((x,a),dy)]πk(x,da)≤sup⁡{r(x,a)+∫SJk+1(y)κ((x,a),dy) ∣ a∈α(x)}=Jk(x).\begin{aligned} R_k(\pi, x) &= \mathbb{E}_x^\pi \left[ r(x, A_k) + \sum_{m=k+1}^{N-1} r(X_m, A_m) + r_N(X_N) \right] \\ &= \int_{\mathsf A} \left[ r(x,a) + \int_{\mathsf S} R_{k+1}(\pi, y) \kappa((x,a), \mathrm{d}y) \right] \pi_k(x, \mathrm{d}a) \\ &\le \int_{\mathsf A} \left[ r(x,a) + \int_{\mathsf S} J_{k+1}(y) \kappa((x,a), \mathrm{d}y) \right] \pi_k(x, \mathrm{d}a) \\ &\le \sup \left\{\left. r(x,a) + \int_{\mathsf S} J_{k+1}(y) \kappa((x,a), \mathrm{d}y) \; \right\vert \; a \in \alpha(x) \right\} \\ &= J_k(x).\end{aligned} This proves the first claim in (19) for all n=0,…,N.n = 0, \ldots, N. Proceeding in a similar manner for π=π∗\pi = \pi^*, where the first inequality in (20) becomes an equality by the induction hypothesis, and the second inequality in (20) becomes an equality by the structure of π∗\pi^*, we conclude the second claim in (19) also.

The equation defining JnJ_n’s in the theorem statement is known as the dynamic programming equation.

EPILOGUE

It would be remiss of me to not mention the encyclopaedic reference (Bertsekas and Shreve, 1978). I also really liked the book (Hernández-Lerma and Lasserre, 1996), which has the advantage of being short. Next, I would be interested in learning reinforcement learning, where MDPs play a foundational role.

REFERENCES