Introduction
Stochastic morphisms, also known as Markov kernels, between measurable spaces were introduced by Lawvere [19 ] to express stochastic phenomena such as noise and uncertainty in categorical terms, and independently by Čencov [3 , 4 ] from the viewpoint of statistical decision theory. The resulting category, which we call the stochastic category , was interpreted by Giry [14 ] as the Kleisli category of the probability monad, and its structure was axiomatized by Fritz [10 ] as Markov categories (see also [12 ] ), in which marginalization, conditioning and independence are formulated through compositions and monoidal products of morphisms. In this framework, arguments are carried out with string diagrams, and classical algorithms such as the Bayesian filter [11 , 25 ] and the smoother [11 ] can be derived uniformly.
In classical probability theory, Bayesian filters and their continuous time analogues have been studied extensively [1 , 7 , 16 , 18 , 23 ] , and filters are naturally used with feedback, i.e. the transitions and observations of the model may depend on the observations made so far, for instance through a control input or through coefficients chosen based on the data [7 §4.2] . Such models are not hidden Markov models in the sense of [11 ] , since the future is not conditionally independent of
Date: November 1, 2026.
2020 Mathematics Subject Classification . Primary: 60G35, Secondary: 60A05, 62F15, 18M05, 93E11, 28A50.
This work is supported in part by RIKEN AIP, as well as JST CREST Grant Number JPMJCR2112 (The Bayes-Duality Project FY2021–2026, led by Emtiyaz Khan). The second author is supported by the RIKEN Special Postdoctoral Researcher Program, FY2025–2027. the past given the current hidden state. They are instead characterized by their conditional laws given the whole past (Proposition 4.2 ). The purpose of this article is to extend the categorical interpretation of Bayesian filters to this setting, by systematically parameterizing stochastic morphisms, using notation intuitively compatible with classical probability. In categorical terms, fixed parameters are treated in [11 ] through the parametric Markov categories of [12 §2.2] , and inputs appear in [25 Definition 3.1] . Parameterized stochastic morphisms also appear in [13 ] as transitional random variables. In this article, the parameter space grows with the observations. For simplicity, we work in the stochastic category, the motivating example of a Markov category.
We take the joint law as the primary object. A joint law is a stochastic morphism π : S → X × Y \pi: S \to X \times Y π : S → X × Y , that is, a family of probability measures π ( s ) \pi(s) π ( s ) on X × Y X \times Y X × Y parameterized by a measurable space S S S . We write
π ( Y ∣ X ) : S × X → Y \pi(Y \mid X) : S \times X \to Y π ( Y ∣ X ) : S × X → Y
for the conditional law of Y Y Y given X X X for π \pi π (see Definition 2.1 ), a family of regular conditional probabilities for the measures π ( s ) \pi(s) π ( s ) , characterized by
π = ( pr X , π ( Y ∣ X ) ) ∘ ( id S , π X ) . \pi= (\operatorname{pr}_{X}, \pi(Y \mid X)) \circ(\operatorname{id}_{S}, \pi_{X}). π = ( pr X , π ( Y ∣ X )) ∘ ( id S , π X ) .
The notation makes explicit the joint law and the parameter space, and the factors X X X and Y Y Y play the role traditionally played by random variables, conditioning on X X X being conditioning on the projection pr X \operatorname{pr}_{X} pr X (see Remark 2.3). The essential point is that π ( Y ∣ X ) \pi(Y \mid X) π ( Y ∣ X ) is again a stochastic morphism, with parameter space S × X S \times X S × X , so that further conditional laws can be taken and the rules of conditioning become equalities of stochastic morphisms. For example, the tower property (Theorem 2.7 ) for π : S → X × Y × Z \pi: S \to X \times Y \times Z π : S → X × Y × Z reads
π ( Y × Z ∣ X ) ( Z ∣ Y ) = π ( Z ∣ X × Y ) , \pi(Y \times Z \mid X)(Z \mid Y) = \pi(Z \mid X \times Y), π ( Y × Z ∣ X ) ( Z ∣ Y ) = π ( Z ∣ X × Y ) ,
that is, conditioning on X X X and then on Y Y Y is the same as conditioning on X × Y X \times Y X × Y at once, corresponding to the identity p ( z ∣ x , y ) = p ( y , z ∣ x ) / p ( y ∣ x ) p(z \mid x,y) = p(y,z \mid x)/p(y \mid x) p ( z ∣ x , y ) = p ( y , z ∣ x ) / p ( y ∣ x ) for densities. No reference measure or density is required, and measure theory is confined to the existence and uniqueness of the conditional law.
To see the calculus at work, consider the simplified case of a hidden Markov model without feedback when S S S is a single point, with initial law μ \mu μ on X 1 X_{1} X 1 , transitions a k : X k → X k + 1 a_{k} : X_{k} \to X_{k+1} a k : X k → X k + 1 and observations h k : X k → Y k h_{k} : X_{k} \to Y_{k} h k : X k → Y k for integers k ≥ 1 k \ge1 k ≥ 1 . Let b k : = ( h k + 1 , id X k + 1 ) ∘ a k : X k → Y k + 1 × X k + 1 b_{k} := (h_{k+1}, \operatorname{id}_{X_{k+1}}) \circ a_{k} : X_{k} \to Y_{k+1} \times X_{k+1} b k := ( h k + 1 , id X k + 1 ) ∘ a k : X k → Y k + 1 × X k + 1 , which generates the next observation Y k + 1 Y_{k+1} Y k + 1 and hidden state X k + 1 X_{k+1} X k + 1 from X k X_{k} X k . The joint law π k \pi_{k} π k of the observations Y [ k ] : = Y 1 × ⋯ × Y k Y^{[k]} := Y_{1} \times\cdots\times Y_{k} Y [ k ] := Y 1 × ⋯ × Y k and the hidden state X k X_{k} X k is the probability measure on Y [ k ] × X k Y^{[k]} \times X_{k} Y [ k ] × X k given by push-forwards
π 1 : = ( h 1 , id X 1 ) ( μ ) , π k + 1 : = ( id Y [ k ] × b k ) ( π k ) \pi_{1} := (h_{1}, \operatorname{id}_{X_{1}})(\mu), \qquad\pi_{k+1} := (\operatorname{id}_{Y^{[k]}} \times b_{k})(\pi_{k}) π 1 := ( h 1 , id X 1 ) ( μ ) , π k + 1 := ( id Y [ k ] × b k ) ( π k )
of measures, and the posterior is the conditional law
π k ( X k ∣ Y [ k ] ) : Y [ k ] → X k \pi_{k}(X_{k} \mid Y^{[k]}) : Y^{[k]} \to X_{k} π k ( X k ∣ Y [ k ] ) : Y [ k ] → X k
giving a family of probability measures on X k X_{k} X k parameterized by the observations Y [ k ] Y^{[k]} Y [ k ] up to time k k k . The following two rules of the calculus give the Bayesian filter. Push-forward commutes with conditioning, so that
π k + 1 ( Y k + 1 × X k + 1 ∣ Y [ k ] ) = b k ∘ π k ( X k ∣ Y [ k ] ) , \pi_{k+1}(Y_{k+1} \times X_{k+1} \mid Y^{[k]}) = b_{k} \circ\pi_{k}(X_{k} \mid Y^{[k]}), π k + 1 ( Y k + 1 × X k + 1 ∣ Y [ k ] ) = b k ∘ π k ( X k ∣ Y [ k ] ) ,
and the tower property then gives
π k + 1 ( X k + 1 ∣ Y [ k + 1 ] ) = ( b k ∘ π k ( X k ∣ Y [ k ] ) ) ( X k + 1 ∣ Y k + 1 ) . \pi_{k+1}(X_{k+1}\mid Y^{[k+1]})=(b_k\circ\pi_k(X_k\mid Y^{[k]}))(X_{k+1}\mid Y_{k+1}). π k + 1 ( X k + 1 ∣ Y [ k + 1 ] ) = ( b k ∘ π k ( X k ∣ Y [ k ] )) ( X k + 1 ∣ Y k + 1 ) .
Since b k ∘ π k ( X k ∣ Y [ k ] ) = ( h k + 1 , id X k + 1 ) ∘ μ k + 1 b_k\circ\pi_k(X_k\mid Y^{[k]})=(h_{k+1},\operatorname{id}_{X_{k+1}})\circ\mu_{k+1} b k ∘ π k ( X k ∣ Y [ k ] ) = ( h k + 1 , id X k + 1 ) ∘ μ k + 1 for the predicted prior μ k + 1 : = a k ∘ π k ( X k ∣ Y [ k ] ) : Y [ k ] → X k + 1 \mu_{k+1}:=a_k\circ\pi_k(X_k\mid Y^{[k]}):Y^{[k]}\to X_{k+1} μ k + 1 := a k ∘ π k ( X k ∣ Y [ k ] ) : Y [ k ] → X k + 1 , the right hand side is the Bayesian inverse h k + 1 μ k + 1 h_{k+1}^{\mu_{k+1}} h k + 1 μ k + 1 of h k + 1 h_{k+1} h k + 1 with respect to μ k + 1 \mu_{k+1} μ k + 1 , a parameterized version of the Bayesian inverse of Cho and Jacobs [5 ] . This gives the Bayesian filter
π k + 1 ( X k + 1 ∣ Y [ k + 1 ] ) = h k + 1 μ k + 1 , \pi_{k+1}(X_{k+1}\mid Y^{[k+1]})=h_{k+1}^{\mu_{k+1}}, π k + 1 ( X k + 1 ∣ Y [ k + 1 ] ) = h k + 1 μ k + 1 ,
which states that the posterior, a priori involving the whole model up to time k + 1 k+1 k + 1 , is the inverse of a single observation h k + 1 h_{k+1} h k + 1 , the past entering only through the predicted prior μ k + 1 \mu_{k+1} μ k + 1 .
The parameter space enables the iteration. The posterior π k ( X k ∣ Y [ k ] ) \pi_k(X_k\mid Y^{[k]}) π k ( X k ∣ Y [ k ] ) is a stochastic morphism with parameter space Y [ k ] Y^{[k]} Y [ k ] , and serves as the prior for the next observation. It also accommodates feedback. A transition or observation depending on the past observations is a stochastic morphism with parameter space Y [ k ] Y^{[k]} Y [ k ] , so that a model with feedback is simply a model whose parameter space grows with the observations. Our main results, Theorems 4.6 and 4.7, establish the Bayesian filter for the joint law π \pi π of the model with feedback, together with the corresponding recursions for prediction and smoothing, every step being a Bayesian inversion with the past observations entering as the parameter. In the case without feedback, the filter and the smoother are those of [11 ] , obtained in Markov categories with conditionals, where the past observations are carried as an input of the conditional.
The hidden states are standard Borel, the observation spaces only countably generated, and the parameter space arbitrary. Since we work directly with conditional laws rather than conditional expectations, no integrability is assumed, and the results are equalities of stochastic morphisms holding for every value of the parameter s ∈ S s\in S s ∈ S . In the affine Gaussian case with feedback, the filter and the smoother are classical for conditionally Gaussian sequences [18 Chapter 13] , under integrability assumptions on the coefficients, and the filter is known to require only that the coefficients be almost surely finite [6 ] . In this article, the filter and the smoother follow from Theorems 4.6 and 4.7 for arbitrary measurable coefficients, in a family of affine Gaussian stochastic morphisms strictly larger than the Markov category Gauss of [10 §6] . Feedback is also natural in continuous time filtering, which will be treated in a subsequent article.
In classical terms, the conditional expectation of a bounded measurable function f f f on Y Y Y given X X X is the pull-back
E π [ f ∣ X ] ( s , x ) = ∫ Y f ( y ) π ( Y ∣ X ) ( s , x ) ( d y ) , ( s , x ) ∈ S × X , \mathbb{E}_{\pi}[f\mid X](s,x)=\int_Y f(y)\,\pi(Y\mid X)(s,x)(dy),\qquad(s,x)\in S\times X, E π [ f ∣ X ] ( s , x ) = ∫ Y f ( y ) π ( Y ∣ X ) ( s , x ) ( d y ) , ( s , x ) ∈ S × X ,
and the tower property of conditional expectations follows from that of conditional laws (Proposition B.6). In this sense, the calculus of conditional laws gives the calculus of conditional expectations.
The article is organized as follows. In §2 we first introduce conditional laws and augmentations. We then prove fundamental results such as the tower property, and formulate conditional independence. In §3 we define the Bayesian inverse and prove Bayesian coherence: updating observations successively gives the same posterior as updating them at once. In §4 we treat filtering, prediction and smoothing for hidden Markov models with feedback, and in §5 the Kalman filter and the Rauch–Tung–Striebel smoother. Appendix A gives a self-contained proof of the existence and uniqueness of the conditional law, which may be read independently, Appendix B relates our framework to classical expectations and conditional expectations, and Appendix C gives a dictionary between classical notation, the notation of Markov categories and our article.
Conditional Laws and Augmentations
Throughout this article, S S S , X X X , Y Y Y , Z Z Z , V V V , W W W denote measurable spaces. In this section, we define the conditional law of a parameterized joint law and prove fundamental properties such as the tower property, using augmentations of stochastic morphisms.
A measurable space X X X is countably generated if its σ \sigma σ -algebra is generated by a countable family of measurable subsets, and standard Borel if it is isomorphic as a measurable space to a Borel subset of a Polish space with its Borel σ \sigma σ -algebra, or equivalently to a Borel subset of [ 0 , 1 ] [0,1] [ 0 , 1 ] (see [24 Theorem 3.3.13] ). A standard Borel space is countably generated, and finite or countable products of standard Borel spaces are again standard Borel spaces.
A stochastic morphism p : X → Y p : X \to Y p : X → Y , also known as a Markov kernel, probabilistic mapping or transition probability from X X X to Y Y Y , is a map sending any x ∈ X x \in X x ∈ X to a probability measure p ( x ) p(x) p ( x ) on Y Y Y , such that for any measurable B ⊂ Y B \subset Y B ⊂ Y , the map x ↦ p ( x ) ( B ) x \mapsto p(x)(B) x ↦ p ( x ) ( B ) is measurable in x x x . Any measurable map f : X → Y f : X \to Y f : X → Y can be viewed as a stochastic morphism by mapping x x x to the Dirac measure δ f ( x ) \delta_{f(x)} δ f ( x ) on Y Y Y . We will call such a stochastic morphism a deterministic morphism . We denote by 1 : = { ∗ } 1 := \{\ast\} 1 := { ∗ } the one-point measurable space. A probability measure μ \mu μ on X X X defines a stochastic morphism μ : 1 → X \mu: 1 \to X μ : 1 → X mapping ∗ \ast ∗ to μ \mu μ , and we will identify the two.
Given stochastic morphisms p : S → X p : S \to X p : S → X and q : X → Y q : X \to Y q : X → Y , we define the composition by
( q ∘ p ) ( s ) ( B ) : = ∫ X q ( x ) ( B ) p ( s ) ( d x ) (q \circ p)(s)(B) := \int_X q(x)(B)p(s)(\mathrm{d}x) ( q ∘ p ) ( s ) ( B ) := ∫ X q ( x ) ( B ) p ( s ) ( d x )
for any s ∈ S s \in S s ∈ S and measurable set B ⊂ Y B \subset Y B ⊂ Y . Then q ∘ p q \circ p q ∘ p is again a stochastic morphism. Measurable spaces and stochastic morphisms form a category, the stochastic category , denoted Stoch in [10 ] , with the deterministic morphisms induced by the identities as identities.
We denote by pr X : X × Y → X \operatorname{pr}_{X} : X \times Y \to X pr X : X × Y → X and pr Y : X × Y → Y \operatorname{pr}_{Y} : X \times Y \to Y pr Y : X × Y → Y the deterministic morphisms induced by the projections. More generally, we take the convention that on a product with several factors including X X X and Y Y Y , we denote by pr X × Y \operatorname{pr}_{X \times Y} pr X × Y and pr Y × X \operatorname{pr}_{Y \times X} pr Y × X the projections to X × Y X \times Y X × Y and to Y × X Y \times X Y × X , the order of the indices indicating the order of the factors in the range, and similarly for projections to more than two factors. For stochastic morphisms p : S → X p : S \to X p : S → X and q : S → Y q : S \to Y q : S → Y , the product
( p , q ) : S → X × Y (p,q) : S \to X \times Y ( p , q ) : S → X × Y
is the stochastic morphism s ↦ p ( s ) q ( s ) s \mapsto p(s)q(s) s ↦ p ( s ) q ( s ) , where p ( s ) q ( s ) p(s)q(s) p ( s ) q ( s ) is the product measure on X × Y X \times Y X × Y given by p ( s ) q ( s ) ( A × B ) = p ( s ) ( A ) q ( s ) ( B ) p(s)q(s)(A \times B) = p(s)(A)q(s)(B) p ( s ) q ( s ) ( A × B ) = p ( s ) ( A ) q ( s ) ( B ) for any s ∈ S s \in S s ∈ S and measurable sets A ⊂ X A \subset X A ⊂ X and B ⊂ Y B \subset Y B ⊂ Y . For stochastic morphisms a : X → X ′ a : X \to X' a : X → X ′ and b : Y → Y ′ b : Y \to Y' b : Y → Y ′ , we let ( a × b ) ( x , y ) : = a ( x ) b ( y ) (a \times b)(x,y) := a(x)b(y) ( a × b ) ( x , y ) := a ( x ) b ( y ) for any ( x , y ) ∈ X × Y (x,y) \in X \times Y ( x , y ) ∈ X × Y . We freely use the identities
( a × b ) ∘ ( p , q ) = ( a ∘ p , b ∘ q ) , ( p , q ) ∘ u = ( p ∘ u , q ∘ u ) , (1) (a \times b) \circ(p,q) = (a \circ p, b \circ q), \qquad(p,q) \circ u = (p \circ u, q \circ u), \tag*{(1)} ( a × b ) ∘ ( p , q ) = ( a ∘ p , b ∘ q ) , ( p , q ) ∘ u = ( p ∘ u , q ∘ u ) , (1)
the latter for a deterministic morphism u u u . Furthermore, for the projection pr X : X × Y → X \operatorname{pr}_{X} : X \times Y \to X pr X : X × Y → X , we have pr X ∘ ( p , q ) = p \operatorname{pr}_{X} \circ(p,q) = p pr X ∘ ( p , q ) = p .
We call a stochastic morphism π : S → X × Y \pi: S \to X \times Y π : S → X × Y a joint law on X × Y X \times Y X × Y parameterized by S S S , or simply a joint law. This gives for each s ∈ S s \in S s ∈ S a probability measure π ( s ) \pi(s) π ( s ) on X × Y X \times Y X × Y . We define the marginal of π \pi π at X X X by π X : = pr X ∘ π \pi_X := \operatorname{pr}_X \circ\pi π X := pr X ∘ π . We define the joint laws and marginals similarly for any product of factors and subproduct.
Definition 2.1. Consider a joint law π : S → X × Y \pi: S \to X \times Y π : S → X × Y . A conditional law π ( Y ∣ X ) \pi(Y \mid X) π ( Y ∣ X ) of Y Y Y given X X X for π \pi π is a stochastic morphism
π ( Y ∣ X ) : S × X → Y \pi(Y \mid X): S \times X \to Y π ( Y ∣ X ) : S × X → Y that satisfies
π = ( pr X , π ( Y ∣ X ) ) ∘ ( id S , π X ) , (2) \pi= (\operatorname{pr}_X, \pi(Y \mid X)) \circ(\operatorname{id}_S, \pi_X), \tag*{(2)} π = ( pr X , π ( Y ∣ X )) ∘ ( id S , π X ) , (2) where π X = pr X ∘ π \pi_X = \operatorname{pr}_X \circ\pi π X = pr X ∘ π is the marginal.
It is important to note that the π \pi π in the notation π ( Y ∣ X ) \pi(Y \mid X) π ( Y ∣ X ) is not a generic symbol to denote a conditional law, but signifies that the conditional law is induced from the joint law π : S → X × Y \pi: S \to X \times Y π : S → X × Y . Different joint laws give different conditional laws, and properties such as the tower property, Bayesian coherence and Bayesian filters are statements about how conditional laws of related joint laws fit together, which the traditional notation p ( y ∣ x ) p(y \mid x) p ( y ∣ x ) leaves implicit. Note that our theory is based on probability measures, so density functions are not required.
The existence and uniqueness of the conditional law is the parameterized version of the classical disintegration theorem, see for example [17 Theorem 1.25] . The proof including our case is given in [13 ] . We give a self-contained proof in Appendix § 6 .
Theorem 2.2. Consider a joint law π : S → X × Y \pi: S \to X \times Y π : S → X × Y , where X X X is countably generated.
(i) If Y Y Y is countably generated, and if a conditional law π ( Y ∣ X ) \pi(Y \mid X) π ( Y ∣ X ) of Y Y Y given X X X for π \pi π exists, then such π ( Y ∣ X ) \pi(Y \mid X) π ( Y ∣ X ) is unique π X ( s ) \pi_X(s) π X ( s ) -almost everywhere for any s ∈ S s \in S s ∈ S .
(ii) In particular, if Y Y Y is standard Borel, then a conditional law π ( Y ∣ X ) \pi(Y \mid X) π ( Y ∣ X ) of Y Y Y given X X X for π \pi π exists, and is determined uniquely π X ( s ) \pi_X(s) π X ( s ) -almost everywhere for any s ∈ S s \in S s ∈ S .
Proof. See Appendix § 6 , where the theorem is restated as Theorem A.1 . □
From now on, we assume that the spaces X X X , Y Y Y , Z Z Z , V V V , W W W appearing as factors of joint laws are countably generated, while the parameter space S S S is an arbitrary measurable space. This convention is stable under taking finite or countable products and replacing S S S by S × X S \times X S × X . By Theorem 2.2 , a conditional law is determined uniquely almost everywhere whenever it exists. Existence will either be assumed explicitly or guaranteed by a standard Borel hypothesis. Equalities between conditional laws are understood in the almost everywhere sense, so that for a stochastic morphism κ : S × X → Y \kappa: S \times X \to Y κ : S × X → Y , the identity
κ = π ( Y ∣ X ) \kappa= \pi(Y \mid X) κ = π ( Y ∣ X )
means that κ = π ( Y ∣ X ) \kappa= \pi(Y \mid X) κ = π ( Y ∣ X ) for π X ( s ) \pi_X(s) π X ( s ) -almost every x ∈ X x \in X x ∈ X for any s ∈ S s \in S s ∈ S , and holds for any choice of the conditional laws involved.
Remark 2.3. For S = 1 S = 1 S = 1 , let π \pi π be the joint law of random variables X X X and Y Y Y on a probability space ( Ω , F , P ) (\Omega, \mathcal{F}, \mathbb{P}) ( Ω , F , P ) with values in X X X and Y Y Y . If the conditional law π ( Y ∣ X ) : X → Y \pi(Y \mid X): X \to Y π ( Y ∣ X ) : X → Y exists, then we have
P ( Y ∈ B ∣ X = x ) = π ( Y ∣ X ) ( x ) ( B ) \mathbb{P}(Y \in B \mid X = x) = \pi(Y \mid X)(x)(B) P ( Y ∈ B ∣ X = x ) = π ( Y ∣ X ) ( x ) ( B )
for π X \pi_X π X -almost every x ∈ X x \in X x ∈ X for any measurable B ⊂ Y B \subset Y B ⊂ Y , that is, π ( Y ∣ X ) \pi(Y \mid X) π ( Y ∣ X ) is a regular conditional distribution of Y Y Y given X = x X = x X = x . The factor X X X plays the role of the random variable X X X , realized by the coordinate projection pr X \operatorname{pr}_X pr X , and our notation can be read as in classical probability theory.
Augmentations of Stochastic Morphisms
In the characterization (2) of the conditional law, we require ( id S , π X ) (\operatorname{id}_S,\pi_X) ( id S , π X ) , which holds information of the input. We next introduce the augmentation, which preserves the input of stochastic morphisms.
Definition 2.4. Given a stochastic morphism κ : S → X \kappa: S \to X κ : S → X , we define the augmentation κ ∧ \kappa^{\wedge} κ ∧ of κ \kappa κ by
κ ∧ ≔ ( id S , κ ) : S → S × X , \kappa^{\wedge} \coloneqq(\operatorname{id}_S,\kappa) : S \to S \times X, κ ∧ : = ( id S , κ ) : S → S × X , which augments the output by the input.
Categorically, the augmentation κ ∧ \kappa^{\wedge} κ ∧ is simply the graph of κ \kappa κ . By definition, we have ( κ ∧ ) X = κ (\kappa^{\wedge})_X = \kappa ( κ ∧ ) X = κ , so that κ \kappa κ is determined by κ ∧ \kappa^{\wedge} κ ∧ . We use augmentations systematically in compositions, so that the characterization (2) of the conditional law becomes the strictly commutative diagram (3) below. The augmentation satisfies the following properties.
Lemma 2.5 (Properties of Augmentations). (a) (Push-forward ) For stochastic morphisms κ : S → X \kappa: S \to X κ : S → X and a : S × X → Y a : S \times X \to Y a : S × X → Y , we have
( pr S , a ) ∘ κ ∧ = ( a ∘ κ ∧ ) ∧ : S → S × Y . (\operatorname{pr}_S,a) \circ\kappa^{\wedge} = (a \circ\kappa^{\wedge})^{\wedge} : S \to S \times Y. ( pr S , a ) ∘ κ ∧ = ( a ∘ κ ∧ ) ∧ : S → S × Y . (b) (Marginals ) For a stochastic morphism κ : S → X × Y \kappa: S \to X \times Y κ : S → X × Y , we have
( κ ∧ ) S × X = ( id S , κ ) S × X = ( id S , κ X ) = ( κ X ) ∧ . (\kappa^{\wedge})_{S \times X} = (\operatorname{id}_S,\kappa)_{S \times X} = (\operatorname{id}_S,\kappa_X) = (\kappa_X)^{\wedge}. ( κ ∧ ) S × X = ( id S , κ ) S × X = ( id S , κ X ) = ( κ X ) ∧ . (c) (Independence ) For stochastic morphisms p : S → X p : S \to X p : S → X and q : S → Y q : S \to Y q : S → Y , we have
( q ∘ pr S ) ∧ ∘ p ∧ = ( id S , p , q ) = ( p , q ) ∧ , (q \circ\operatorname{pr}_S)^{\wedge} \circ p^{\wedge} = (\operatorname{id}_S,p,q) = (p,q)^{\wedge}, ( q ∘ pr S ) ∧ ∘ p ∧ = ( id S , p , q ) = ( p , q ) ∧ , where q ∘ pr S : S × X → Y q \circ\operatorname{pr}_S : S \times X \to Y q ∘ pr S : S × X → Y .
Proof. Each property is verified by evaluating both sides on measurable rectangles, since a probability measure on a product is determined by its values on rectangles. For (a), for measurable sets A ⊂ S A \subset S A ⊂ S and B ⊂ Y B \subset Y B ⊂ Y , we have
( ( pr S , a ) ∘ κ ∧ ) ( s ) ( A × B ) = ∫ S × X δ s ( A ) a ( s ′ , x ) ( B ) κ ∧ ( s ) ( d s ′ , d x ) = ∫ X δ s ( A ) a ( s , x ) ( B ) κ ( s ) ( d x ) = δ s ( A ) ( a ∘ κ ∧ ) ( s ) ( B ) = ( a ∘ κ ∧ ) ∧ ( s ) ( A × B ) , \begin{aligned}
((\operatorname{pr}_S,a) \circ\kappa^{\wedge})(s)(A \times B)
&= \int_{S \times X} \delta_s(A) a(s',x)(B)\,\kappa^{\wedge}(s)(\mathrm{d}s',\mathrm{d}x) \\
&= \int_X \delta_s(A) a(s,x)(B)\,\kappa(s)(\mathrm{d}x) \\
&= \delta_s(A)(a \circ\kappa^{\wedge})(s)(B)
= (a \circ\kappa^{\wedge})^{\wedge}(s)(A \times B),
\end{aligned} (( pr S , a ) ∘ κ ∧ ) ( s ) ( A × B ) = ∫ S × X δ s ( A ) a ( s ′ , x ) ( B ) κ ∧ ( s ) ( d s ′ , d x ) = ∫ X δ s ( A ) a ( s , x ) ( B ) κ ( s ) ( d x ) = δ s ( A ) ( a ∘ κ ∧ ) ( s ) ( B ) = ( a ∘ κ ∧ ) ∧ ( s ) ( A × B ) ,
since κ ∧ ( s ) ( d s ′ , d x ) = δ s ( d s ′ ) κ ( s ) ( d x ) \kappa^{\wedge}(s)(\mathrm{d}s',\mathrm{d}x) = \delta_s(\mathrm{d}s')\kappa(s)(\mathrm{d}x) κ ∧ ( s ) ( d s ′ , d x ) = δ s ( d s ′ ) κ ( s ) ( d x ) . Similarly for (b) and (c). □
The properties apply to any parameter space, for example to S × X S \times X S × X in place of S S S . By applying Lemma 2.5 (a) to (2) with κ = π X \kappa= \pi_X κ = π X and a = ( pr X , π ( Y ∣ X ) ) a = (\operatorname{pr}_X,\pi(Y \mid X)) a = ( pr X , π ( Y ∣ X )) , we see that
π ∧ = ( ( pr X , π ( Y ∣ X ) ) ∘ ( id S , π X ) ) ∧ = ( ( pr X , π ( Y ∣ X ) ) ∘ ( π X ) ∧ ) ∧ = ( pr S , ( pr X , π ( Y ∣ X ) ) ) ∘ ( π X ) ∧ = π ( Y ∣ X ) ∧ ∘ ( π X ) ∧ : S → S × X × Y . \begin{aligned}
\pi^{\wedge}
&= ((\operatorname{pr}_X,\pi(Y \mid X)) \circ(\operatorname{id}_S,\pi_X))^{\wedge}
= ((\operatorname{pr}_X,\pi(Y \mid X)) \circ(\pi_X)^{\wedge})^{\wedge} \\
&= (\operatorname{pr}_S,(\operatorname{pr}_X,\pi(Y \mid X))) \circ(\pi_X)^{\wedge}
= \pi(Y \mid X)^{\wedge} \circ(\pi_X)^{\wedge} : S \to S \times X \times Y.
\end{aligned} π ∧ = (( pr X , π ( Y ∣ X )) ∘ ( id S , π X ) ) ∧ = (( pr X , π ( Y ∣ X )) ∘ ( π X ) ∧ ) ∧ = ( pr S , ( pr X , π ( Y ∣ X ))) ∘ ( π X ) ∧ = π ( Y ∣ X ) ∧ ∘ ( π X ) ∧ : S → S × X × Y .
Thus noting that a stochastic morphism is determined by its augmentation, (2) is equivalent to
π ∧ = π ( Y ∣ X ) ∧ ∘ ( π X ) ∧ : S → S × X × Y . \pi^\wedge= \pi(Y \mid X)^\wedge\circ(\pi_X)^\wedge: S \to S \times X \times Y. π ∧ = π ( Y ∣ X ) ∧ ∘ ( π X ) ∧ : S → S × X × Y .
In other words, the diagram
S → ( π X ) ∧ S × X π ∧ ↓ ↓ π ( Y ∣ X ) ∧ S × X × Y (3) \begin{CD}
S @>{(\pi_X)^\wedge}>> S \times X \\
@V{\pi^\wedge}VV @VV{\pi(Y\mid X)^\wedge}V \\
S \times X \times Y \tag*{(3)}
\end{CD} S π ∧ ↓ ⏐ S × X × Y ( π X ) ∧ S × X ↓ ⏐ π ( Y ∣ X ) ∧ (3)
is commutative. We stress that the diagram commutes strictly as an equality of stochastic morphisms for any choice of the conditional law, and not merely up to almost-everywhere equivalence.
More generally, let I I I be a countable index set and let { X i } i ∈ I \{X_i\}_{i\in I} { X i } i ∈ I be a system of countably generated measurable spaces. For any J ⊂ I J \subset I J ⊂ I , let X J : = ∏ i ∈ J X i X^J := \prod_{i\in J} X_i X J := ∏ i ∈ J X i , which is again countably generated. Consider a joint law π : S → X I \pi: S \to X^I π : S → X I . For any J , K ⊂ I J,K \subset I J , K ⊂ I which are disjoint, we let
π ( X J ∣ X K ) : S × X K → X J \pi(X^J \mid X^K): S \times X^K \to X^J π ( X J ∣ X K ) : S × X K → X J
be the conditional law of X J X^J X J given X K X^K X K for the marginal π X K × X J \pi_{X^K \times X^J} π X K × X J , whenever it exists. In particular, π ( X J ∣ X K ) \pi(X^J \mid X^K) π ( X J ∣ X K ) depends only on the marginal π X K × X J \pi_{X^K \times X^J} π X K × X J , so that the conditional laws of a joint law and of its marginals are consistent, and coincide wherever both are defined. We extend the notation to J , K ⊂ I J,K \subset I J , K ⊂ I which are not necessarily disjoint by copying the shared coordinates, so that
π ( X J ∣ X K ) : = ( pr X J ∩ K , π ( X J ∖ K ∣ X K ) ) : S × X K → X J ∩ K × X J ∖ K = X J \pi(X^J \mid X^K) := \left(\operatorname{pr}_{X^{J\cap K}},\pi(X^{J\setminus K}\mid X^K)\right): S \times X^K \to X^{J\cap K} \times X^{J\setminus K} = X^J π ( X J ∣ X K ) := ( pr X J ∩ K , π ( X J ∖ K ∣ X K ) ) : S × X K → X J ∩ K × X J ∖ K = X J
up to the order of the factors. By definition, the probability measure π ( X J ∣ X K ) ( s , x ) \pi(X^J \mid X^K)(s,x) π ( X J ∣ X K ) ( s , x ) for s ∈ S s \in S s ∈ S and x ∈ X K x \in X^K x ∈ X K is the product of the Dirac measure at the X J ∩ K X^{J\cap K} X J ∩ K -coordinates of x x x and the measure π ( X J ∖ K ∣ X K ) ( s , x ) \pi(X^{J\setminus K}\mid X^K)(s,x) π ( X J ∖ K ∣ X K ) ( s , x ) . In particular, for a joint law π : S → X × Y \pi:S\to X\times Y π : S → X × Y , we have π ( X × Y ∣ X ) = ( pr X , π ( Y ∣ X ) ) : S × X → X × Y \pi(X\times Y\mid X)=(\operatorname{pr}_X,\pi(Y\mid X)):S\times X\to X\times Y π ( X × Y ∣ X ) = ( pr X , π ( Y ∣ X )) : S × X → X × Y and π ( Y ∣ X ) ∧ = ( id S , π ( X × Y ∣ X ) ) \pi(Y\mid X)^\wedge=(\operatorname{id}_S,\pi(X\times Y\mid X)) π ( Y ∣ X ) ∧ = ( id S , π ( X × Y ∣ X )) , and the characterization (2) of the conditional law reads
π = π ( X × Y ∣ X ) ∘ ( π X ) ∧ . (4) \pi= \pi(X \times Y \mid X) \circ(\pi_X)^\wedge. \tag*{(4)} π = π ( X × Y ∣ X ) ∘ ( π X ) ∧ . (4)
We also take the convention that a stochastic morphism defined on a subproduct, such as κ : S × W → Y \kappa:S\times W\to Y κ : S × W → Y , is regarded as a stochastic morphism on a larger product, such as S × W × X S\times W\times X S × W × X , through the projection, whenever the larger domain is determined by the context, namely by the other side of an equality, by a composition, or by a product ( p , q ) (p,q) ( p , q ) . We do not apply this convention inside an augmentation, so that the domain of κ ∧ \kappa^\wedge κ ∧ is always that of κ \kappa κ .
Given an inclusion of index sets I ⊂ I ′ I\subset I' I ⊂ I ′ and a system of countably generated measurable spaces { X i } i ∈ I ′ \{X_i\}_{i\in I'} { X i } i ∈ I ′ , we say that a joint law π ′ : S → X I ′ \pi':S\to X^{I'} π ′ : S → X I ′ is an extension of π : S → X I \pi:S\to X^I π : S → X I if π X I ′ = π \pi'_{X^I}=\pi π X I ′ = π . Then for J , K ⊂ I J,K\subset I J , K ⊂ I , we have
π ′ ( X J ∣ X K ) = π ( X J ∣ X K ) \pi'(X^J\mid X^K)=\pi(X^J\mid X^K) π ′ ( X J ∣ X K ) = π ( X J ∣ X K )
in this case.
Properties of Conditional Laws
In this subsection, we prove fundamental properties of the conditional law. The conditional law satisfies the following.
Lemma 2.6 (Properties of Conditional Laws). (a) (Push-forward ) Let π : S → X × Y \pi:S\to X\times Y π : S → X × Y be a joint law such that the conditional law π ( Y ∣ X ) \pi(Y\mid X) π ( Y ∣ X ) exists, and consider the stochastic morphism a : Y → Z a:Y\to Z a : Y → Z . Then we have
a ∘ π ( Y ∣ X ) = ( ( id X × a ) ∘ π ) ( Z ∣ X ) . a\circ\pi(Y\mid X)=((\operatorname{id}_{X}\times a)\circ\pi)(Z\mid X). a ∘ π ( Y ∣ X ) = (( id X × a ) ∘ π ) ( Z ∣ X ) . More generally, for a : S × X × Y → Z a:S\times X\times Y\to Z a : S × X × Y → Z parameterized by S × X S\times X S × X , we have
a ∘ π ( Y ∣ X ) ∧ = ( ( pr X , a ) ∘ π ∧ ) ( Z ∣ X ) . a\circ\pi(Y\mid X)^{\wedge}=((\operatorname{pr}_{X},a)\circ\pi^{\wedge})(Z\mid X). a ∘ π ( Y ∣ X ) ∧ = (( pr X , a ) ∘ π ∧ ) ( Z ∣ X ) . In particular, for a : X × Y → Z a:X\times Y\to Z a : X × Y → Z parameterized by X X X , we have
a ∘ π ( X × Y ∣ X ) = ( ( pr X , a ) ∘ π ) ( Z ∣ X ) . a\circ\pi(X\times Y\mid X)=((\operatorname{pr}_{X},a)\circ\pi)(Z\mid X). a ∘ π ( X × Y ∣ X ) = (( pr X , a ) ∘ π ) ( Z ∣ X ) . Each case guarantees the existence of the conditional law on the right hand side.
(b) (Marginals ) Let π : S → X × Y × Z \pi:S\to X\times Y\times Z π : S → X × Y × Z be a joint law such that π ( Y × Z ∣ X ) \pi(Y\times Z\mid X) π ( Y × Z ∣ X ) exists. Then we have
π ( Y × Z ∣ X ) Y = π ( Y ∣ X ) , \pi(Y\times Z\mid X)_{Y}=\pi(Y\mid X), π ( Y × Z ∣ X ) Y = π ( Y ∣ X ) , where π ( Y × Z ∣ X ) Y : = pr Y ∘ π ( Y × Z ∣ X ) \pi(Y\times Z\mid X)_{Y}:=\operatorname{pr}_{Y}\circ\pi(Y\times Z\mid X) π ( Y × Z ∣ X ) Y := pr Y ∘ π ( Y × Z ∣ X ) is the Y Y Y -marginal of π ( Y × Z ∣ X ) \pi(Y\times Z\mid X) π ( Y × Z ∣ X ) .
(c) (Chain rule ) Let π : S → X × Y × Z \pi:S\to X\times Y\times Z π : S → X × Y × Z be a joint law such that π ( Y ∣ X ) \pi(Y\mid X) π ( Y ∣ X ) and π ( Z ∣ X × Y ) \pi(Z\mid X\times Y) π ( Z ∣ X × Y ) exist. Then π ( Z ∣ X ) \pi(Z\mid X) π ( Z ∣ X ) exists, and
π ( Z ∣ X ) = π ( Z ∣ X × Y ) ∘ π ( Y ∣ X ) ∧ . \pi(Z\mid X)=\pi(Z\mid X\times Y)\circ\pi(Y\mid X)^{\wedge}. π ( Z ∣ X ) = π ( Z ∣ X × Y ) ∘ π ( Y ∣ X ) ∧ . Classically, the chain rule (c) reads p ( z ∣ x ) = ∫ Y p ( z ∣ x , y ) p ( y ∣ x ) d y p(z\mid x)=\int_{Y}p(z\mid x,y)p(y\mid x)\,\mathrm{d}y p ( z ∣ x ) = ∫ Y p ( z ∣ x , y ) p ( y ∣ x ) d y for densities.
Proof. We first consider the case a : S × X × Y → Z a:S\times X\times Y\to Z a : S × X × Y → Z . Let q : = π ( Y ∣ X ) : S × X → Y q:=\pi(Y\mid X):S\times X\to Y q := π ( Y ∣ X ) : S × X → Y . By Lemma 2.5 (a) with S × X S\times X S × X as the parameter space, we have
( pr S × X , a ) ∘ q ∧ = ( a ∘ q ∧ ) ∧ : S × X → S × X × Z . (\operatorname{pr}_{S\times X},a)\circ q^{\wedge}=(a\circ q^{\wedge})^{\wedge}:S\times X\to S\times X\times Z. ( pr S × X , a ) ∘ q ∧ = ( a ∘ q ∧ ) ∧ : S × X → S × X × Z .
Composing with the projection pr X × Z = pr X × id Z \operatorname{pr}_{X\times Z}=\operatorname{pr}_{X}\times\operatorname{id}_{Z} pr X × Z = pr X × id Z and using (1), we obtain
( pr X , a ) ∘ q ∧ = ( pr X , a ∘ q ∧ ) : S × X → X × Z . (\operatorname{pr}_{X},a)\circ q^{\wedge}=(\operatorname{pr}_{X},a\circ q^{\wedge}):S\times X\to X\times Z. ( pr X , a ) ∘ q ∧ = ( pr X , a ∘ q ∧ ) : S × X → X × Z .
Hence by (3) for π \pi π , with q = π ( Y ∣ X ) q=\pi(Y\mid X) q = π ( Y ∣ X ) , we have
( pr X , a ∘ q ) ∘ ( π X ) ∧ = ( pr X , a ) ∘ q ∧ ∘ ( π X ) ∧ = ( pr X , a ) ∘ π ∧ : S → X × Z . (\operatorname{pr}_{X},a\circ q)\circ(\pi_{X})^{\wedge}=(\operatorname{pr}_{X},a)\circ q^{\wedge}\circ(\pi_{X})^{\wedge}=(\operatorname{pr}_{X},a)\circ\pi^{\wedge}:S\to X\times Z. ( pr X , a ∘ q ) ∘ ( π X ) ∧ = ( pr X , a ) ∘ q ∧ ∘ ( π X ) ∧ = ( pr X , a ) ∘ π ∧ : S → X × Z .
Since the X X X -marginal of ( pr X , a ) ∘ π ∧ (\operatorname{pr}_{X},a)\circ\pi^{\wedge} ( pr X , a ) ∘ π ∧ is pr X ∘ π ∧ = π X \operatorname{pr}_{X}\circ\pi^{\wedge}=\pi_{X} pr X ∘ π ∧ = π X , this is the defining identity (2) of the conditional law of Z Z Z given X X X for ( pr X , a ) ∘ π ∧ (\operatorname{pr}_{X},a)\circ\pi^{\wedge} ( pr X , a ) ∘ π ∧ , which proves the assertion for a : S × X × Y → Z a:S\times X\times Y\to Z a : S × X × Y → Z . For a : X × Y → Z a:X\times Y\to Z a : X × Y → Z , apply this to a ∘ pr X × Y a\circ\operatorname{pr}_{X\times Y} a ∘ pr X × Y , noting that ( pr X , a ∘ pr X × Y ) ∘ π ∧ = ( pr X , a ) ∘ π : S → X × Z (\operatorname{pr}_{X},a\circ\operatorname{pr}_{X\times Y})\circ\pi^{\wedge}=(\operatorname{pr}_{X},a)\circ\pi:S\to X\times Z ( pr X , a ∘ pr X × Y ) ∘ π ∧ = ( pr X , a ) ∘ π : S → X × Z and pr X × Y ∘ q ∧ = ( pr X , q ) : S × X → X × Y \operatorname{pr}_{X\times Y}\circ q^{\wedge}=(\operatorname{pr}_{X},q):S\times X\to X\times Y pr X × Y ∘ q ∧ = ( pr X , q ) : S × X → X × Y by (1). The case a : Y → Z a:Y\to Z a : Y → Z follows by replacing a a a with a ∘ pr Y a\circ\operatorname{pr}_{Y} a ∘ pr Y .
We next prove (b). Let κ = π ( Y × Z ∣ X ) \kappa=\pi(Y\times Z\mid X) κ = π ( Y × Z ∣ X ) . By (3) for π \pi π and by Lemma 2.5 (b) applied twice, we have
( π X × Y ) ∧ = ( π ∧ ) S × X × Y = pr S × X × Y ∘ κ ∧ ∘ ( π X ) ∧ = ( κ ∧ ) S × X × Y ∘ ( π X ) ∧ = ( κ Y ) ∧ ∘ ( π X ) ∧ , (\pi_{X\times Y})^{\wedge}=(\pi^{\wedge})_{S\times X\times Y}=\operatorname{pr}_{S\times X\times Y}\circ\kappa^{\wedge}\circ(\pi_{X})^{\wedge}=(\kappa^{\wedge})_{S\times X\times Y}\circ(\pi_{X})^{\wedge}=(\kappa_{Y})^{\wedge}\circ(\pi_{X})^{\wedge}, ( π X × Y ) ∧ = ( π ∧ ) S × X × Y = pr S × X × Y ∘ κ ∧ ∘ ( π X ) ∧ = ( κ ∧ ) S × X × Y ∘ ( π X ) ∧ = ( κ Y ) ∧ ∘ ( π X ) ∧ ,
which is the commutative diagram (3) of the conditional law of Y Y Y given X X X for π X × Y \pi_{X\times Y} π X × Y . The assertion follows from the uniqueness of the conditional law. For (c), the defining identity (2) of π ( Z ∣ X × Y ) \pi(Z \mid X \times Y) π ( Z ∣ X × Y ) reads π = ( pr X × Y , π ( Z ∣ X × Y ) ) ∘ ( π X × Y ) ∧ \pi= (\operatorname{pr}_{X \times Y}, \pi(Z \mid X \times Y)) \circ(\pi_{X \times Y})^{\wedge} π = ( pr X × Y , π ( Z ∣ X × Y )) ∘ ( π X × Y ) ∧ .
Composing with pr X × Z \operatorname{pr}_{X \times Z} pr X × Z and using (1), we obtain
π X × Z = ( pr X , π ( Z ∣ X × Y ) ) ∘ ( π X × Y ) ∧ : S → X × Z , \pi_{X \times Z} = (\operatorname{pr}_{X}, \pi(Z \mid X \times Y)) \circ(\pi_{X \times Y})^{\wedge}: S \to X \times Z, π X × Z = ( pr X , π ( Z ∣ X × Y )) ∘ ( π X × Y ) ∧ : S → X × Z ,
which is the push-forward of π X × Y \pi_{X \times Y} π X × Y by a = π ( Z ∣ X × Y ) : S × X × Y → Z a = \pi(Z \mid X \times Y): S \times X \times Y \to Z a = π ( Z ∣ X × Y ) : S × X × Y → Z . Hence (a) applied to π X × Y \pi_{X \times Y} π X × Y gives π ( Z ∣ X ) = π ( Z ∣ X × Y ) ∘ π ( Y ∣ X ) ∧ \pi(Z \mid X) = \pi(Z \mid X \times Y) \circ\pi(Y \mid X)^{\wedge} π ( Z ∣ X ) = π ( Z ∣ X × Y ) ∘ π ( Y ∣ X ) ∧ .
Theorem 2.7 (The Tower Property). Consider a joint law π : S → X × Y × Z \pi: S \to X \times Y \times Z π : S → X × Y × Z . If π ( Y × Z ∣ X ) : S × X → Y × Z \pi(Y \times Z \mid X): S \times X \to Y \times Z π ( Y × Z ∣ X ) : S × X → Y × Z is the conditional law of Y × Z Y \times Z Y × Z given X X X for π \pi π , and
π ( Y × Z ∣ X ) ( Z ∣ Y ) : S × X × Y → Z \pi(Y \times Z \mid X)(Z \mid Y): S \times X \times Y \to Z π ( Y × Z ∣ X ) ( Z ∣ Y ) : S × X × Y → Z is the conditional law of Z Z Z given Y Y Y for π ( Y × Z ∣ X ) \pi(Y \times Z \mid X) π ( Y × Z ∣ X ) , with parameter space S × X S \times X S × X , then the conditional law π ( Z ∣ X × Y ) \pi(Z \mid X \times Y) π ( Z ∣ X × Y ) of Z Z Z given X × Y X \times Y X × Y for π \pi π exists, and we have
π ( Y × Z ∣ X ) ( Z ∣ Y ) = π ( Z ∣ X × Y ) \pi(Y \times Z \mid X)(Z \mid Y) = \pi(Z \mid X \times Y) π ( Y × Z ∣ X ) ( Z ∣ Y ) = π ( Z ∣ X × Y ) for π X × Y ( s ) \pi_{X \times Y}(s) π X × Y ( s ) -almost every ( x , y ) ∈ X × Y (x,y) \in X \times Y ( x , y ) ∈ X × Y for any $s \in S.
Proof. Let κ : = π ( Y × Z ∣ X ) : S × X → Y × Z \kappa:= \pi(Y \times Z \mid X): S \times X \to Y \times Z κ := π ( Y × Z ∣ X ) : S × X → Y × Z , so that the left hand side is κ ( Z ∣ Y ) \kappa(Z \mid Y) κ ( Z ∣ Y ) . We have a commutative diagram
S → ( π X × Y ) ∧ S × X × Y π ∧ ↓ ↓ κ ( Z ∣ Y ) ∧ S × X × Y × Z ← κ ∧ S × X × Y \begin{CD}
S @>{(\pi_{X \times Y})^{\wedge}}>> S \times X \times Y \\
@V{\pi^{\wedge}}VV @VV{\kappa(Z \mid Y)^{\wedge}}V \\
S \times X \times Y \times Z @<<{\kappa^{\wedge}}< S \times X \times Y
\end{CD} S π ∧ ↓ ⏐ S × X × Y × Z ( π X × Y ) ∧ κ ∧ S × X × Y ↓ ⏐ κ ( Z ∣ Y ) ∧ S × X × Y
Here, the commutativity of the bottom left and right triangles is the commutative diagram (3) of the conditional laws κ \kappa κ of π \pi π and κ ( Z ∣ Y ) \kappa(Z \mid Y) κ ( Z ∣ Y ) of κ \kappa κ , and that of the upper triangle is the commutative diagram (3) of the conditional law π ( Y ∣ X ) = κ Y \pi(Y \mid X) = \kappa_Y π ( Y ∣ X ) = κ Y for π X × Y \pi_{X \times Y} π X × Y , by Lemma 2.6 (b). Hence
π ∧ = κ ∧ ∘ ( π X ) ∧ = κ ( Z ∣ Y ) ∧ ∘ ( κ Y ) ∧ ∘ ( π X ) ∧ = κ ( Z ∣ Y ) ∧ ∘ ( π X × Y ) ∧ , \pi^{\wedge} = \kappa^{\wedge} \circ(\pi_X)^{\wedge} = \kappa(Z \mid Y)^{\wedge} \circ(\kappa_Y)^{\wedge} \circ(\pi_X)^{\wedge} = \kappa(Z \mid Y)^{\wedge} \circ(\pi_{X \times Y})^{\wedge}, π ∧ = κ ∧ ∘ ( π X ) ∧ = κ ( Z ∣ Y ) ∧ ∘ ( κ Y ) ∧ ∘ ( π X ) ∧ = κ ( Z ∣ Y ) ∧ ∘ ( π X × Y ) ∧ ,
which is the commutative diagram (3) of the conditional law of Z Z Z given X × Y X \times Y X × Y for π \pi π . Hence κ ( Z ∣ Y ) \kappa(Z \mid Y) κ ( Z ∣ Y ) is a conditional law of Z Z Z given X × Y X \times Y X × Y for π \pi π , which proves the existence, and the assertion follows from the uniqueness of the conditional law. □
We next formulate conditional independence in terms of conditional laws.
Definition 2.8. Let π : S → W × X × Y \pi: S \to W \times X \times Y π : S → W × X × Y be a joint law. We say that X X X and Y Y Y are conditionally independent given W W W for π \pi π , and write
X ⊥ π Y ∣ W , X \mathrel{\perp_{\pi}} Y \mid W, X ⊥ π Y ∣ W , if the conditional laws π ( X ∣ W ) \pi(X \mid W) π ( X ∣ W ) and π ( Y ∣ W ) \pi(Y \mid W) π ( Y ∣ W ) exist and their product ( π ( X ∣ W ) , π ( Y ∣ W ) ) : S × W → X × Y (\pi(X \mid W), \pi(Y \mid W)): S \times W \to X \times Y ( π ( X ∣ W ) , π ( Y ∣ W )) : S × W → X × Y gives a conditional law of X × Y X \times Y X × Y given W W W for π \pi π , that is,
π ( X × Y ∣ W ) = ( π ( X ∣ W ) , π ( Y ∣ W ) ) . \pi(X \times Y \mid W) = (\pi(X \mid W), \pi(Y \mid W)). π ( X × Y ∣ W ) = ( π ( X ∣ W ) , π ( Y ∣ W )) .
Classically, this reads p ( x , y ∣ w ) = p ( x ∣ w ) p ( y ∣ w ) p(x,y \mid w)=p(x \mid w)p(y \mid w) p ( x , y ∣ w ) = p ( x ∣ w ) p ( y ∣ w ) for densities. The condition does not depend on the choice of π ( X ∣ W ) \pi(X \mid W) π ( X ∣ W ) and π ( Y ∣ W ) \pi(Y \mid W) π ( Y ∣ W ) , since the right hand side of (2) does not change if the conditional law is modified on π W ( s ) \pi_W(s) π W ( s ) -null sets. If W = 1 W=1 W = 1 , the condition reads π = ( π X , π Y ) \pi=(\pi_X,\pi_Y) π = ( π X , π Y ) , which is the independence of X X X and Y Y Y for π \pi π . The following lemma expresses conditional independence as the irrelevance of X X X for the conditional law of Y Y Y .
Lemma 2.9 (Conditional Independence). Let π : S → W × X × Y \pi:S\to W\times X\times Y π : S → W × X × Y be a joint law. Then the following are equivalent.
(i) X ⊥ π Y ∣ W X\perp_{\pi}Y\mid W X ⊥ π Y ∣ W .
(ii) The conditional laws π ( X ∣ W ) \pi(X\mid W) π ( X ∣ W ) , π ( Y ∣ W ) \pi(Y\mid W) π ( Y ∣ W ) and π ( Y ∣ W × X ) \pi(Y\mid W\times X) π ( Y ∣ W × X ) exist, and
π ( Y ∣ W × X ) = π ( Y ∣ W ) . \pi(Y\mid W\times X)=\pi(Y\mid W). π ( Y ∣ W × X ) = π ( Y ∣ W ) .
By symmetry, these are also equivalent to the existence of π ( X ∣ W ) \pi(X\mid W) π ( X ∣ W ) , π ( Y ∣ W ) \pi(Y\mid W) π ( Y ∣ W ) and π ( X ∣ W × Y ) \pi(X\mid W\times Y) π ( X ∣ W × Y ) with π ( X ∣ W × Y ) = π ( X ∣ W ) \pi(X\mid W\times Y)=\pi(X\mid W) π ( X ∣ W × Y ) = π ( X ∣ W ) .
Proof. In both cases π ( X ∣ W ) \pi(X\mid W) π ( X ∣ W ) and π ( Y ∣ W ) \pi(Y\mid W) π ( Y ∣ W ) exist. By Lemma 2.5 (c) with S × W S\times W S × W as the parameter space, applied to p = π ( X ∣ W ) p=\pi(X\mid W) p = π ( X ∣ W ) and q = π ( Y ∣ W ) q=\pi(Y\mid W) q = π ( Y ∣ W ) , we have
( π ( X ∣ W ) , π ( Y ∣ W ) ) ∧ = ( π ( Y ∣ W ) ∘ pr S × W ) ∧ ∘ π ( X ∣ W ) ∧ . (\pi(X\mid W),\pi(Y\mid W))^{\wedge}=(\pi(Y\mid W)\circ\operatorname{pr}_{S\times W})^{\wedge}\circ\pi(X\mid W)^{\wedge}. ( π ( X ∣ W ) , π ( Y ∣ W ) ) ∧ = ( π ( Y ∣ W ) ∘ pr S × W ) ∧ ∘ π ( X ∣ W ) ∧ .
Here π ( Y ∣ W ) ∘ pr S × W : S × W × X → Y \pi(Y\mid W)\circ\operatorname{pr}_{S\times W}:S\times W\times X\to Y π ( Y ∣ W ) ∘ pr S × W : S × W × X → Y . Composing with ( π W ) ∧ (\pi_W)^{\wedge} ( π W ) ∧ and using the commutative diagram (3) of π ( X ∣ W ) \pi(X\mid W) π ( X ∣ W ) giving ( π W × X ) ∧ = π ( X ∣ W ) ∧ ∘ ( π W ) ∧ (\pi_{W\times X})^{\wedge}=\pi(X\mid W)^{\wedge}\circ(\pi_W)^{\wedge} ( π W × X ) ∧ = π ( X ∣ W ) ∧ ∘ ( π W ) ∧ , we obtain
( π ( X ∣ W ) , π ( Y ∣ W ) ) ∧ ∘ ( π W ) ∧ = ( π ( Y ∣ W ) ∘ pr S × W ) ∧ ∘ ( π W × X ) ∧ . (5) (\pi(X\mid W),\pi(Y\mid W))^{\wedge}\circ(\pi_W)^{\wedge}=(\pi(Y\mid W)\circ\operatorname{pr}_{S\times W})^{\wedge}\circ(\pi_{W\times X})^{\wedge}. \tag*{(5)} ( π ( X ∣ W ) , π ( Y ∣ W ) ) ∧ ∘ ( π W ) ∧ = ( π ( Y ∣ W ) ∘ pr S × W ) ∧ ∘ ( π W × X ) ∧ . (5)
By (3) and the uniqueness of the conditional law, (i) holds if and only if the left hand side of (5) is π ∧ \pi^{\wedge} π ∧ , and (ii) holds if and only if the right hand side of (5) is π ∧ \pi^{\wedge} π ∧ . This proves the equivalence. □
Conditional independence arises when a variable depends solely on the conditioning variable.
Corollary 2.10. Let π : S → W × X \pi:S\to W\times X π : S → W × X be a joint law such that π ( X ∣ W ) \pi(X\mid W) π ( X ∣ W ) exists, let b : W → Y b:W\to Y b : W → Y be a stochastic morphism, and let
π ′ : = ( ( id W , b ) × id X ) ∘ π \pi^{\prime}:=((\operatorname{id}_W,b)\times\operatorname{id}_X)\circ\pi π ′ := (( id W , b ) × id X ) ∘ π be the extension of π \pi π in which Y Y Y is generated from W W W by b b b . Then X ⊥ π ′ Y ∣ W X\perp_{\pi^{\prime}}Y\mid W X ⊥ π ′ Y ∣ W , and hence
π ′ ( X ∣ W × Y ) = π ( X ∣ W ) . \pi^{\prime}(X\mid W\times Y)=\pi(X\mid W). π ′ ( X ∣ W × Y ) = π ( X ∣ W ) .
Proof. Since ( id W , b ) × id X = ( pr W , b × id X ) (\operatorname{id}_W,b)\times\operatorname{id}_X=(\operatorname{pr}_W,b\times\operatorname{id}_X) ( id W , b ) × id X = ( pr W , b × id X ) , Lemma 2.6 (a) applied to π \pi π , with W W W and X X X in place of X X X and Y Y Y , Z : = Y × X Z:=Y\times X Z := Y × X and a : = b × id X : W × X → Y × X a:=b\times\operatorname{id}_X:W\times X\to Y\times X a := b × id X : W × X → Y × X , together with (1), gives
π ′ ( Y × X ∣ W ) = ( b × id X ) ∘ ( pr W , π ( X ∣ W ) ) = ( b , π ( X ∣ W ) ) : S × W → Y × X . \pi^{\prime}(Y\times X\mid W)=(b\times\operatorname{id}_X)\circ(\operatorname{pr}_W,\pi(X\mid W))=(b,\pi(X\mid W)):S\times W\to Y\times X. π ′ ( Y × X ∣ W ) = ( b × id X ) ∘ ( pr W , π ( X ∣ W )) = ( b , π ( X ∣ W )) : S × W → Y × X .
By Lemma 2.6 (b), we have π ′ ( Y ∣ W ) = b \pi^{\prime}(Y\mid W)=b π ′ ( Y ∣ W ) = b and π ′ ( X ∣ W ) = π ( X ∣ W ) \pi^{\prime}(X\mid W)=\pi(X\mid W) π ′ ( X ∣ W ) = π ( X ∣ W ) , so that π ′ ( X × Y ∣ W ) = ( π ′ ( X ∣ W ) , π ′ ( Y ∣ W ) ) \pi^{\prime}(X\times Y\mid W)=(\pi^{\prime}(X\mid W),\pi^{\prime}(Y\mid W)) π ′ ( X × Y ∣ W ) = ( π ′ ( X ∣ W ) , π ′ ( Y ∣ W )) , which is X ⊥ π ′ Y ∣ W X\perp_{\pi^{\prime}}Y\mid W X ⊥ π ′ Y ∣ W . The last assertion follows from Lemma 2.9 . □
The Bayesian inverse
In this section, we first define the Bayesian inverse, and then prove Bayesian coherence, which states that updating observations successively is the same as updating them at once.
Bayesian Inverse
We define the Bayesian inverse as follows.
Definition 3.1. Consider stochastic morphisms μ : S → X \mu:S \to X μ : S → X and h : X → Y h:X \to Y h : X → Y . The Bayesian inverse of h h h with respect to prior μ \mu μ is a stochastic morphism
h μ : S × Y → X h^\mu:S \times Y \to X h μ : S × Y → X characterized by the equality
( h , id X ) ∘ μ = ( pr Y , h μ ) ∘ ( id S , h ∘ μ ) (6) (h,\operatorname{id}_{X}) \circ\mu= (\operatorname{pr}_{Y},h^\mu) \circ(\operatorname{id}_{S},h \circ\mu) \tag*{(6)} ( h , id X ) ∘ μ = ( pr Y , h μ ) ∘ ( id S , h ∘ μ ) (6) as morphisms from S S S to Y × X Y \times X Y × X .
This is essentially the Bayesian inverse defined by Cho and Jacobs in [5 §3] , generalized to allow for parameterized priors. The Bayesian inverse can be constructed as a conditional law as follows.
Proposition 3.2. Suppose X X X is standard Borel. Consider stochastic morphisms μ : S → X \mu:S \to X μ : S → X and h : X → Y h:X \to Y h : X → Y . Then for a joint law π \pi π parameterized by S S S such that π Y × X = ( h , id X ) ∘ μ \pi_{Y \times X}=(h,\operatorname{id}_{X}) \circ\mu π Y × X = ( h , id X ) ∘ μ , we have
h μ = π ( X ∣ Y ) h^\mu= \pi(X \mid Y) h μ = π ( X ∣ Y ) for π Y ( s ) \pi_Y(s) π Y ( s ) -almost every y ∈ Y y \in Y y ∈ Y for any s ∈ S s \in S s ∈ S .
Proof. Since π ( X ∣ Y ) \pi(X \mid Y) π ( X ∣ Y ) is the conditional law of X X X given Y Y Y for the marginal π Y × X \pi_{Y \times X} π Y × X , we may replace π \pi π by π Y × X = ( h , id X ) ∘ μ : S → Y × X \pi_{Y \times X}=(h,\operatorname{id}_{X}) \circ\mu:S \to Y \times X π Y × X = ( h , id X ) ∘ μ : S → Y × X . By our assumption, there exists a conditional law π ( X ∣ Y ) : S × Y → X \pi(X \mid Y):S \times Y \to X π ( X ∣ Y ) : S × Y → X . Then (6) is simply the characterization
π = ( pr Y , π ( X ∣ Y ) ) ∘ ( id S , π Y ) \pi= (\operatorname{pr}_{Y},\pi(X \mid Y)) \circ(\operatorname{id}_{S},\pi_Y) π = ( pr Y , π ( X ∣ Y )) ∘ ( id S , π Y )
of (2) for π ( X ∣ Y ) \pi(X \mid Y) π ( X ∣ Y ) noting that π Y = h ∘ μ \pi_Y=h \circ\mu π Y = h ∘ μ . Our assertion follows from the uniqueness of the conditional law. □
If S = 1 S=1 S = 1 , then μ \mu μ simply gives a probability measure on X X X , and h μ : Y → X h^\mu:Y \to X h μ : Y → X is the Bayesian inverse of Cho–Jacobs [5 ] for μ \mu μ along h h h . The Bayesian inverse in the measure-theoretic setting is also treated in [8 ] , and its relation to disintegrations in general Markov categories in [20 ] . In [10 Remark 13.10] , the notation h † h^\dagger h † is used for the Bayesian inverse of h h h due to its interpretation as a symmetric monoidal dagger functor. We use h μ h^\mu h μ to identify the prior, which is important in a recursive setting (see Theorem 3.3 ).
Bayesian Coherence
In this subsection, in order to illustrate the workings of the Bayesian inverse, we prove Bayesian coherence, which asserts that the posterior given two observations can be calculated iteratively, the posterior given the first observation serving as the prior for the second. Let μ : S → W \mu:S \to W μ : S → W be a prior, and consider observations g : W → X g:W \to X g : W → X and h : W → Y h:W \to Y h : W → Y , where W W W is standard Borel.
W → g X h ↓ Y \begin{CD}
W @>g>> X \\
@VhVV \\
Y
\end{CD} W h ↓ ⏐ Y g X
We define the batch posterior
( g , h ) μ : S × X × Y → W (g,h)^\mu:S \times X \times Y \to W ( g , h ) μ : S × X × Y → W
to be the Bayesian inverse of ( g , h ) : W → X × Y (g,h): W \to X \times Y ( g , h ) : W → X × Y with respect to the prior μ : S → W \mu:S \to W μ : S → W . Bayesian coherence asserts that the batch posterior can be calculated iteratively. Compositionality of Bayesian inversion is also studied in the language of lenses [2 , 22 ] , where the Bayesian inverse is indexed by the prior. Let
g μ : S × X → W g^\mu:S \times X \to W g μ : S × X → W
be the Bayesian inverse of g : W → X g:W \to X g : W → X with respect to the prior μ : S → W \mu:S \to W μ : S → W , and
h g μ : S × X × Y → W h^{g^\mu}:S \times X \times Y \to W h g μ : S × X × Y → W
be the Bayesian inverse of h h h with respect to the prior g μ : S × X → W g^\mu:S \times X \to W g μ : S × X → W , with parameter space S × X S \times X S × X .
Theorem 3.3 (Bayesian Coherence). Let the notations be as above. Then we have
( g , h ) μ = h g μ (g,h)^\mu= h^{g^\mu} ( g , h ) μ = h g μ for ( ( g , h ) ∘ μ ) ( s ) ((g,h) \circ\mu)(s) (( g , h ) ∘ μ ) ( s ) -almost every ( x , y ) ∈ X × Y (x,y) \in X \times Y ( x , y ) ∈ X × Y for any s ∈ S s \in S s ∈ S .
The theorem asserts that the posterior given both observations is obtained as the Bayesian inverse of h h h , by taking the prior to be the posterior g μ g^\mu g μ for the first observation. The parameterized prior in Definition 3.1 allows this iteration, taking the previous posterior as the prior.
Proof. Let π : = ( g , id W ) ∘ μ \pi:= (g,\operatorname{id}_W) \circ\mu π := ( g , id W ) ∘ μ and consider the extension
π ′ = ( id X × ( h , id W ) ) ∘ π : S → X × Y × W \pi'=(\operatorname{id}_X \times(h,\operatorname{id}_W)) \circ\pi:S \to X \times Y \times W π ′ = ( id X × ( h , id W )) ∘ π : S → X × Y × W
which satisfies π ′ = ( ( g , h ) , id W ) ∘ μ \pi'=((g,h),\operatorname{id}_W) \circ\mu π ′ = (( g , h ) , id W ) ∘ μ . By Proposition 3.2 , we have ( g , h ) μ = π ′ ( W ∣ X × Y ) (g,h)^\mu=\pi'(W \mid X \times Y) ( g , h ) μ = π ′ ( W ∣ X × Y ) and g μ = π ( W ∣ X ) g^\mu=\pi(W \mid X) g μ = π ( W ∣ X ) . By Lemma 2.6 (a) for a = ( h , id W ) a=(h,\operatorname{id}_W) a = ( h , id W ) , we have
π ′ ( Y × W ∣ X ) = ( h , id W ) ∘ g μ . \pi'(Y \times W \mid X)=(h,\operatorname{id}_W)\circ g^\mu. π ′ ( Y × W ∣ X ) = ( h , id W ) ∘ g μ .
By Proposition 3.2 with S × X S \times X S × X as the parameter space and g μ g^\mu g μ as the prior, h g μ h^{g^\mu} h g μ is the conditional law of W W W given Y Y Y for ( h , id W ) ∘ g μ = π ′ ( Y × W ∣ X ) (h,\operatorname{id}_W)\circ g^\mu=\pi'(Y \times W \mid X) ( h , id W ) ∘ g μ = π ′ ( Y × W ∣ X ) , that is,
h g μ = π ′ ( Y × W ∣ X ) ( W ∣ Y ) . h^{g^\mu}=\pi'(Y \times W \mid X)(W \mid Y). h g μ = π ′ ( Y × W ∣ X ) ( W ∣ Y ) .
The tower property of Theorem 2.7 gives
π ′ ( Y × W ∣ X ) ( W ∣ Y ) = π ′ ( W ∣ X × Y ) = ( g , h ) μ , \pi'(Y \times W \mid X)(W \mid Y)=\pi'(W \mid X \times Y)=(g,h)^\mu, π ′ ( Y × W ∣ X ) ( W ∣ Y ) = π ′ ( W ∣ X × Y ) = ( g , h ) μ ,
which proves h g μ = ( g , h ) μ h^{g^\mu}=(g,h)^\mu h g μ = ( g , h ) μ as desired. □
Remark 3.4. The proof uses the joint law π ′ : S → X × Y × W \pi':S \to X \times Y \times W π ′ : S → X × Y × W only through the properties π ′ ( Y ∣ W ) = h \pi'(Y \mid W)=h π ′ ( Y ∣ W ) = h and X ⊥ π ′ Y ∣ W X \perp_{\pi'} Y \mid W X ⊥ π ′ Y ∣ W , which hold by Lemma 2.6 (b) and Corollary 2.10 , since X X X and Y Y Y are generated from W W W by g g g and h h h . Indeed, for any joint law π : S → W × X × Y \pi:S \to W \times X \times Y π : S → W × X × Y with W W W standard Borel such that π ( Y ∣ W ) = h \pi(Y \mid W)=h π ( Y ∣ W ) = h and X ⊥ π Y ∣ W X \perp_\pi Y \mid W X ⊥ π Y ∣ W , we have
π ( W ∣ X × Y ) = h π ( W ∣ X ) , \pi(W \mid X \times Y)=h^{\pi(W\mid X)}, π ( W ∣ X × Y ) = h π ( W ∣ X ) ,
the Bayesian inverse of h h h with respect to the prior π ( W ∣ X ) \pi(W \mid X) π ( W ∣ X ) with parameter space S × X S \times X S × X . By Lemma 2.9 , we have π ( Y ∣ W × X ) = h \pi(Y \mid W \times X)=h π ( Y ∣ W × X ) = h , so that the commutative diagrams (3) of π ( Y ∣ W × X ) \pi(Y \mid W \times X) π ( Y ∣ W × X ) and π ( W ∣ X ) \pi(W \mid X) π ( W ∣ X ) together with Lemma 2.5 (a) give π ( W × Y ∣ X ) = ( id W , h ) ∘ π ( W ∣ X ) \pi(W \times Y \mid X)=(\operatorname{id}_W,h)\circ\pi(W \mid X) π ( W × Y ∣ X ) = ( id W , h ) ∘ π ( W ∣ X ) , and the argument above applies. This is Bayesian coherence for a first observation X X X which may depend on the parameter.
We extend Theorem 3.3 to a sequence of observations. Let X X X be a standard Borel space, and we fix a prior μ : S → X \mu: S \to X μ : S → X . Let { Y i } i = 1 n \{Y_i\}_{i=1}^n { Y i } i = 1 n be a family of measurable spaces, with stochastic morphisms h i : X → Y i h_i: X \to Y_i h i : X → Y i for i = 1 , … , n i = 1,\ldots,n i = 1 , … , n . Let
( h 1 , … , h k ) : X → Y [ k ] : = ∏ i = 1 k Y i , 1 ≤ k ≤ n . (h_1,\ldots,h_k): X \to Y^{[k]} := \prod_{i=1}^{k} Y_i,\qquad1 \le k \le n. ( h 1 , … , h k ) : X → Y [ k ] := i = 1 ∏ k Y i , 1 ≤ k ≤ n .
We define the batch posterior to be the Bayesian inverse
( h 1 , … , h k ) μ : S × Y [ k ] → X (h_1,\ldots,h_k)^\mu: S \times Y^{[k]} \to X ( h 1 , … , h k ) μ : S × Y [ k ] → X
of ( h 1 , … , h k ) (h_1,\ldots,h_k) ( h 1 , … , h k ) with respect to the prior μ \mu μ , which by Proposition 3.2 is the conditional law π k ( X ∣ Y [ k ] ) \pi_k(X \mid Y^{[k]}) π k ( X ∣ Y [ k ] ) of X X X given Y [ k ] Y^{[k]} Y [ k ] for π k : = ( ( h 1 , … , h k ) , id X ) ∘ μ : S → Y [ k ] × X \pi_k := ((h_1,\ldots,h_k),\operatorname{id}_X) \circ\mu: S \to Y^{[k]} \times X π k := (( h 1 , … , h k ) , id X ) ∘ μ : S → Y [ k ] × X .
Corollary 3.5 (Bayesian Coherence). Let the notations be as above, and let 1 ≤ k < n 1 \le k < n 1 ≤ k < n . Then the Bayesian inverse
h k + 1 ( h 1 , … , h k ) μ : S × Y [ k + 1 ] → X h_{k+1}^{(h_1,\ldots,h_k)^\mu}: S \times Y^{[k+1]} \to X h k + 1 ( h 1 , … , h k ) μ : S × Y [ k + 1 ] → X of h k + 1 h_{k+1} h k + 1 with respect to the prior ( h 1 , … , h k ) μ (h_1,\ldots,h_k)^\mu ( h 1 , … , h k ) μ , with parameter space S × Y [ k ] S \times Y^{[k]} S × Y [ k ] , is the conditional law π k + 1 ( X ∣ Y [ k + 1 ] ) \pi_{k+1}(X \mid Y^{[k+1]}) π k + 1 ( X ∣ Y [ k + 1 ] ) of X X X given Y [ k + 1 ] Y^{[k+1]} Y [ k + 1 ] for π k + 1 \pi_{k+1} π k + 1 . In particular, we have
( h 1 , … , h k + 1 ) μ = h k + 1 ( h 1 , … , h k ) μ (h_1,\ldots,h_{k+1})^\mu= h_{k+1}^{(h_1,\ldots,h_k)^\mu} ( h 1 , … , h k + 1 ) μ = h k + 1 ( h 1 , … , h k ) μ for ( ( h 1 , … , h k + 1 ) ∘ μ ) ( s ) ((h_1,\ldots,h_{k+1}) \circ\mu)(s) (( h 1 , … , h k + 1 ) ∘ μ ) ( s ) -almost every ( y 1 , … , y k + 1 ) ∈ Y [ k + 1 ] (y_1,\ldots,y_{k+1}) \in Y^{[k+1]} ( y 1 , … , y k + 1 ) ∈ Y [ k + 1 ] for any s ∈ S s \in S s ∈ S .
Proof. We apply Theorem 3.3 with X X X in place of W W W , with Y [ k ] Y^{[k]} Y [ k ] and Y k + 1 Y_{k+1} Y k + 1 in place of X X X and Y Y Y , and with g = ( h 1 , … , h k ) g=(h_1,\ldots,h_k) g = ( h 1 , … , h k ) and h = h k + 1 h=h_{k+1} h = h k + 1 . Since Y [ k + 1 ] = Y [ k ] × Y k + 1 Y^{[k+1]}=Y^{[k]}\times Y_{k+1} Y [ k + 1 ] = Y [ k ] × Y k + 1 and ( g , h ) = ( h 1 , … , h k + 1 ) (g,h)=(h_1,\ldots,h_{k+1}) ( g , h ) = ( h 1 , … , h k + 1 ) , Theorem 3.3 gives ( h 1 , … , h k + 1 ) μ = h k + 1 ( h 1 , … , h k ) μ (h_1,\ldots,h_{k+1})^\mu=h_{k+1}^{(h_1,\ldots,h_k)^\mu} ( h 1 , … , h k + 1 ) μ = h k + 1 ( h 1 , … , h k ) μ , and ( h 1 , … , h k + 1 ) μ = π k + 1 ( X ∣ Y [ k + 1 ] ) (h_1,\ldots,h_{k+1})^\mu=\pi_{k+1}(X\mid Y^{[k+1]}) ( h 1 , … , h k + 1 ) μ = π k + 1 ( X ∣ Y [ k + 1 ] ) by Proposition 3.2 . □
Corollary 3.5 is the Bayesian filter for a hidden state which does not move. The posterior after k + 1 k+1 k + 1 observations is a single Bayesian inverse, with the past observations entering only through the prior ( h 1 , … , h k ) μ (h_1,\ldots,h_k)^\mu ( h 1 , … , h k ) μ and the parameter space S × Y [ k ] S\times Y^{[k]} S × Y [ k ] . In §4, the hidden state evolves between the observations, and the prior is replaced by the predicted prior.
Filtering, Prediction and Smoothing
In this section, we derive the Bayesian filter, prediction and smoothing for a hidden Markov model with feedback, whose transitions and observations may depend on the past observations.
Hidden Markov Models with Feedback
4.1. Hidden Markov Models with Feedback. In this subsection, we define the hidden Markov model with feedback and its joint law, and extend the Bayesian inverse to priors parameterized by the past observations. For measurable spaces { Y i } i ≥ 1 \{Y_i\}_{i\ge1} { Y i } i ≥ 1 and integers 0 ≤ k ≤ j 0\le k\le j 0 ≤ k ≤ j , we let
Y ( k , j ] : = ∏ i = k + 1 j Y i , Y [ j ] : = Y ( 0 , j ] , Y^{(k,j]} := \prod_{i=k+1}^{j} Y_i,\qquad Y^{[j]} := Y^{(0,j]}, Y ( k , j ] := i = k + 1 ∏ j Y i , Y [ j ] := Y ( 0 , j ] ,
with the convention that Y ( k , k ] : = 1 Y^{(k,k]}:=1 Y ( k , k ] := 1 , and similarly for X [ j ] X^{[j]} X [ j ] .
Definition 4.1 (Hidden Markov Model with Feedback). The model consists of a system of standard Borel spaces { X i } i = 1 n \{X_i\}_{i=1}^n { X i } i = 1 n with a prior μ : S → X 1 \mu: S \to X_1 μ : S → X 1 , and a family of measurable spaces { Y i } i = 1 n \{Y_i\}_{i=1}^n { Y i } i = 1 n , together with stochastic morphisms
a i : Y [ i ] × X i → X i + 1 , 1 ≤ i < n a_i : Y^{[i]} \times X_i \to X_{i+1}, \qquad1 \le i < n a i : Y [ i ] × X i → X i + 1 , 1 ≤ i < n governing the transitions of the hidden state, and stochastic morphisms
h i : Y [ i − 1 ] × X i → Y i , 1 ≤ i ≤ n h_i : Y^{[i-1]} \times X_i \to Y_i, \qquad1 \le i \le n h i : Y [ i − 1 ] × X i → Y i , 1 ≤ i ≤ n expressing the observations. Our model is defined so that the transitions a i a_i a i and observations h i h_i h i may depend on past observations, which we refer to as feedback . Note that a i a_i a i may depend on the current observation y i y_i y i , for instance a control input chosen after observing y i y_i y i . The case without feedback, where a i a_i a i and h i h_i h i factor through X i X_i X i , is the usual hidden Markov model expressed by the diagram
S → μ X 1 → a 1 X 2 → a 2 X 3 → a 3 ⋯ → a n − 1 X n → μ ↓ h 1 ↓ h 2 ↓ h 3 ↓ h n → μ Y 1 Y 2 Y 3 ⋯ Y n . \begin{aligned}
S &\xrightarrow{\mu} X_1 \xrightarrow{a_1} X_2 \xrightarrow{a_2} X_3 \xrightarrow{a_3} \cdots\xrightarrow{a_{n-1}} X_n \\
&\phantom{\xrightarrow{\mu}}\downarrow h_1 \qquad\downarrow h_2 \qquad\downarrow h_3 \qquad\qquad\downarrow h_n \\
&\phantom{\xrightarrow{\mu}}Y_1 \qquad\quad Y_2 \qquad\quad Y_3 \qquad\quad\cdots\qquad Y_n.
\end{aligned} S μ X 1 a 1 X 2 a 2 X 3 a 3 ⋯ a n − 1 X n μ ↓ h 1 ↓ h 2 ↓ h 3 ↓ h n μ Y 1 Y 2 Y 3 ⋯ Y n . See [11 ] for a categorical framework of the theory in the case without feedback.
For 1 ≤ k < n 1 \le k < n 1 ≤ k < n , let
b k : = ( h k + 1 , pr X k + 1 ) ∘ ( pr Y [ k ] , a k ) : Y [ k ] × X k → Y k + 1 × X k + 1 , b_k := (h_{k+1},\operatorname{pr}_{X_{k+1}}) \circ(\operatorname{pr}_{Y^{[k]}},a_k) : Y^{[k]} \times X_k \to Y_{k+1} \times X_{k+1}, b k := ( h k + 1 , pr X k + 1 ) ∘ ( pr Y [ k ] , a k ) : Y [ k ] × X k → Y k + 1 × X k + 1 , which expresses the transition of the hidden state followed by the observation. The joint law of the model is the stochastic morphism
π : S → Y [ n ] × X [ n ] \pi: S \to Y^{[n]} \times X^{[n]} π : S → Y [ n ] × X [ n ] defined as π : = π n \pi:= \pi_n π := π n , where π k : S → Y [ k ] × X [ k ] \pi_k : S \to Y^{[k]} \times X^{[k]} π k : S → Y [ k ] × X [ k ] is defined iteratively by π 1 : = ( h 1 , id X 1 ) ∘ μ \pi_1 := (h_1,\operatorname{id}_{X_1}) \circ\mu π 1 := ( h 1 , id X 1 ) ∘ μ and
π k + 1 : = ( pr Y [ k ] , b k , pr X [ k ] ) ∘ π k \pi_{k+1} := (\operatorname{pr}_{Y^{[k]}}, b_k, \operatorname{pr}_{X^{[k]}}) \circ\pi_k π k + 1 := ( pr Y [ k ] , b k , pr X [ k ] ) ∘ π k for 1 ≤ k < n 1 \le k < n 1 ≤ k < n , where we view X [ k + 1 ] = X k + 1 × X [ k ] X^{[k+1]} = X_{k+1} \times X^{[k]} X [ k + 1 ] = X k + 1 × X [ k ] . All the conditional laws of the model are those of π \pi π , with coordinates Y 1 , … , Y n , X 1 , … , X n Y_1,\ldots,Y_n,X_1,\ldots,X_n Y 1 , … , Y n , X 1 , … , X n . Since π \pi π is an extension of each of its marginals, they may be computed from any marginal of π \pi π containing the relevant coordinates. The joint law is characterized by its conditional laws as follows. Here a i a_i a i and h i h_i h i are regarded as stochastic morphisms on S × Y [ i ] × X [ i ] S \times Y^{[i]} \times X^{[i]} S × Y [ i ] × X [ i ] and on S × Y [ i − 1 ] × X [ i ] S \times Y^{[i-1]} \times X^{[i]} S × Y [ i − 1 ] × X [ i ] through the projections.
Proposition 4.2 (Characterization of the Joint Law). The joint law π \pi π is the unique joint law π : S → Y [ n ] × X [ n ] \pi: S \to Y^{[n]} \times X^{[n]} π : S → Y [ n ] × X [ n ] such that π X 1 = μ \pi_{X_1} = \mu π X 1 = μ and
π ( X i + 1 ∣ Y [ i ] × X [ i ] ) = a i , 1 ≤ i < n , π ( Y i ∣ Y [ i − 1 ] × X [ i ] ) = h i , 1 ≤ i ≤ n , (7) \pi(X_{i+1} \mid Y^{[i]} \times X^{[i]}) = a_i,\quad1 \le i < n,\qquad\pi(Y_i \mid Y^{[i-1]} \times X^{[i]}) = h_i,\quad1 \le i \le n, \tag*{(7)} π ( X i + 1 ∣ Y [ i ] × X [ i ] ) = a i , 1 ≤ i < n , π ( Y i ∣ Y [ i − 1 ] × X [ i ] ) = h i , 1 ≤ i ≤ n , (7) in the almost everywhere sense of §2.
Proof. We first note that for a prior ν : S → X \nu: S \to X ν : S → X and a stochastic morphism κ : X → Y \kappa: X \to Y κ : X → Y , the joint law ϖ : = ( id X , κ ) ∘ ν : S → X × Y \varpi:= (\operatorname{id}_X,\kappa) \circ\nu: S \to X \times Y ϖ := ( id X , κ ) ∘ ν : S → X × Y satisfies ϖ X = ν \varpi_X = \nu ϖ X = ν and ϖ = ( pr X , κ ) ∘ ( id S , ν ) \varpi= (\operatorname{pr}_X,\kappa) \circ(\operatorname{id}_S,\nu) ϖ = ( pr X , κ ) ∘ ( id S , ν ) by (1), which is the characterization (2) of κ \kappa κ , regarded as S × X → Y S \times X \to Y S × X → Y , as a conditional law of Y Y Y given X X X for ϖ \varpi ϖ . Conversely, a joint law ϖ ′ : S → X × Y \varpi' : S \to X \times Y ϖ ′ : S → X × Y with ϖ X ′ = ν \varpi'_X = \nu ϖ X ′ = ν and ϖ ′ ( Y ∣ X ) = κ \varpi'(Y \mid X) = \kappa ϖ ′ ( Y ∣ X ) = κ satisfies
ω ′ = ( id X , κ ) ∘ ν = ω \omega' = (\operatorname{id}_X,\kappa) \circ\nu= \omega ω ′ = ( id X , κ ) ∘ ν = ω by (2) , since the right hand side of (2) does not change if the conditional law is modified on ω X ′ ( s ) \omega'_X(s) ω X ′ ( s ) -null sets.
Let ω i : = π Y [ i − 1 ] × X [ i ] \omega_i := \pi_{Y^{[i-1]}\times X^{[i]}} ω i := π Y [ i − 1 ] × X [ i ] for 1 ≤ i ≤ n 1 \le i \le n 1 ≤ i ≤ n , so that ω 1 = μ \omega_1 = \mu ω 1 = μ . By the definition of b i − 1 b_{i-1} b i − 1 and (1) , the construction of π i \pi_i π i from π i − 1 \pi_{i-1} π i − 1 factors as
ω i = ( id Y [ i − 1 ] × X [ i − 1 ] , a i − 1 ) ∘ π i − 1 , π i = ( id Y [ i − 1 ] × X [ i ] , h i ) ∘ ω i , \omega_i = (\operatorname{id}_{Y^{[i-1]}\times X^{[i-1]}}, a_{i-1}) \circ\pi_{i-1}, \qquad\pi_i = (\operatorname{id}_{Y^{[i-1]}\times X^{[i]}}, h_i) \circ\omega_i, ω i = ( id Y [ i − 1 ] × X [ i − 1 ] , a i − 1 ) ∘ π i − 1 , π i = ( id Y [ i − 1 ] × X [ i ] , h i ) ∘ ω i ,
up to the order of the factors, for 1 < i ≤ n 1 < i \le n 1 < i ≤ n and for 1 ≤ i ≤ n 1 \le i \le n 1 ≤ i ≤ n respectively. Since the conditional laws of π \pi π are those of its marginals, the first observation shows that π \pi π satisfies (7) , and π X 1 = μ \pi_{X_1} = \mu π X 1 = μ by construction.
Conversely, let π \pi π be a joint law such that π X 1 = μ \pi_{X_1} = \mu π X 1 = μ satisfying (7) . We prove π Y [ i ] × X [ i ] = π i \pi_{Y^{[i]}\times X^{[i]}} = \pi_i π Y [ i ] × X [ i ] = π i by induction on i i i , which for i = n i = n i = n gives π = π \pi= \pi π = π . Suppose π Y [ i − 1 ] × X [ i − 1 ] = π i − 1 \pi_{Y^{[i-1]}\times X^{[i-1]}} = \pi_{i-1} π Y [ i − 1 ] × X [ i − 1 ] = π i − 1 if i > 1 i > 1 i > 1 . Then the second observation applied to (7) for a a a and i − 1 i-1 i − 1 gives π Y [ i − 1 ] × X [ i ] = ω i \pi_{Y^{[i-1]}\times X^{[i]}} = \omega_i π Y [ i − 1 ] × X [ i ] = ω i , where for i = 1 i = 1 i = 1 this is the assumption π X 1 = μ = ω 1 \pi_{X_1} = \mu= \omega_1 π X 1 = μ = ω 1 , and then applied to (7) for h h h gives π Y [ i ] × X [ i ] = π i \pi_{Y^{[i]}\times X^{[i]}} = \pi_i π Y [ i ] × X [ i ] = π i .
We consider the problem of computing the law of the hidden state X j X_j X j given observations Y [ k ] Y^{[k]} Y [ k ] for π \pi π . The filter is the problem of computing the posterior π ( X k ∣ Y [ k ] ) : S × Y [ k ] → X k \pi(X_k \mid Y^{[k]}) : S \times Y^{[k]} \to X_k π ( X k ∣ Y [ k ] ) : S × Y [ k ] → X k of the hidden state given the observations iteratively in k k k . More generally, π ( X j ∣ Y [ k ] ) \pi(X_j \mid Y^{[k]}) π ( X j ∣ Y [ k ] ) for j > k j > k j > k is the prediction and for j < k j < k j < k the smoothing of the hidden state.
We write π k : = π Y [ k ] × X k \pi_k := \pi_{Y^{[k]}\times X_k} π k := π Y [ k ] × X k for the marginal, so that π k ( X k ∣ Y [ k ] ) = π ( X k ∣ Y [ k ] ) \pi_k(X_k \mid Y^{[k]}) = \pi(X_k \mid Y^{[k]}) π k ( X k ∣ Y [ k ] ) = π ( X k ∣ Y [ k ] ) . By construction of π \pi π and (1) , we have π 1 = ( h 1 , id X 1 ) ∘ μ \pi_1 = (h_1, \operatorname{id}_{X_1}) \circ\mu π 1 = ( h 1 , id X 1 ) ∘ μ ,
π k + 1 = ( pr Y [ k ] , b k ) ∘ π k , 1 ≤ k < n . (8) \pi_{k+1} = (\operatorname{pr}_{Y^{[k]}}, b_k) \circ\pi_k, \qquad1 \le k < n. \tag*{(8)} π k + 1 = ( pr Y [ k ] , b k ) ∘ π k , 1 ≤ k < n . (8)
Since the transitions and observations may depend on the past observations, we need to generalize the Bayesian inverse defined in Definition 3.1 to stochastic morphisms parameterized by a measurable space.
Definition 4.4. Let V V V be a measurable space, and consider stochastic morphisms μ : S × V → X \mu: S \times V \to X μ : S × V → X and h : V × X → Y h : V \times X \to Y h : V × X → Y . The Bayesian inverse of h h h with respect to prior μ \mu μ , with parameter space S × V S \times V S × V , is a stochastic morphism
h μ : S × V × Y → X h^\mu: S \times V \times Y \to X h μ : S × V × Y → X characterized by the equality
( h , pr X ) ∘ μ ∧ = ( pr Y , h μ ) ∘ ( h ∘ μ ∧ ) ∧ (9) (h, \operatorname{pr}_X) \circ\mu^{\wedge} = (\operatorname{pr}_Y, h^\mu) \circ(h \circ\mu^\wedge)^\wedge \tag*{(9)} ( h , pr X ) ∘ μ ∧ = ( pr Y , h μ ) ∘ ( h ∘ μ ∧ ) ∧ (9) as morphisms from S × V S \times V S × V to Y × X Y \times X Y × X .
If V = 1 V=1 V = 1 , then μ ^ = ( id S , μ ) \hat{\mu}=(\operatorname{id}_S,\mu) μ ^ = ( id S , μ ) and h h h is regarded as a stochastic morphism on S × X S\times X S × X through pr X \operatorname{pr}_X pr X , so that by (1) this is Definition 3.1. The parameterized Bayesian inverse can be constructed as a conditional law, as follows.
Proposition 4.5. Suppose X X X is standard Borel. Let V V V be a measurable space, and consider stochastic morphisms μ : S × V → X \mu:S\times V\to X μ : S × V → X and h : V × X → Y h:V\times X\to Y h : V × X → Y . Then for a joint law π \pi π parameterized by S × V S\times V S × V such that π Y × X = ( h , pr X ) ∘ μ ∧ \pi_{Y\times X}=(h,\operatorname{pr}_X)\circ\mu^{\wedge} π Y × X = ( h , pr X ) ∘ μ ∧ , we have
h μ = π ( X ∣ Y ) h^\mu=\pi(X\mid Y) h μ = π ( X ∣ Y ) for π Y ( s , v ) \pi_Y(s,v) π Y ( s , v ) -almost every y ∈ Y y\in Y y ∈ Y for any ( s , v ) ∈ S × V (s,v)\in S\times V ( s , v ) ∈ S × V .
Proof. Since π ( X ∣ Y ) \pi(X\mid Y) π ( X ∣ Y ) is the conditional law of X X X given Y Y Y for the marginal π Y × X \pi_{Y\times X} π Y × X , we may replace π \pi π by π Y × X = ( h , pr X ) ∘ μ ∧ : S × V → Y × X \pi_{Y\times X}=(h,\operatorname{pr}_X)\circ\mu^{\wedge}:S\times V\to Y\times X π Y × X = ( h , pr X ) ∘ μ ∧ : S × V → Y × X . By our assumption, there exists a conditional law π ( X ∣ Y ) : S × V × Y → X \pi(X\mid Y):S\times V\times Y\to X π ( X ∣ Y ) : S × V × Y → X , with parameter space S × V S\times V S × V . Then (9) is simply the characterization
π = ( pr Y , π ( X ∣ Y ) ) ∘ ( id S × V , π Y ) \pi=(\operatorname{pr}_Y,\pi(X\mid Y))\circ(\operatorname{id}_{S\times V},\pi_Y) π = ( pr Y , π ( X ∣ Y )) ∘ ( id S × V , π Y )
of (2) for π ( X ∣ Y ) \pi(X\mid Y) π ( X ∣ Y ) noting that π Y = h ∘ μ ∧ \pi_Y=h\circ\mu^{\wedge} π Y = h ∘ μ ∧ . Our assertion follows from the uniqueness of the conditional law. □
Bayesian Filtering
In this subsection, we calculate the conditional law of the filter. For 1 ≤ k < n 1\le k<n 1 ≤ k < n , we let
μ k + 1 : = a k ∘ π ( Y [ k ] × X k ∣ Y [ k ] ) : S × Y [ k ] → X k + 1 \mu_{k+1}:=a_k\circ\pi(Y^{[k]}\times X_k\mid Y^{[k]}):S\times Y^{[k]}\to X_{k+1} μ k + 1 := a k ∘ π ( Y [ k ] × X k ∣ Y [ k ] ) : S × Y [ k ] → X k + 1
be the predicted prior , obtained from the posterior at time k k k by applying the transition a k a_k a k . Here
π ( Y [ k ] × X k ∣ Y [ k ] ) = ( pr Y [ k ] , π ( X k ∣ Y [ k ] ) ) \pi(Y^{[k]}\times X_k\mid Y^{[k]})=(\operatorname{pr}_{Y^{[k]}},\pi(X_k\mid Y^{[k]})) π ( Y [ k ] × X k ∣ Y [ k ] ) = ( pr Y [ k ] , π ( X k ∣ Y [ k ] ))
carries the past observations to a k a_k a k .
Theorem 4.6 (Bayesian Filter). Let the notations be as above. Then we have
π ( X k + 1 ∣ Y [ k + 1 ] ) = h k + 1 μ k + 1 , 1 ≤ k < n , \pi(X_{k+1}\mid Y^{[k+1]})=h_{k+1}^{\mu_{k+1}},\qquad1\le k<n, π ( X k + 1 ∣ Y [ k + 1 ] ) = h k + 1 μ k + 1 , 1 ≤ k < n , for π Y [ k + 1 ] ( s ) \pi_{Y^{[k+1]}}(s) π Y [ k + 1 ] ( s ) -almost every ( y 1 , … , y k + 1 ) ∈ Y [ k + 1 ] (y_1,\ldots,y_{k+1})\in Y^{[k+1]} ( y 1 , … , y k + 1 ) ∈ Y [ k + 1 ] for any s ∈ S s\in S s ∈ S , where h k + 1 μ k + 1 h_{k+1}^{\mu_{k+1}} h k + 1 μ k + 1 is the Bayesian inverse of h k + 1 h_{k+1} h k + 1 for the prior μ k + 1 \mu_{k+1} μ k + 1 , with V = Y [ k ] V=Y^{[k]} V = Y [ k ] in Definition 4.4.
Proof. Let 1 ≤ k < n 1\le k<n 1 ≤ k < n , and let κ : = b k ∘ π ( Y [ k ] × X k ∣ Y [ k ] ) : S × Y [ k ] → Y k + 1 × X k + 1 \kappa:=b_k\circ\pi(Y^{[k]}\times X_k\mid Y^{[k]}):S\times Y^{[k]}\to Y_{k+1}\times X_{k+1} κ := b k ∘ π ( Y [ k ] × X k ∣ Y [ k ] ) : S × Y [ k ] → Y k + 1 × X k + 1 . By (8) and Lemma 2.6 ( a ) (a) ( a ) applied to π k \pi_k π k and a = b k a=b_k a = b k , we have
κ = π k + 1 ( Y k + 1 × X k + 1 ∣ Y [ k ] ) = π ( Y k + 1 × X k + 1 ∣ Y [ k ] ) . (10) \kappa=\pi_{k+1}(Y_{k+1}\times X_{k+1}\mid Y^{[k]})=\pi(Y_{k+1}\times X_{k+1}\mid Y^{[k]}). \tag*{(10)} κ = π k + 1 ( Y k + 1 × X k + 1 ∣ Y [ k ] ) = π ( Y k + 1 × X k + 1 ∣ Y [ k ] ) . (10)
Here, the second equality holds since π \pi π is an extension of π k + 1 \pi_{k+1} π k + 1 . On the other hand, by definition of b k b_k b k and μ k + 1 \mu_{k+1} μ k + 1 , we have κ = ( h k + 1 , pr X k + 1 ) ∘ μ k + 1 ∧ \kappa=(h_{k+1},\operatorname{pr}_{X_{k+1}})\circ\mu_{k+1}^{\wedge} κ = ( h k + 1 , pr X k + 1 ) ∘ μ k + 1 ∧ . Hence by Proposition 4.5 with V = Y [ k ] V=Y^{[k]} V = Y [ k ] , we see that
h k + 1 μ k + 1 = κ ( X k + 1 ∣ Y k + 1 ) . (11) h_{k+1}^{\mu_{k+1}}=\kappa(X_{k+1}\mid Y_{k+1}). \tag*{(11)} h k + 1 μ k + 1 = κ ( X k + 1 ∣ Y k + 1 ) . (11)
Since κ = π ( Y k + 1 × X k + 1 ∣ Y [ k ] ) \kappa=\pi(Y_{k+1}\times X_{k+1}\mid Y^{[k]}) κ = π ( Y k + 1 × X k + 1 ∣ Y [ k ] ) by (10) , the tower property Theorem 2.7 and (11) give
π ( X k + 1 ∣ Y [ k ] × Y k + 1 ) = κ ( X k + 1 ∣ Y k + 1 ) = h k + 1 μ k + 1 , \pi(X_{k+1}\mid Y^{[k]}\times Y_{k+1})=\kappa(X_{k+1}\mid Y_{k+1})=h_{k+1}^{\mu_{k+1}}, π ( X k + 1 ∣ Y [ k ] × Y k + 1 ) = κ ( X k + 1 ∣ Y k + 1 ) = h k + 1 μ k + 1 ,
which is our assertion since Y [ k ] × Y k + 1 = Y [ k + 1 ] Y^{[k]}\times Y_{k+1}=Y^{[k+1]} Y [ k ] × Y k + 1 = Y [ k + 1 ] . □
In the special case that X k = X X_k = X X k = X and a k = id X a_k = \operatorname{id}_X a k = id X for all k k k , and the observations h k : X → Y k h_k : X \to Y_k h k : X → Y k do not depend on the past observations, then μ k + 1 \mu_{k+1} μ k + 1 is the posterior at time k k k , and Theorem 4.6 is exactly Corollary 3.5 .
Prediction and Smoothing
Since the transitions may depend on the observations, the prediction of the hidden state X j X_j X j at a future time j > k j > k j > k requires the prediction of the future observations Y ( k , j ] Y^{(k,j]} Y ( k , j ] as well, which is given by the conditional law π ( Y ( k , j ] × X j ∣ Y [ k ] ) \pi(Y^{(k,j]} \times X_j \mid Y^{[k]}) π ( Y ( k , j ] × X j ∣ Y [ k ] ) . For j = k j = k j = k this is the posterior π ( X k ∣ Y [ k ] ) \pi(X_k \mid Y^{[k]}) π ( X k ∣ Y [ k ] ) , since Y ( k , k ] = 1 Y^{(k,k]} = 1 Y ( k , k ] = 1 .
Theorem 4.7. Let the notations be as above.
(i) (Prediction) For $1 \leq k \leq j \leq n$, we have
π ( X j ∣ Y [ k ] ) = pr X j ∘ π ( Y ( k , j ] × X j ∣ Y [ k ] ) , \pi(X_j \mid Y^{[k]}) = \operatorname{pr}_{X_j} \circ\pi(Y^{(k,j]} \times X_j \mid Y^{[k]}), π ( X j ∣ Y [ k ] ) = pr X j ∘ π ( Y ( k , j ] × X j ∣ Y [ k ] ) , and if j < n j < n j < n , we have
π ( Y ( k , j + 1 ] × X j + 1 ∣ Y [ k ] ) = ( pr Y ( k , j ] , b j ) ∘ π ( Y ( k , j ] × X j ∣ Y [ k ] ) ∧ \pi(Y^{(k,j+1]} \times X_{j+1} \mid Y^{[k]}) = (\operatorname{pr}_{Y^{(k,j]}}, b_j) \circ\pi(Y^{(k,j]} \times X_j \mid Y^{[k]})^{\wedge} π ( Y ( k , j + 1 ] × X j + 1 ∣ Y [ k ] ) = ( pr Y ( k , j ] , b j ) ∘ π ( Y ( k , j ] × X j ∣ Y [ k ] ) ∧ for π Y [ k ] ( s ) \pi_{Y^{[k]}}(s) π Y [ k ] ( s ) -almost every ( y 1 , … , y k ) ∈ Y [ k ] (y_1,\ldots,y_k) \in Y^{[k]} ( y 1 , … , y k ) ∈ Y [ k ] for any s ∈ S s \in S s ∈ S . Here b j b_j b j is regarded as a stochastic morphism on S × Y [ k ] × Y ( k , j ] × X j = S × Y [ j ] × X j S \times Y^{[k]} \times Y^{(k,j]} \times X_j = S \times Y^{[j]} \times X_j S × Y [ k ] × Y ( k , j ] × X j = S × Y [ j ] × X j .
(ii) (Smoothing) For $1 \leq j < k \leq n$, we have
π ( X j ∣ Y [ k ] ) = a j π ( X j ∣ Y [ j ] ) ∘ π ( X j + 1 ∣ Y [ k ] ) ∧ \pi(X_j \mid Y^{[k]}) = a_j^{\pi(X_j\mid Y^{[j]})} \circ\pi(X_{j+1} \mid Y^{[k]})^{\wedge} π ( X j ∣ Y [ k ] ) = a j π ( X j ∣ Y [ j ] ) ∘ π ( X j + 1 ∣ Y [ k ] ) ∧ for π Y [ k ] ( s ) \pi_{Y^{[k]}}(s) π Y [ k ] ( s ) -almost every ( y 1 , … , y k ) ∈ Y [ k ] (y_1,\ldots,y_k) \in Y^{[k]} ( y 1 , … , y k ) ∈ Y [ k ] for any s ∈ S s \in S s ∈ S , where a j π ( X j ∣ Y [ j ] ) : S × Y [ j ] × X j + 1 → X j a_j^{\pi(X_j\mid Y^{[j]})} : S \times Y^{[j]} \times X_{j+1} \to X_j a j π ( X j ∣ Y [ j ] ) : S × Y [ j ] × X j + 1 → X j is the Bayesian inverse of a j a_j a j for the prior π ( X j ∣ Y [ j ] ) \pi(X_j \mid Y^{[j]}) π ( X j ∣ Y [ j ] ) , with V = Y [ j ] V = Y^{[j]} V = Y [ j ] in Definition 4.4 , regarded as a stochastic morphism on S × Y [ k ] × X j + 1 S \times Y^{[k]} \times X_{j+1} S × Y [ k ] × X j + 1 .
Proof. The first assertion of (i) is Lemma 2.6 (a) for a = pr X j : Y ( k , j ] × X j → X j a = \operatorname{pr}_{X_j}: Y^{(k,j]} \times X_j \to X_j a = pr X j : Y ( k , j ] × X j → X j . For the second, we regard π j = π Y [ j ] × X j \pi_j = \pi_{Y^{[j]} \times X_j} π j = π Y [ j ] × X j as a joint law on Y [ k ] × ( Y ( k , j ] × X j ) Y^{[k]} \times(Y^{(k,j]} \times X_j) Y [ k ] × ( Y ( k , j ] × X j ) , and let a : = ( pr Y ( k , j ] , b j ) : S × Y [ j ] × X j → Y ( k , j + 1 ] × X j + 1 a := (\operatorname{pr}_{Y^{(k,j]}}, b_j): S \times Y^{[j]} \times X_j \to Y^{(k,j+1]} \times X_{j+1} a := ( pr Y ( k , j ] , b j ) : S × Y [ j ] × X j → Y ( k , j + 1 ] × X j + 1 . Since Y [ j ] = Y [ k ] × Y ( k , j ] Y^{[j]} = Y^{[k]} \times Y^{(k,j]} Y [ j ] = Y [ k ] × Y ( k , j ] , we have ( pr Y [ k ] , a ) ∘ π j = ( pr Y [ k ] , b j ) ∘ π j = π j + 1 : S → Y [ j + 1 ] × X j + 1 (\operatorname{pr}_{Y^{[k]}},a)\circ\pi_j = (\operatorname{pr}_{Y^{[k]}},b_j)\circ\pi_j = \pi_{j+1}: S \to Y^{[j+1]} \times X_{j+1} ( pr Y [ k ] , a ) ∘ π j = ( pr Y [ k ] , b j ) ∘ π j = π j + 1 : S → Y [ j + 1 ] × X j + 1 by (1) and (8). Hence the general case of Lemma 2.6 (a), with Y [ k ] Y^{[k]} Y [ k ] and Y ( k , j ] × X j Y^{(k,j]} \times X_j Y ( k , j ] × X j in place of X X X and Y Y Y , gives
( pr Y ( k , j ] , b j ) ∘ π ( Y ( k , j ] × X j ∣ Y [ k ] ) ∧ = π j + 1 ( Y ( k , j + 1 ] × X j + 1 ∣ Y [ k ] ) = π ( Y ( k , j + 1 ] × X j + 1 ∣ Y [ k ] ) , (\operatorname{pr}_{Y^{(k,j]}}, b_j) \circ\pi(Y^{(k,j]} \times X_j \mid Y^{[k]})^{\wedge} = \pi_{j+1}(Y^{(k,j+1]} \times X_{j+1} \mid Y^{[k]}) = \pi(Y^{(k,j+1]} \times X_{j+1} \mid Y^{[k]}), ( pr Y ( k , j ] , b j ) ∘ π ( Y ( k , j ] × X j ∣ Y [ k ] ) ∧ = π j + 1 ( Y ( k , j + 1 ] × X j + 1 ∣ Y [ k ] ) = π ( Y ( k , j + 1 ] × X j + 1 ∣ Y [ k ] ) ,
which proves the second assertion. The recursion of (i) constructs π ( Y ( k , j ] × X j ∣ Y [ k ] ) \pi(Y^{(k,j]} \times X_j \mid Y^{[k]}) π ( Y ( k , j ] × X j ∣ Y [ k ] ) from the posterior π ( X k ∣ Y [ k ] ) \pi(X_k \mid Y^{[k]}) π ( X k ∣ Y [ k ] ) , which in particular shows the existence of these conditional laws.
We next prove (ii). Let $1 \leq j < k \leq n$. We first show that
π ( X j ∣ Y [ j ] ) = π ( X j ∣ Y [ j ] × X j + 1 ) . (12) \pi(X_j \mid Y^{[j]}) = \pi(X_j \mid Y^{[j]} \times X_{j+1}). \tag*{(12)} π ( X j ∣ Y [ j ] ) = π ( X j ∣ Y [ j ] × X j + 1 ) . (12)
By construction of π \pi π , the extension π Y [ j ] × X j + 1 × X j \pi_{Y^{[j]} \times X_{j+1} \times X_j} π Y [ j ] × X j + 1 × X j of π j \pi_j π j is π Y [ j ] × X j + 1 × X j = ( pr Y [ j ] , ( a j , pr X j ) ) ∘ π j \pi_{Y^{[j]} \times X_{j+1} \times X_j} = (\operatorname{pr}_{Y^{[j]}},(a_j,\operatorname{pr}_{X_j}))\circ\pi_j π Y [ j ] × X j + 1 × X j = ( pr Y [ j ] , ( a j , pr X j )) ∘ π j , hence by Lemma 2.6 (a) applied to π j \pi_j π j and a = ( a j , pr X j ) a = (a_j,\operatorname{pr}_{X_j}) a = ( a j , pr X j ) ,
κ : = ( a j , pr X j ) ∘ π ( X j ∣ Y [ j ] ) ∧ = π ( X j + 1 × X j ∣ Y [ j ] ) . \kappa:= (a_j,\operatorname{pr}_{X_j}) \circ\pi(X_j \mid Y^{[j]})^{\wedge} = \pi(X_{j+1} \times X_j \mid Y^{[j]}). κ := ( a j , pr X j ) ∘ π ( X j ∣ Y [ j ] ) ∧ = π ( X j + 1 × X j ∣ Y [ j ] ) .
By Proposition 4.5 with V = Y [ j ] V=Y^{[j]} V = Y [ j ] , the prior π ( X j ∣ Y [ j ] ) \pi(X_j\mid Y^{[j]}) π ( X j ∣ Y [ j ] ) and a j : Y [ j ] × X j → X j + 1 a_j:Y^{[j]}\times X_j\to X_{j+1} a j : Y [ j ] × X j → X j + 1 , we have a j π ( X j ∣ Y [ j ] ) = κ ( X j ∣ X j + 1 ) a_j^{\pi(X_j\mid Y^{[j]})}=\kappa(X_j\mid X_{j+1}) a j π ( X j ∣ Y [ j ] ) = κ ( X j ∣ X j + 1 ) , and since κ = π ( X j + 1 × X j ∣ Y [ j ] ) \kappa=\pi(X_{j+1}\times X_j\mid Y^{[j]}) κ = π ( X j + 1 × X j ∣ Y [ j ] ) , the tower property Theorem 2.7 gives π ( X j ∣ Y [ j ] × X j + 1 ) = κ ( X j ∣ X j + 1 ) \pi(X_j\mid Y^{[j]}\times X_{j+1})=\kappa(X_j\mid X_{j+1}) π ( X j ∣ Y [ j ] × X j + 1 ) = κ ( X j ∣ X j + 1 ) , which proves (12) .
We next show that
π ( X j ∣ Y [ k ] × X j + 1 ) = π ( X j ∣ Y [ j ] × X j + 1 ) : S × Y [ k ] × X j + 1 → X j . (13) \pi(X_j\mid Y^{[k]}\times X_{j+1})=\pi(X_j\mid Y^{[j]}\times X_{j+1}):S\times Y^{[k]}\times X_{j+1}\to X_j. \tag*{(13)} π ( X j ∣ Y [ k ] × X j + 1 ) = π ( X j ∣ Y [ j ] × X j + 1 ) : S × Y [ k ] × X j + 1 → X j . (13)
Let Y ~ : = Y ( j , k ] \widetilde{Y}:=Y^{(j,k]} Y := Y ( j , k ] , and let b : = pr Y ~ ∘ c k : Y [ j ] × X j + 1 → Y ~ b:=\operatorname{pr}_{\widetilde{Y}}\circ c_k:Y^{[j]}\times X_{j+1}\to\widetilde{Y} b := pr Y ∘ c k : Y [ j ] × X j + 1 → Y , where c l : Y [ j ] × X j + 1 → Y ( j , l ] × X l c_l:Y^{[j]}\times X_{j+1}\to Y^{(j,l]}\times X_l c l : Y [ j ] × X j + 1 → Y ( j , l ] × X l for l = j + 1 , … , k l=j+1,\ldots,k l = j + 1 , … , k is defined iteratively by c j + 1 : = ( h j + 1 , pr X j + 1 ) c_{j+1}:=(h_{j+1},\operatorname{pr}_{X_{j+1}}) c j + 1 := ( h j + 1 , pr X j + 1 ) and c l + 1 : = ( pr Y ( j , l ] , b l ) ∘ c l c_{l+1}:=(\operatorname{pr}_{Y^{(j,l]}},b_l)\circ c_l c l + 1 := ( pr Y ( j , l ] , b l ) ∘ c l , with b l b_l b l regarded as a stochastic morphism on Y [ j ] × X j + 1 × Y ( j , l ] × X l Y^{[j]}\times X_{j+1}\times Y^{(j,l]}\times X_l Y [ j ] × X j + 1 × Y ( j , l ] × X l . By construction of π \pi π , the future observations Y ~ = Y ( j , k ] \widetilde{Y}=Y^{(j,k]} Y = Y ( j , k ] are generated from Y [ j ] × X j + 1 Y^{[j]}\times X_{j+1} Y [ j ] × X j + 1 through b b b , independently of X j X_j X j , so that the extension π Y [ j ] × X j + 1 × Y ~ × X j \pi_{Y^{[j]}\times X_{j+1}\times\widetilde{Y}\times X_j} π Y [ j ] × X j + 1 × Y × X j of π Y [ j ] × X j + 1 × X j \pi_{Y^{[j]}\times X_{j+1}\times X_j} π Y [ j ] × X j + 1 × X j is
π Y [ j ] × X j + 1 × Y ~ × X j = ( pr Y [ j ] × X j + 1 , b , pr X j ) ∘ π Y [ j ] × X j + 1 × X j . \pi_{Y^{[j]}\times X_{j+1}\times\widetilde{Y}\times X_j}=(\operatorname{pr}_{Y^{[j]}\times X_{j+1}},b,\operatorname{pr}_{X_j})\circ\pi_{Y^{[j]}\times X_{j+1}\times X_j}. π Y [ j ] × X j + 1 × Y × X j = ( pr Y [ j ] × X j + 1 , b , pr X j ) ∘ π Y [ j ] × X j + 1 × X j .
Hence X j ⊥ π Y ~ ∣ Y [ j ] × X j + 1 X_j\perp_{\pi}\widetilde{Y}\mid Y^{[j]}\times X_{j+1} X j ⊥ π Y ∣ Y [ j ] × X j + 1 by Corollary 2.10 with W = Y [ j ] × X j + 1 W=Y^{[j]}\times X_{j+1} W = Y [ j ] × X j + 1 , X = X j X=X_j X = X j and Y = Y ~ Y=\widetilde{Y} Y = Y , and (13) follows from Lemma 2.9, noting that Y [ j ] × X j + 1 × Y ~ = Y [ k ] × X j + 1 Y^{[j]}\times X_{j+1}\times\widetilde{Y}=Y^{[k]}\times X_{j+1} Y [ j ] × X j + 1 × Y = Y [ k ] × X j + 1 up to the order of the factors. Finally, by the chain rule Lemma 2.6 (c), (13) and (12) , we have
π ( X j ∣ Y [ k ] ) = π ( X j ∣ Y [ k ] × X j + 1 ) ∘ π ( X j + 1 ∣ Y [ k ] ) ∧ = π ( X j ∣ Y [ j ] × X j + 1 ) ∘ π ( X j + 1 ∣ Y [ k ] ) ∧ = a j π ( X j ∣ Y [ j ] ) ∘ π ( X j + 1 ∣ Y [ k ] ) ∧ , \begin{aligned}
\pi(X_j\mid Y^{[k]})=\pi(X_j\mid Y^{[k]}\times X_{j+1})\circ\pi(X_{j+1}\mid Y^{[k]})^{\wedge} \\
&=\pi(X_j\mid Y^{[j]}\times X_{j+1})\circ\pi(X_{j+1}\mid Y^{[k]})^{\wedge}=a_j^{\pi(X_j\mid Y^{[j]})}\circ\pi(X_{j+1}\mid Y^{[k]})^{\wedge},
\end{aligned} π ( X j ∣ Y [ k ] ) = π ( X j ∣ Y [ k ] × X j + 1 ) ∘ π ( X j + 1 ∣ Y [ k ] ) ∧ = π ( X j ∣ Y [ j ] × X j + 1 ) ∘ π ( X j + 1 ∣ Y [ k ] ) ∧ = a j π ( X j ∣ Y [ j ] ) ∘ π ( X j + 1 ∣ Y [ k ] ) ∧ ,
which proves (ii). □
Remark 4.8. Iterating Theorem 4.7 (i) computes π ( Y ( k , j ] × X j ∣ Y [ k ] ) \pi(Y^{(k,j]}\times X_j\mid Y^{[k]}) π ( Y ( k , j ] × X j ∣ Y [ k ] ) for k < j ≤ n k<j\le n k < j ≤ n from the filter π ( X k ∣ Y [ k ] ) \pi(X_k\mid Y^{[k]}) π ( X k ∣ Y [ k ] ) , by propagating the hidden state together with the future observations, and the prediction π ( X j ∣ Y [ k ] ) \pi(X_j\mid Y^{[k]}) π ( X j ∣ Y [ k ] ) is its marginal. In the case without feedback, we have π ( X j + 1 ∣ Y [ k ] ) = a j ∘ π ( X j ∣ Y [ k ] ) \pi(X_{j+1}\mid Y^{[k]})=a_j\circ\pi(X_j\mid Y^{[k]}) π ( X j + 1 ∣ Y [ k ] ) = a j ∘ π ( X j ∣ Y [ k ] ) by (i), hence
π ( X j ∣ Y [ k ] ) = a j − 1 ∘ ⋯ ∘ a k ∘ π ( X k ∣ Y [ k ] ) , k < j ≤ n . \pi(X_j\mid Y^{[k]})=a_{j-1}\circ\cdots\circ a_k\circ\pi(X_k\mid Y^{[k]}),\qquad k<j\le n. π ( X j ∣ Y [ k ] ) = a j − 1 ∘ ⋯ ∘ a k ∘ π ( X k ∣ Y [ k ] ) , k < j ≤ n .
Similarly, iterating Theorem 4.7 (ii), the smoothed posteriors π ( X j ∣ Y [ k ] ) \pi(X_j\mid Y^{[k]}) π ( X j ∣ Y [ k ] ) for j < k j<k j < k are computed backward from the filter by composing with the Bayesian inverses of the transitions. By (12) , these are the conditional laws π ( X j ∣ Y [ j ] × X j + 1 ) \pi(X_j\mid Y^{[j]}\times X_{j+1}) π ( X j ∣ Y [ j ] × X j + 1 ) , the transition kernels of the hidden state process run backward, and (13) says that the future observations carry no further information on X j X_j X j once X j + 1 X_{j+1} X j + 1 is known.
Remark 4.9. The whole section uses only the three rules ( a ) (a) ( a ) –( c ) (c) ( c ) of the augmentation given in Lemma 2.5, through Lemmas 2.6 and 2.9 and Corollary 2.10 and the tower property Theorem 2.7. In particular, no densities and no explicit integrals appear. Measure theory is confined to the existence and uniqueness of the conditional law and to the verification of the three rules.
The Affine Gaussian Case: Kalman Filter and Smoother
In this section, we apply the results of §4 to the affine Gaussian model, and recover the Kalman filter [16 ] and the Rauch–Tung–Striebel smoother [21 ] , for models with feedback, whose coefficients may depend on the past observations. The key observation is that the conditional laws of a Gaussian joint law are again Gaussian, with mean and covariance given by explicit matrix formulas. Hence the identities of Theorems 4.6 and 4.7 , which hold for conditional laws, become recursions for means and covariances. All calculations reduce to the independence of the noise, Lemma 5.2 , and two properties of the Gaussian family, Lemma 5.3 , through the composition rule Proposition 5.5.
We say that a measurable space X X X is Euclidean if X = R d X X = \mathbb{R}^{d_X} X = R d X for an integer d X ≥ 0 d_X \ge0 d X ≥ 0 , called its dimension, with its standard inner product and Borel σ \sigma σ -algebra, where R 0 = 1 \mathbb{R}^{0} = 1 R 0 = 1 . We denote by M p × q ( R ) M_{p \times q}(\mathbb{R}) M p × q ( R ) the space of real p × q p \times q p × q matrices and by Sym d + ( R ) \operatorname{Sym}^{+}_{d}(\mathbb{R}) Sym d + ( R ) the space of symmetric positive semidefinite d × d d \times d d × d matrices, and we also equip M p × q ( R ) M_{p \times q}(\mathbb{R}) M p × q ( R ) and Sym d + ( R ) \operatorname{Sym}^{+}_{d}(\mathbb{R}) Sym d + ( R ) with their Borel σ \sigma σ -algebras. For P ∈ Sym d + ( R ) P \in\operatorname{Sym}^{+}_{d}(\mathbb{R}) P ∈ Sym d + ( R ) , we denote by P + P^{+} P + the Moore–Penrose inverse of P P P , so that P + ∈ Sym d + ( R ) P^{+} \in\operatorname{Sym}^{+}_{d}(\mathbb{R}) P + ∈ Sym d + ( R ) , P P + P = P PP^{+}P = P P P + P = P and P + P P + = P + P^{+}PP^{+} = P^{+} P + P P + = P + . Since P + = lim ε ↓ 0 ( P 2 + ε I ) − 1 P P^{+} = \lim_{\varepsilon\downarrow0}(P^{2} + \varepsilon I)^{-1}P P + = lim ε ↓ 0 ( P 2 + ε I ) − 1 P for P ∈ Sym d + ( R ) P \in\operatorname{Sym}^{+}_{d}(\mathbb{R}) P ∈ Sym d + ( R ) , the map P ↦ P + P \mapsto P^{+} P ↦ P + is measurable.
Mean and Covariance
Let π : S → X \pi: S \to X π : S → X be a stochastic morphism, and let g : X → R d ′ \mathbf{g} : X \to\mathbb{R}^{d'} g : X → R d ′ be a measurable function which is π ( s ) \pi(s) π ( s ) -integrable for any s ∈ S s \in S s ∈ S . Note that we use boldface to emphasize higher dimensional Euclidean vectors. We define the expectation of g \mathbf{g} g with respect to π \pi π to be the measurable function
E π [ g ] : S → R d ′ , E π [ g ] ( s ) : = ∫ X g ( x ) π ( s ) ( d x ) . \mathbb{E}_{\pi}[\mathbf{g}] : S \to\mathbb{R}^{d'}, \qquad\mathbb{E}_{\pi}[\mathbf{g}](s) := \int_X \mathbf{g}(x)\,\pi(s)(\mathrm{d}x). E π [ g ] : S → R d ′ , E π [ g ] ( s ) := ∫ X g ( x ) π ( s ) ( d x ) .
For g \mathbf{g} g bounded, E π [ g ] = π ∗ g \mathbb{E}_{\pi}[\mathbf{g}] = \pi^{*}\mathbf{g} E π [ g ] = π ∗ g is the pull-back of Definition B.1 with S S S in place of X X X .
Remark 5.1. In formulas for functions and stochastic morphisms on a product of measurable spaces with a Euclidean factor X X X , we write X X X for the coordinate projection pr X \operatorname{pr}_{X} pr X to X X X , and for id X \operatorname{id}_{X} id X when the product is X X X itself, in accordance with the classical notation E [ X ] \mathbb{E}[X] E [ X ] for a random variable X X X (see Remark 2.3, as well as the paragraph at the end of Appendix § 7 ).
We define the mean and the covariance matrix of π \pi π by E π [ X ] : = E π [ id X ] : S → X \mathbb{E}_{\pi}[X] := \mathbb{E}_{\pi}[\operatorname{id}_{X}] : S \to X E π [ X ] := E π [ id X ] : S → X and
V π [ X ] ( s ) : = ∫ X ( x − E π [ X ] ( s ) ) ( x − E π [ X ] ( s ) ) T π ( s ) ( d x ) , \mathbb{V}_{\pi}[X](s) := \int_X \left(x - \mathbb{E}_{\pi}[X](s)\right)\left(x - \mathbb{E}_{\pi}[X](s)\right)^{\mathsf{T}} \pi(s)(\mathrm{d}x), V π [ X ] ( s ) := ∫ X ( x − E π [ X ] ( s ) ) ( x − E π [ X ] ( s ) ) T π ( s ) ( d x ) ,
whenever E π [ ∣ X ∣ 2 ] : = E π [ ∣ id X ∣ 2 ] \mathbb{E}_{\pi}[|X|^{2}] := \mathbb{E}_{\pi}[|\operatorname{id}_{X}|^{2}] E π [ ∣ X ∣ 2 ] := E π [ ∣ id X ∣ 2 ] is finite for every s ∈ S s \in S s ∈ S . Then V π [ X ] : S → Sym d X + ( R ) \mathbb{V}_{\pi}[X] : S \to\operatorname{Sym}^{+}_{d_X}(\mathbb{R}) V π [ X ] : S → Sym d X + ( R ) is measurable. For a joint law π : S → X × Y \pi: S \to X \times Y π : S → X × Y on Euclidean X X X and Y Y Y , we have E π [ X ] = E π X [ X ] \mathbb{E}_{\pi}[X] = \mathbb{E}_{\pi_X}[X] E π [ X ] = E π X [ X ] , and define the cross-covariance Cov π [ X , Y ] : S → M d X × d Y ( R ) \operatorname{Cov}_{\pi}[X,Y] : S \to M_{d_X \times d_Y}(\mathbb{R}) Cov π [ X , Y ] : S → M d X × d Y ( R ) of X X X and Y Y Y by
Cov π [ X , Y ] ( s ) : = ∫ X × Y ( x − E π [ X ] ( s ) ) ( y − E π [ Y ] ( s ) ) T π ( s ) ( d x , d y ) . \operatorname{Cov}_{\pi}[X,Y](s) := \int_{X \times Y} \left(x - \mathbb{E}_{\pi}[X](s)\right)\left(y - \mathbb{E}_{\pi}[Y](s)\right)^{\mathsf{T}} \pi(s)(\mathrm{d}x,\mathrm{d}y). Cov π [ X , Y ] ( s ) := ∫ X × Y ( x − E π [ X ] ( s ) ) ( y − E π [ Y ] ( s ) ) T π ( s ) ( d x , d y ) .
The mean and covariance matrix of π \pi π are then the block matrices
E π [ X × Y ] = ( E π X [ X ] E π Y [ Y ] ) , V π [ X × Y ] = ( V π X [ X ] Cov π [ X , Y ] Cov π [ X , Y ] T V π Y [ Y ] ) . (14) \mathbb{E}_{\pi}[X \times Y] =
\begin{pmatrix}
\mathbb{E}_{\pi_X}[X]\\
\mathbb{E}_{\pi_Y}[Y]
\end{pmatrix},
\qquad
\mathbb{V}_{\pi}[X \times Y] =
\begin{pmatrix}
\mathbb{V}_{\pi_X}[X] & \operatorname{Cov}_{\pi}[X,Y]\\
\operatorname{Cov}_{\pi}[X,Y]^{\mathsf{T}} & \mathbb{V}_{\pi_Y}[Y]
\end{pmatrix}. \tag*{(14)} E π [ X × Y ] = ( E π X [ X ] E π Y [ Y ] ) , V π [ X × Y ] = ( V π X [ X ] Cov π [ X , Y ] T Cov π [ X , Y ] V π Y [ Y ] ) . (14)
Gaussian Stochastic Morphisms
For m ∈ R d \mathbf{m} \in\mathbb{R}^{d} m ∈ R d and P ∈ Sym d + ( R ) P \in\operatorname{Sym}^{+}_{d}(\mathbb{R}) P ∈ Sym d + ( R ) , we denote by N ( m , P ) \mathcal{N}(\mathbf{m},P) N ( m , P ) the Gaussian probability measure on R d \mathbb{R}^{d} R d with mean m \mathbf{m} m and covariance matrix P P P , characterized by its characteristic function
∫ R d e i u T x N ( m , P ) ( d x ) = exp ( i u T m − 1 2 u T P u ) , u ∈ R d . (15) \int_{\mathbb{R}^{d}} e^{i u^{\mathsf{T}}x}\,\mathcal{N}(\mathbf{m},P)(\mathrm{d}x) = \exp\left(iu^{\mathsf{T}}\mathbf{m} - \frac{1}{2}u^{\mathsf{T}}Pu\right), \qquad u \in\mathbb{R}^{d}. \tag*{(15)} ∫ R d e i u T x N ( m , P ) ( d x ) = exp ( i u T m − 2 1 u T P u ) , u ∈ R d . (15)
We allow the covariance matrix P P P to be singular. Let
Θ d : = R d × Sym d + ( R ) , \Theta_d := \mathbb{R}^d \times\operatorname{Sym}_d^+(\mathbb{R}), Θ d := R d × Sym d + ( R ) ,
which is a commutative monoid under addition. Since N ( m , P ) \mathcal{N}(\mathbf{m},P) N ( m , P ) is the image of N ( 0 , I ) \mathcal{N}(0,I) N ( 0 , I ) under the affine map x ↦ m + P 1 / 2 x \mathbf{x} \mapsto\mathbf{m} + P^{1/2}\mathbf{x} x ↦ m + P 1/2 x , and P 1 / 2 P^{1/2} P 1/2 depends continuously on P P P , the Gaussian family
N : Θ d → R d , ( m , P ) ↦ N ( m , P ) \mathcal{N}: \Theta_d \to\mathbb{R}^d,\qquad(\mathbf{m},P) \mapsto\mathcal{N}(\mathbf{m},P) N : Θ d → R d , ( m , P ) ↦ N ( m , P )
is a stochastic morphism, and for a measurable space S S S and measurable functions m : S → R d \mathbf{m}: S \to\mathbb{R}^d m : S → R d and P : S → Sym d + ( R ) P: S \to\operatorname{Sym}_d^+(\mathbb{R}) P : S → Sym d + ( R ) , the composition N ( m , P ) : = N ∘ ( m , P ) : S → R d \mathcal{N}(\mathbf{m},P) := \mathcal{N} \circ(\mathbf{m},P): S \to\mathbb{R}^d N ( m , P ) := N ∘ ( m , P ) : S → R d , s ↦ N ( m ( s ) , P ( s ) ) s \mapsto\mathcal{N}(\mathbf{m}(s),P(s)) s ↦ N ( m ( s ) , P ( s )) , is a stochastic morphism.
We next introduce the sum and the linear image of stochastic morphisms with values in a Euclidean space, which express adding an independent noise and applying a linear map. Let S S S be a measurable space. For stochastic morphisms p , q : S → R d p,q:S \to\mathbb{R}^d p , q : S → R d , we define the sum
p + q : = + ∘ ( p , q ) : S → R d , p+q := + \circ(p,q): S \to\mathbb{R}^d, p + q := + ∘ ( p , q ) : S → R d ,
where ( p , q ) : S → R d × R d (p,q):S \to\mathbb{R}^d \times\mathbb{R}^d ( p , q ) : S → R d × R d is the product of §2 and + : R d × R d → R d +:\mathbb{R}^d \times\mathbb{R}^d \to\mathbb{R}^d + : R d × R d → R d is the stochastic morphism induced by the measurable addition map ( x , x ′ ) ↦ x + x ′ (\mathbf{x},\mathbf{x}') \mapsto\mathbf{x}+\mathbf{x}' ( x , x ′ ) ↦ x + x ′ . Since ( p , q ) (p,q) ( p , q ) is the product, p + q p+q p + q is the law of the sum of independent variables. In particular, p + p ≠ 2 p p+p \ne2p p + p = 2 p in general.
Lemma 5.2 below states that a noise which depends only on the parameter is independent of the input, which is the property of the noise used in Kalman filtering.
Lemma 5.2 (Independent Noise). Let κ : S → Y \kappa:S \to Y κ : S → Y be a stochastic morphism between measurable spaces. Furthermore, let f : S × Y → R d f:S \times Y \to\mathbb{R}^d f : S × Y → R d be a measurable map, and let ε : S → R d \varepsilon:S \to\mathbb{R}^d ε : S → R d be a stochastic morphism, which we view as a morphism on S × Y S \times Y S × Y . Then
( f + ε ) ∘ κ ∧ = f ∘ κ ∧ + ε : S → R d . (f+\varepsilon)\circ\kappa^\wedge= f\circ\kappa^\wedge+\varepsilon:S \to\mathbb{R}^d. ( f + ε ) ∘ κ ∧ = f ∘ κ ∧ + ε : S → R d .
Proof. We regard ε \varepsilon ε as the morphism ε ∘ pr S : S × Y → R d \varepsilon\circ\operatorname{pr}_S:S \times Y \to\mathbb{R}^d ε ∘ pr S : S × Y → R d . By (1) , we have
( f , ε ∘ pr S ) = ( f × id R d ) ∘ ( ε ∘ pr S ) ∧ : S × Y → R d × R d . (f,\varepsilon\circ\operatorname{pr}_S)=(f \times\operatorname{id}_{\mathbb{R}^d})\circ(\varepsilon\circ\operatorname{pr}_S)^\wedge:S \times Y \to\mathbb{R}^d \times\mathbb{R}^d. ( f , ε ∘ pr S ) = ( f × id R d ) ∘ ( ε ∘ pr S ) ∧ : S × Y → R d × R d .
where ( ε ∘ pr S ) ∧ = ( id S × Y , ε ∘ pr S ) : S × Y → S × Y × R d (\varepsilon\circ\operatorname{pr}_S)^\wedge=(\operatorname{id}_{S\times Y},\varepsilon\circ\operatorname{pr}_S):S\times Y\to S\times Y\times\mathbb{R}^d ( ε ∘ pr S ) ∧ = ( id S × Y , ε ∘ pr S ) : S × Y → S × Y × R d is the augmentation with parameter space S × Y S\times Y S × Y . By Lemma 2.5 (c) applied to κ \kappa κ and ε \varepsilon ε , we have ( ε ∘ pr S ) ∧ ∘ κ ∧ = ( id S , κ , ε ) = ( κ ∧ , ε ) (\varepsilon\circ\operatorname{pr}_S)^\wedge\circ\kappa^\wedge=(\operatorname{id}_S,\kappa,\varepsilon)=(\kappa^\wedge,\varepsilon) ( ε ∘ pr S ) ∧ ∘ κ ∧ = ( id S , κ , ε ) = ( κ ∧ , ε ) . Hence by (1) ,
( f , ε ∘ pr S ) ∘ κ ∧ = ( f × id R d ) ∘ ( κ ∧ , ε ) = ( f ∘ κ ∧ , ε ) , (f,\varepsilon\circ\operatorname{pr}_S)\circ\kappa^\wedge=(f\times\operatorname{id}_{\mathbb{R}^d})\circ(\kappa^\wedge,\varepsilon)=(f\circ\kappa^\wedge,\varepsilon), ( f , ε ∘ pr S ) ∘ κ ∧ = ( f × id R d ) ∘ ( κ ∧ , ε ) = ( f ∘ κ ∧ , ε ) ,
and composing with + + + gives the assertion. □
For a measurable function A : S → M d ′ × d ( R ) A:S \to M_{d'\times d}(\mathbb{R}) A : S → M d ′ × d ( R ) , we define the linear image of a stochastic morphism p : S → R d p:S \to\mathbb{R}^d p : S → R d to be the stochastic morphism
A p : S → R d ′ , ( A p ) ( s ) : = A ( s ) ( p ( s ) ) , Ap:S \to\mathbb{R}^{d'},\qquad(Ap)(s):=A(s)(p(s)), A p : S → R d ′ , ( A p ) ( s ) := A ( s ) ( p ( s )) ,
where A ( s ) ( p ( s ) ) A(s)(p(s)) A ( s ) ( p ( s )) is the push-forward of the probability measure p ( s ) p(s) p ( s ) on R d \mathbb{R}^d R d under the linear map A ( s ) : R d → R d ′ A(s):\mathbb{R}^d \to\mathbb{R}^{d'} A ( s ) : R d → R d ′ . The Gaussian family has the following two properties.
Lemma 5.3 (Gaussian Family). Let S S S be a measurable space, and let m , m ′ : S → R d \mathbf{m},\mathbf{m}':S \to\mathbb{R}^d m , m ′ : S → R d , P , P ′ : S → Sym d + ( R ) P,P':S \to\operatorname{Sym}_d^+(\mathbb{R}) P , P ′ : S → Sym d + ( R ) and A : S → M d ′ × d ( R ) A:S \to M_{d'\times d}(\mathbb{R}) A : S → M d ′ × d ( R ) be measurable.
(i) (Sum) N ( m , P ) + N ( m ′ , P ′ ) = N ( m + m ′ , P + P ′ ) \mathcal{N}(\mathbf{m},P)+\mathcal{N}(\mathbf{m}',P')=\mathcal{N}(\mathbf{m}+\mathbf{m}',P+P') N ( m , P ) + N ( m ′ , P ′ ) = N ( m + m ′ , P + P ′ ) .
(ii) (Linear image) A N ( m , P ) = N ( A m , A P A T ) A\mathcal{N}(\mathbf{m},P)=\mathcal{N}(A\mathbf{m},APA^{\mathsf{T}}) A N ( m , P ) = N ( A m , A P A T ) .
In particular, we have N ( m , P ) = m + N ( 0 , P ) \mathcal{N}(\mathbf{m},P)=\mathbf{m}+\mathcal{N}(0,P) N ( m , P ) = m + N ( 0 , P ) .
Proof. It suffices to prove the assertions for each s ∈ S s\in S s ∈ S . The characteristic function of the image of a product measure under the addition is the product of the characteristic functions, and that of A ( s ) ( N ( m ( s ) , P ( s ) ) ) A(s)(\mathcal{N}(\mathbf{m}(s),P(s))) A ( s ) ( N ( m ( s ) , P ( s ))) at u \mathbf{u} u is that of N ( m ( s ) , P ( s ) ) \mathcal{N}(\mathbf{m}(s),P(s)) N ( m ( s ) , P ( s )) at A ( s ) T u A(s)^{\mathsf{T}}\mathbf{u} A ( s ) T u . Both assertions follow from (15) and the uniqueness of characteristic functions. The last statement is (i) applied to m = N ( m , 0 ) \mathbf{m}=\mathcal{N}(\mathbf{m},0) m = N ( m , 0 ) and N ( 0 , P ) \mathcal{N}(0,P) N ( 0 , P ) . □ \square □
In the language of stochastic morphisms, (i) states that we have an equality of stochastic morphisms + ∘ ( N × N ) = N ∘ + : Θ d × Θ d → R d +\circ(\mathcal{N}\times\mathcal{N})=\mathcal{N}\circ+: \Theta_d\times\Theta_d\to\mathbb{R}^d + ∘ ( N × N ) = N ∘ + : Θ d × Θ d → R d , that is, the Gaussian family N : Θ d → R d \mathcal{N}:\Theta_d\to\mathbb{R}^d N : Θ d → R d is a homomorphism of monoids in the stochastic category, and (ii) states that N \mathcal{N} N is compatible with linear maps.
Definition 5.4. Let S S S be a measurable space, and let X X X and Y Y Y be Euclidean.
(i) We say that a stochastic morphism μ : S → Y \mu:S\to Y μ : S → Y is Gaussian if μ ( s ) \mu(s) μ ( s ) is a Gaussian measure for any s ∈ S s\in S s ∈ S , that is, μ = N ( m , P ) : S → Y \mu=\mathcal{N}(\mathbf{m},P):S\to Y μ = N ( m , P ) : S → Y for measurable functions m : S → Y \mathbf{m}:S\to Y m : S → Y and P : S → Sym d Y + ( R ) P:S\to\operatorname{Sym}^{+}_{d_Y}(\mathbb{R}) P : S → Sym d Y + ( R ) , which are the mean E μ [ Y ] \mathbb{E}_{\mu}[Y] E μ [ Y ] and the covariance matrix V μ [ Y ] \mathbb{V}_{\mu}[Y] V μ [ Y ] of μ \mu μ .
(ii) We say that a stochastic morphism h : S × X → Y h:S\times X\to Y h : S × X → Y is affine Gaussian in X X X if h = N ( A X + b , R ) : S × X → Y h=\mathcal{N}(AX+\mathbf{b},R):S\times X\to Y h = N ( A X + b , R ) : S × X → Y , that is, there exist measurable functions A : S → M d Y × d X ( R ) A:S\to M_{d_Y\times d_X}(\mathbb{R}) A : S → M d Y × d X ( R ) , b : S → Y \mathbf{b}:S\to Y b : S → Y , R : S → Sym d Y + ( R ) R:S\to\operatorname{Sym}^{+}_{d_Y}(\mathbb{R}) R : S → Sym d Y + ( R ) such that h ( s , x ) = N ( A ( s ) x + b ( s ) , R ( s ) ) h(s,\mathbf{x})=\mathcal{N}(A(s)\mathbf{x}+\mathbf{b}(s),R(s)) h ( s , x ) = N ( A ( s ) x + b ( s ) , R ( s )) for any ( s , x ) ∈ S × X (s,\mathbf{x})\in S\times X ( s , x ) ∈ S × X . Here, A A A , b \mathbf{b} b and R R R are regarded as functions on S × X S\times X S × X through pr S \operatorname{pr}_{S} pr S . We call A X + b : S × X → Y AX+\mathbf{b}:S\times X\to Y A X + b : S × X → Y the mean function , A A A the linear part , and R R R the covariance matrix of h h h . Thus h h h may depend on the parameter s ∈ S s\in S s ∈ S in an arbitrary measurable way, while it is affine in X X X with covariance matrix independent of X X X . Note that here, X X X denotes the coordinate projection pr X : S × X → X \operatorname{pr}_{X}:S\times X\to X pr X : S × X → X as in Remark 5.1.
The following composition rule is a consequence of Lemmas 5.2 and 5.3 .
Proposition 5.5 (Composition of Affine Gaussian Morphisms). Let S S S be a measurable space, and let X X X , Y Y Y and Z Z Z be Euclidean.
(i) (Composition) For stochastic morphisms h 1 = N ( A 1 X + b 1 , R 1 ) : S × X → Y h_1=\mathcal{N}(A_1X+\mathbf{b}_1,R_1):S\times X\to Y h 1 = N ( A 1 X + b 1 , R 1 ) : S × X → Y , h 2 = N ( A 2 Y + b 2 , R 2 ) : S × Y → Z \quad h_2=\mathcal{N}(A_2Y+\mathbf{b}_2,R_2):S\times Y\to Z h 2 = N ( A 2 Y + b 2 , R 2 ) : S × Y → Z , affine Gaussian in X X X and in Y Y Y respectively, the composition h 2 ∘ h 1 ∧ : S × X → Z h_2\circ h_1^{\wedge}:S\times X\to Z h 2 ∘ h 1 ∧ : S × X → Z is affine Gaussian in X X X , given by
h 2 ∘ h 1 ∧ = N ( A 2 A 1 X + A 2 b 1 + b 2 , A 2 R 1 A 2 T + R 2 ) . (16) h_2\circ h_1^{\wedge}=\mathcal{N}\left(A_2A_1X+A_2\mathbf{b}_1+\mathbf{b}_2,\ A_2R_1A_2^{\mathsf{T}}+R_2\right). \tag*{(16)} h 2 ∘ h 1 ∧ = N ( A 2 A 1 X + A 2 b 1 + b 2 , A 2 R 1 A 2 T + R 2 ) . (16) (ii) (Push-forward) For a Gaussian μ = N ( m , P ) : S → X \mu=\mathcal{N}(\mathbf{m},P):S\to X μ = N ( m , P ) : S → X and h = N ( A X + b , R ) : S × X → Y h=\mathcal{N}(AX+\mathbf{b},R):S\times X\to Y h = N ( A X + b , R ) : S × X → Y affine Gaussian in X X X , we have
h ∘ μ ∧ = N ( A m + b , A P A T + R ) : S → Y . (17) h\circ\mu^{\wedge}=\mathcal{N}\left(A\mathbf{m}+\mathbf{b},\ APA^{\mathsf{T}}+R\right):S\to Y. \tag*{(17)} h ∘ μ ∧ = N ( A m + b , A P A T + R ) : S → Y . (17)
(iii) (Joint law). For μ \mu μ and h h h as in (ii), the stochastic morphism ( pr X , h ) : S × X → X × Y (\operatorname{pr}_{X},h): S \times X \to X \times Y ( pr X , h ) : S × X → X × Y is affine Gaussian in X X X , and the joint law κ : = ( pr X , h ) ∘ μ : S → X × Y \kappa:= (\operatorname{pr}_{X},h) \circ\mu: S \to X \times Y κ := ( pr X , h ) ∘ μ : S → X × Y is Gaussian with
E κ [ X × Y ] = ( m A m + b ) , V κ [ X × Y ] = ( P P A T A P A P A T + R ) . (18) \mathbb{E}_{\kappa}[X \times Y] =
\begin{pmatrix}
m \\
Am+b
\end{pmatrix},
\qquad
\mathop{\mathrm{V}}\nolimits_{\kappa}[X \times Y] =
\begin{pmatrix}
P & PA^{\mathsf T} \\
AP & APA^{\mathsf T}+R
\end{pmatrix}. \tag*{(18)} E κ [ X × Y ] = ( m A m + b ) , V κ [ X × Y ] = ( P A P P A T A P A T + R ) . (18)
Proof. For (i), we have h 2 = A 2 Y + b 2 + N ( 0 , R 2 ) h_{2}=A_{2}Y+b_{2}+\mathcal{N}(0,R_{2}) h 2 = A 2 Y + b 2 + N ( 0 , R 2 ) by Lemma 5.3 , so that regarding h 2 h_{2} h 2 as a stochastic morphism on S × X × Y S \times X \times Y S × X × Y , we have h 2 = f + N ( 0 , R 2 ) ∘ pr S × X : S × X × Y → Z h_{2}=f+\mathcal{N}(0,R_{2})\circ\operatorname{pr}_{S\times X}:S\times X\times Y\to Z h 2 = f + N ( 0 , R 2 ) ∘ pr S × X : S × X × Y → Z for the measurable function f : S × X × Y → Z f:S\times X\times Y\to Z f : S × X × Y → Z , f ( s , x , y ) : = A 2 ( s ) y + b 2 ( s ) f(s,x,y):=A_{2}(s)y+b_{2}(s) f ( s , x , y ) := A 2 ( s ) y + b 2 ( s ) . Hence by Lemma 5.2 applied with S × X S\times X S × X in place of S S S , we have
h 2 ∘ h 1 ∧ = f ∘ h 1 ∧ + N ( 0 , R 2 ) = A 2 h 1 + b 2 + N ( 0 , R 2 ) . h_{2}\circ h_{1}^{\wedge}=f\circ h_{1}^{\wedge}+\mathcal{N}(0,R_{2})=A_{2}h_{1}+b_{2}+\mathcal{N}(0,R_{2}). h 2 ∘ h 1 ∧ = f ∘ h 1 ∧ + N ( 0 , R 2 ) = A 2 h 1 + b 2 + N ( 0 , R 2 ) .
Since h 1 = A 1 X + b 1 + N ( 0 , R 1 ) h_{1}=A_{1}X+b_{1}+\mathcal{N}(0,R_{1}) h 1 = A 1 X + b 1 + N ( 0 , R 1 ) by Lemma 5.3 , Lemma 5.3 (ii) gives
A 2 h 1 = A 2 A 1 X + A 2 b 1 + A 2 N ( 0 , R 1 ) = A 2 A 1 X + A 2 b 1 + N ( 0 , A 2 R 1 A 2 T ) , A_{2}h_{1}=A_{2}A_{1}X+A_{2}b_{1}+A_{2}\mathcal{N}(0,R_{1})=A_{2}A_{1}X+A_{2}b_{1}+\mathcal{N}(0,A_{2}R_{1}A_{2}^{\mathsf T}), A 2 h 1 = A 2 A 1 X + A 2 b 1 + A 2 N ( 0 , R 1 ) = A 2 A 1 X + A 2 b 1 + N ( 0 , A 2 R 1 A 2 T ) ,
and (16) follows from Lemma 5.3 (i). Furthermore, (ii) is (i) with X X X , Y Y Y and Z Z Z replaced by 1 1 1 , X X X and Y Y Y , applied to h 1 = μ h_{1}=\mu h 1 = μ regarded as S × 1 → X S\times1\to X S × 1 → X with A 1 = 0 A_{1}=0 A 1 = 0 , b 1 = m b_{1}=m b 1 = m and R 1 = P R_{1}=P R 1 = P , and h 2 = h h_{2}=h h 2 = h .
Finally, for (iii), let ι Y : Y → X × Y \iota_{Y}:Y\to X\times Y ι Y : Y → X × Y be the linear map y ↦ ( 0 , y ) y\mapsto(0,y) y ↦ ( 0 , y ) . Since ( pr X , h ) ( s , x ) (\operatorname{pr}_{X},h)(s,x) ( pr X , h ) ( s , x ) is the image of h ( s , x ) h(s,x) h ( s , x ) under the map y ↦ ( x , 0 ) + ι Y ( y ) y\mapsto(x,0)+\iota_{Y}(y) y ↦ ( x , 0 ) + ι Y ( y ) , Lemma 5.3 (ii) gives
( pr X , h ) = N ( ( I A ) X + ( 0 b ) , ( 0 0 0 R ) ) , (\operatorname{pr}_{X},h)=\mathcal{N}\left(
\begin{pmatrix}
I\\
A
\end{pmatrix}X+
\begin{pmatrix}
0\\
b
\end{pmatrix},
\begin{pmatrix}
0 & 0\\
0 & R
\end{pmatrix}
\right), ( pr X , h ) = N ( ( I A ) X + ( 0 b ) , ( 0 0 0 R ) ) ,
which is affine Gaussian in X X X . Then (ii) gives (18). □ \square □
We next show that a Gaussian joint law has a Gaussian conditional law, given by an explicit formula. The linear algebra involved is the following.
Lemma 5.7. Consider the matrix
M = ( P X C C T P Y ) ∈ Sym d X + d Y + ( R ) M=
\begin{pmatrix}
P_{X} & C\\
C^{\mathsf T} & P_{Y}
\end{pmatrix}
\in\operatorname{Sym}^{+}_{d_{X}+d_{Y}}(\mathbb{R}) M = ( P X C T C P Y ) ∈ Sym d X + d Y + ( R ) with P X ∈ Sym d X + ( R ) P_{X}\in\operatorname{Sym}^{+}_{d_{X}}(\mathbb{R}) P X ∈ Sym d X + ( R ) , P Y ∈ Sym d Y + ( R ) P_{Y}\in\operatorname{Sym}^{+}_{d_{Y}}(\mathbb{R}) P Y ∈ Sym d Y + ( R ) and C ∈ M d X × d Y ( R ) C\in M_{d_{X}\times d_{Y}}(\mathbb{R}) C ∈ M d X × d Y ( R ) , and let
K : = C P Y + ∈ M d X × d Y ( R ) , Σ : = P X − C P Y + C T . K:=CP_{Y}^{+}\in M_{d_{X}\times d_{Y}}(\mathbb{R}),
\qquad
\Sigma:=P_{X}-CP_{Y}^{+}C^{\mathsf T}. K := C P Y + ∈ M d X × d Y ( R ) , Σ := P X − C P Y + C T . Then K P Y = C KP_{Y}=C K P Y = C , and Σ = P X − K P Y K T = ( I − K ) M ( I − K ) T ∈ Sym d X + ( R ) \Sigma=P_{X}-KP_{Y}K^{\mathsf T}=(I-K)M(I-K)^{\mathsf T}\in\operatorname{Sym}^{+}_{d_{X}}(\mathbb{R}) Σ = P X − K P Y K T = ( I − K ) M ( I − K ) T ∈ Sym d X + ( R ) .
Proof. If P Y w = 0 P_{Y}w=0 P Y w = 0 , then 0 ≤ ( v , t w ) M ( v , t w ) T = v T P X v + 2 t v T C w 0\leq(v,tw)M(v,tw)^{\mathsf T}=v^{\mathsf T}P_{X}v+2t\,v^{\mathsf T}Cw 0 ≤ ( v , tw ) M ( v , tw ) T = v T P X v + 2 t v T C w for all v ∈ R d X v\in\mathbb{R}^{d_{X}} v ∈ R d X and t ∈ R t\in\mathbb{R} t ∈ R , hence C w = 0 Cw=0 C w = 0 . Thus Ker P Y ⊂ Ker C \operatorname{Ker}P_{Y}\subset\operatorname{Ker}C Ker P Y ⊂ Ker C , so Im C T ⊂ Im P Y \operatorname{Im}C^{\mathsf T}\subset\operatorname{Im}P_{Y} Im C T ⊂ Im P Y , and since P Y + P Y = P Y P Y + P_{Y}^{+}P_{Y}=P_{Y}P_{Y}^{+} P Y + P Y = P Y P Y + is the orthogonal projection onto Im P Y \operatorname{Im}P_{Y} Im P Y , we have K P Y = C P Y + P Y = C KP_{Y}=CP_{Y}^{+}P_{Y}=C K P Y = C P Y + P Y = C . Then
( I − K ) M ( I − K ) T = P X − K C T − C K T + K P Y K T = P X − C P Y + C T = Σ , (I-K)M(I-K)^{\mathsf T}=P_{X}-KC^{\mathsf T}-CK^{\mathsf T}+KP_{Y}K^{\mathsf T}=P_{X}-CP_{Y}^{+}C^{\mathsf T}=\Sigma, ( I − K ) M ( I − K ) T = P X − K C T − C K T + K P Y K T = P X − C P Y + C T = Σ , since K C T = C P Y + C T = C K T KC^{\mathsf T}=CP_{Y}^{+}C^{\mathsf T}=CK^{\mathsf T} K C T = C P Y + C T = C K T and K P Y K T = C K T KP_{Y}K^{\mathsf T}=CK^{\mathsf T} K P Y K T = C K T . In particular Σ = P X − K P Y K T \Sigma=P_{X}-KP_{Y}K^{\mathsf T} Σ = P X − K P Y K T is positive semidefinite. □ \square □
Proposition 5.8 (Gaussian Conditioning). Let
π : S → X × Y \pi:S\to X\times Y π : S → X × Y be a Gaussian joint law on Euclidean X X X and Y Y Y such that
E π [ X × Y ] = ( m X m Y ) , V π [ X × Y ] = ( P X C C T P Y ) , \mathbb{E}_{\pi}[X\times Y]=\begin{pmatrix}m_X\\m_Y\end{pmatrix},\qquad
\mathop{\mathrm{V}}\nolimits_{\pi}[X\times Y]=\begin{pmatrix}P_X&C\\C^{\mathsf T}&P_Y\end{pmatrix}, E π [ X × Y ] = ( m X m Y ) , V π [ X × Y ] = ( P X C T C P Y ) , where C : = Cov π [ X , Y ] : S → M d X × d Y ( R ) C:=\operatorname{Cov}_{\pi}[X,Y]:S\to M_{d_X\times d_Y}(\mathbb{R}) C := Cov π [ X , Y ] : S → M d X × d Y ( R ) is the cross-covariance, and let K : = C P Y + : S → M d X × d Y ( R ) K:=CP_Y^{+}:S\to M_{d_X\times d_Y}(\mathbb{R}) K := C P Y + : S → M d X × d Y ( R ) . Then the conditional law π ( X ∣ Y ) : S × Y → X \pi(X\mid Y):S\times Y\to X π ( X ∣ Y ) : S × Y → X of X X X given Y Y Y for π \pi π satisfies
π ( X ∣ Y ) = N ( m X + K ( Y − m Y ) , P X − K P Y K T ) \pi(X\mid Y)=\mathcal{N}\left(m_X+K(Y-m_Y),P_X-KP_YK^{\mathsf T}\right) π ( X ∣ Y ) = N ( m X + K ( Y − m Y ) , P X − K P Y K T ) for π Y ( s ) \pi_Y(s) π Y ( s ) -almost every y ∈ Y y\in Y y ∈ Y for any s ∈ S s\in S s ∈ S , where the mean and covariance are evaluated at $s.
Proof. Let Σ : = P X − K P Y K T \Sigma:=P_X-KP_YK^{\mathsf T} Σ := P X − K P Y K T . The functions K K K and Σ \Sigma Σ on S S S are measurable, since the moments and the Moore–Penrose inverse are measurable. By Lemma 5.7 applied to the covariance matrix of π ( s ) \pi(s) π ( s ) for each s ∈ S s\in S s ∈ S , Σ \Sigma Σ takes values in Sym d X + ( R ) \operatorname{Sym}^{+}_{d_X}(\mathbb{R}) Sym d X + ( R ) , hence
κ : = N ( m X + K ( Y − m Y ) , Σ ) : S × Y → X \kappa:=\mathcal{N}\left(m_X+K(Y-m_Y),\Sigma\right):S\times Y\to X κ := N ( m X + K ( Y − m Y ) , Σ ) : S × Y → X is a stochastic morphism affine Gaussian in Y Y Y with linear part K K K , which is the right hand side of the assertion. By the uniqueness of the conditional law, Theorem 2.2, it suffices to show that κ \kappa κ is a conditional law of X X X given Y Y Y for π \pi π , that is, ( pr Y , κ ) ∘ ( π Y ) ∧ = π Y × X (\operatorname{pr}_Y,\kappa)\circ(\pi_Y)^{\wedge}=\pi_{Y\times X} ( pr Y , κ ) ∘ ( π Y ) ∧ = π Y × X . By Proposition 5.5 (iii) for the Gaussian π Y = N ( m Y , P Y ) : S → Y \pi_Y=\mathcal{N}(m_Y,P_Y):S\to Y π Y = N ( m Y , P Y ) : S → Y and κ \kappa κ , which is affine Gaussian in Y Y Y , the left hand side is Gaussian with mean ( m Y , m X + K ( m Y − m Y ) ) = ( m Y , m X ) (m_Y,m_X+K(m_Y-m_Y))=(m_Y,m_X) ( m Y , m X + K ( m Y − m Y )) = ( m Y , m X ) and covariance matrix
( P Y P Y K T K P Y K P Y K T + Σ ) = ( P Y C T C P X ) , \begin{pmatrix}
P_Y&P_YK^{\mathsf T}\\
KP_Y&KP_YK^{\mathsf T}+\Sigma
\end{pmatrix}
=
\begin{pmatrix}
P_Y&C^{\mathsf T}\\
C&P_X
\end{pmatrix}, ( P Y K P Y P Y K T K P Y K T + Σ ) = ( P Y C C T P X ) , by K P Y = C KP_Y=C K P Y = C of Lemma 5.7. These are the mean and covariance matrix of the Gaussian measure π Y × X ( s ) \pi_{Y\times X}(s) π Y × X ( s ) , hence the two sides agree. □
Combining Propositions 5.5 and 5.8 with Proposition 4.5, we see that the Bayesian inverse of an observation affine Gaussian in the hidden state, with respect to a Gaussian prior, is affine Gaussian in the observation, with coefficients given by the Kalman gain and the posterior covariance. In other words, affine Gaussian stochastic morphisms are closed under Bayesian inversion.
Corollary 5.9 (Affine Gaussian Bayesian Inverse). Let V V V be a measurable space, and let X X X and Y Y Y be Euclidean. Consider a Gaussian prior and an observation affine Gaussian in X X X
μ = N ( m , P ) : S × V → X , h = N ( A X + b , R ) : V × X → Y , \mu=\mathcal{N}(m,P):S\times V\to X,\qquad h=\mathcal{N}(AX+b,R):V\times X\to Y, μ = N ( m , P ) : S × V → X , h = N ( A X + b , R ) : V × X → Y , as in Definition 4.4, where m , P m,P m , P are measurable functions on S × V S\times V S × V and A , b , R A,b,R A , b , R are measurable functions on V V V , regarded as functions on S × V S\times V S × V through pr V \operatorname{pr}_V pr V . Let
D : = A P A T + R : S × V → Sym d Y + ( R ) , K : = P A T D + : S × V → M d X × d Y ( R ) . D:=APA^{\mathsf T}+R:S\times V\to\operatorname{Sym}^{+}_{d_Y}(\mathbb{R}),\qquad K:=PA^{\mathsf T}D^{+}:S\times V\to M_{d_X\times d_Y}(\mathbb{R}). D := A P A T + R : S × V → Sym d Y + ( R ) , K := P A T D + : S × V → M d X × d Y ( R ) .
Then the law of the observation and the Bayesian inverse of h h h with respect to μ \mu μ are
h ∘ μ ∧ = N ( A m + b , D ) : S × V → Y , h \circ\mu^{\wedge} = \mathcal{N}(A\mathbf{m}+\mathbf{b},D): S \times V \to Y, h ∘ μ ∧ = N ( A m + b , D ) : S × V → Y ,
h μ = N ( m + K ( Y − A m − b ) , P − K D K T ) : S × V × Y → X , h^\mu= \mathcal{N}\left(\mathbf{m}+K(Y-A\mathbf{m}-\mathbf{b}),P-KDK^{\mathsf{T}}\right): S \times V \times Y \to X, h μ = N ( m + K ( Y − A m − b ) , P − K D K T ) : S × V × Y → X ,
the second for ( h ∘ μ ∧ ) ( s , v ) (h\circ\mu^{\wedge})(s,v) ( h ∘ μ ∧ ) ( s , v ) -almost every y ∈ Y \mathbf{y}\in Y y ∈ Y for any ( s , v ) ∈ S × V (s,v)\in S\times V ( s , v ) ∈ S × V .
Proof. The first assertion is (17) with parameter space S × V S\times V S × V . Let κ : = ( pr X , h ) ∘ μ ∧ : S × V → X × Y \kappa:= (\operatorname{pr}_X,h)\circ\mu^{\wedge}: S\times V\to X\times Y κ := ( pr X , h ) ∘ μ ∧ : S × V → X × Y . By (1), κ Y × X = ( h , pr X ) ∘ μ ∧ \kappa_{Y\times X}=(h,\operatorname{pr}_X)\circ\mu^{\wedge} κ Y × X = ( h , pr X ) ∘ μ ∧ , hence h μ = κ ( X ∣ Y ) h^\mu=\kappa(X\mid Y) h μ = κ ( X ∣ Y ) by Proposition 4.5 . By (18), κ \kappa κ is Gaussian with m X = m \mathbf{m}_X=\mathbf{m} m X = m , m Y = A m + b \mathbf{m}_Y=A\mathbf{m}+\mathbf{b} m Y = A m + b , P X = P P_X=P P X = P , P Y = D P_Y=D P Y = D and C = P A T C=PA^{\mathsf{T}} C = P A T , so that C P Y + = K CP_Y^+=K C P Y + = K , and the second assertion follows from Proposition 5.8 . □
Kalman Filter and Rauch–Tung–Striebel Smoother
We now consider the model of Definition 4.1 in the affine Gaussian case. Let X i X_i X i and Y i Y_i Y i for 1 ≤ i ≤ n 1\le i\le n 1 ≤ i ≤ n be Euclidean of dimensions d X d_X d X and d Y d_Y d Y independent of i i i , with Gaussian prior
μ = N ( m 1 ∣ 0 , P 1 ∣ 0 ) : S → X 1 , \mu=\mathcal{N}(\mathbf{m}_{1\mid0},P_{1\mid0}):S\to X_1, μ = N ( m 1 ∣ 0 , P 1 ∣ 0 ) : S → X 1 ,
and transitions and observations affine Gaussian in X i X_i X i
a i = N ( A i X i + b i , Q i ) : Y [ i ] × X i → X i + 1 , 1 ≤ i < n , a_i=\mathcal{N}(A_iX_i+\mathbf{b}_i,Q_i):Y^{[i]}\times X_i\to X_{i+1},\qquad1\le i<n, a i = N ( A i X i + b i , Q i ) : Y [ i ] × X i → X i + 1 , 1 ≤ i < n ,
h i = N ( H i X i + c i , R i ) : Y [ i − 1 ] × X i → Y i , 1 ≤ i ≤ n , h_i=\mathcal{N}(H_iX_i+\mathbf{c}_i,R_i):Y^{[i-1]}\times X_i\to Y_i,\qquad1\le i\le n, h i = N ( H i X i + c i , R i ) : Y [ i − 1 ] × X i → Y i , 1 ≤ i ≤ n ,
where the coefficients
A i : Y [ i ] → M d X × d X ( R ) , b i : Y [ i ] → X i + 1 , Q i : Y [ i ] → Sym d X + ( R ) , A_i:Y^{[i]}\to M_{d_X\times d_X}(\mathbb{R}),\qquad\mathbf{b}_i:Y^{[i]}\to X_{i+1},\qquad Q_i:Y^{[i]}\to\operatorname{Sym}_{d_X}^{+}(\mathbb{R}), A i : Y [ i ] → M d X × d X ( R ) , b i : Y [ i ] → X i + 1 , Q i : Y [ i ] → Sym d X + ( R ) ,
H i : Y [ i − 1 ] → M d Y × d X ( R ) , c i : Y [ i − 1 ] → Y i , R i : Y [ i − 1 ] → Sym d Y + ( R ) H_i:Y^{[i-1]}\to M_{d_Y\times d_X}(\mathbb{R}),\qquad\mathbf{c}_i:Y^{[i-1]}\to Y_i,\qquad R_i:Y^{[i-1]}\to\operatorname{Sym}_{d_Y}^{+}(\mathbb{R}) H i : Y [ i − 1 ] → M d Y × d X ( R ) , c i : Y [ i − 1 ] → Y i , R i : Y [ i − 1 ] → Sym d Y + ( R )
are measurable. The coefficients may depend on the past observations, so that the model has feedback, and the covariance matrices may be singular. The classical Kalman filter is the case of coefficients not depending on the observations, in which the model and its filter lie in the Markov category Gauss of [10 §6] ; with feedback, the filter and the smoother are not morphisms of Gauss , since m k ∣ k \mathbf{m}_{k\mid k} m k ∣ k and P k ∣ k P_{k\mid k} P k ∣ k are no longer affine and constant in the observations. Gaussian models whose coefficients depend on the past observations are known as conditionally Gaussian sequences, and the corresponding filter and backward interpolation (smoothing) equations are classical, see [18 Theorems 13.4 and 13.12] , where integrability of the coefficients is assumed and the noises of the state and the observation may be correlated.
In our framework, Theorem 5.11 is obtained from Theorems 4.6 and 4.7 by the same argument as in the case without feedback, for arbitrary measurable coefficients and uniformly in the parameter s ∈ S s\in S s ∈ S . The means in Theorem 5.11 are the means of the conditional laws, such as π ( X k ∣ Y [ k ] ) \pi(X_k\mid Y^{[k]}) π ( X k ∣ Y [ k ] ) , which are defined without any integrability of X k X_k X k , and coincide with the conditional expectations of X k X_k X k given Y [ k ] Y^{[k]} Y [ k ] when X k X_k X k is integrable. Let π : S → Y [ n ] × X [ n ] \pi:S\to Y^{[n]}\times X^{[n]} π : S → Y [ n ] × X [ n ] be the joint law of the model. Functions on Y [ i ] Y^{[i]} Y [ i ] are regarded as functions on S × Y [ k ] S\times Y^{[k]} S × Y [ k ] for i ≤ k i\le k i ≤ k through the projection, and we apply the results of this section with parameter space S × Y [ k ] S\times Y^{[k]} S × Y [ k ] accordingly.
Definition 5.10 (Kalman Recursion). We define measurable functions m j ∣ k \mathbf{m}_{j\mid k} m j ∣ k with values in X j X_j X j and P j ∣ k P_{j\mid k} P j ∣ k with values in Sym d X + ( R ) \operatorname{Sym}_{d_X}^{+}(\mathbb{R}) Sym d X + ( R ) on S × Y [ k ] S\times Y^{[k]} S × Y [ k ] , for 0 ≤ k ≤ n 0\le k\le n 0 ≤ k ≤ n and 1 ≤ j ≤ n 1\le j\le n 1 ≤ j ≤ n with j ≤ k + 1 j\le k+1 j ≤ k + 1 , as follows.
(i) (Update) For 1 ≤ k ≤ n 1 \le k \le n 1 ≤ k ≤ n , let D k : = H k P k ∣ k − 1 H k T + R k D_k := H_kP_{k|k-1}H_k^{\mathsf{T}} + R_k D k := H k P k ∣ k − 1 H k T + R k and K k : = P k ∣ k − 1 H k T D k − 1 K_k := P_{k|k-1}H_k^{\mathsf{T}}D_k^{-1} K k := P k ∣ k − 1 H k T D k − 1 on S × Y [ k − 1 ] S \times Y^{[k-1]} S × Y [ k − 1 ] , and
m k ∣ k : = m k ∣ k − 1 + K k ( Y k − H k m k ∣ k − 1 − c k ) \mathbf{m}_{k|k} := \mathbf{m}_{k|k-1} + K_k(Y_k - H_k\mathbf{m}_{k|k-1} - \mathbf{c}_k) m k ∣ k := m k ∣ k − 1 + K k ( Y k − H k m k ∣ k − 1 − c k )
and P k ∣ k : = P k ∣ k − 1 − K k D k K k T P_{k|k} := P_{k|k-1} - K_kD_kK_k^{\mathsf{T}} P k ∣ k := P k ∣ k − 1 − K k D k K k T on S × Y [ k ] = S × Y [ k − 1 ] × Y k S \times Y^{[k]} = S \times Y^{[k-1]} \times Y_k S × Y [ k ] = S × Y [ k − 1 ] × Y k .
(ii) (Prediction) For 1 ≤ k < n 1 \le k < n 1 ≤ k < n , let
m k + 1 ∣ k : = A k m k ∣ k + b k \mathbf{m}_{k+1|k} := A_k\mathbf{m}_{k|k} + \mathbf{b}_k m k + 1∣ k := A k m k ∣ k + b k
and P k + 1 ∣ k : = A k P k ∣ k A k T + Q k P_{k+1|k} := A_kP_{k|k}A_k^{\mathsf{T}} + Q_k P k + 1∣ k := A k P k ∣ k A k T + Q k on S × Y [ k ] S \times Y^{[k]} S × Y [ k ] .
(iii) (Smoothing) For $1 \le j < k \le n$, let J j : = P j ∣ j A j + 1 ∣ j T P j + 1 ∣ j + J_j := P_{j|j}A_{j+1|j}^{\mathsf{T}}P_{j+1|j}^{+} J j := P j ∣ j A j + 1∣ j T P j + 1∣ j + on S × Y [ j ] S \times Y^{[j]} S × Y [ j ] , and
m j ∣ k : = m j ∣ j + J j ( m j + 1 ∣ k − m j + 1 ∣ j ) \mathbf{m}_{j|k} := \mathbf{m}_{j|j} + J_j(\mathbf{m}_{j+1|k} - \mathbf{m}_{j+1|j}) m j ∣ k := m j ∣ j + J j ( m j + 1∣ k − m j + 1∣ j )
and P j ∣ k : = P j ∣ j + J j ( P j + 1 ∣ k − P j + 1 ∣ j ) J j T P_{j|k} := P_{j|j} + J_j(P_{j+1|k} - P_{j+1|j})J_j^{\mathsf{T}} P j ∣ k := P j ∣ j + J j ( P j + 1∣ k − P j + 1∣ j ) J j T on S × Y [ k ] S \times Y^{[k]} S × Y [ k ] .
Here, m 1 ∣ 0 \mathbf{m}_{1|0} m 1∣0 and P 1 ∣ 0 P_{1|0} P 1∣0 are given by the prior, and the recursions run forward in k k k for (i)–(ii) and backward in j j j for (iii).
In the terminology of [23 ] , the matrices D k D_k D k , K k K_k K k and J j J_j J j are the innovation covariance, the Kalman gain and the smoother gain, and D D D and K K K of Corollary 5.9 are the same matrices for a single observation.
Theorem 5.11 (Kalman Filter and Rauch–Tung–Striebel Smoother). Let the notations be as in Definition 5.10 .
(i) (Filter) For 1 ≤ k ≤ n 1 \le k \le n 1 ≤ k ≤ n , we have π ( X k ∣ Y [ k ] ) = N ( m k ∣ k , P k ∣ k ) \pi(X_k \mid Y^{[k]}) = \mathcal{N}(\mathbf{m}_{k|k}, P_{k|k}) π ( X k ∣ Y [ k ] ) = N ( m k ∣ k , P k ∣ k ) .
(ii) (Prediction) For 1 ≤ k < n 1 \le k < n 1 ≤ k < n , the predicted prior satisfies μ k + 1 = π ( X k + 1 ∣ Y [ k ] ) = N ( m k + 1 ∣ k , P k + 1 ∣ k ) \mu_{k+1} = \pi(X_{k+1} \mid Y^{[k]}) = \mathcal{N}(\mathbf{m}_{k+1|k}, P_{k+1|k}) μ k + 1 = π ( X k + 1 ∣ Y [ k ] ) = N ( m k + 1∣ k , P k + 1∣ k ) .
(iii) (Smoothing) For $1 \le j < k \le n$, we have π ( X j ∣ Y [ k ] ) = N ( m j ∣ k , P j ∣ k ) \pi(X_j \mid Y^{[k]}) = \mathcal{N}(\mathbf{m}_{j|k}, P_{j|k}) π ( X j ∣ Y [ k ] ) = N ( m j ∣ k , P j ∣ k ) .
The equalities hold for π Y [ k ] ( s ) \pi_{Y^{[k]}}(s) π Y [ k ] ( s ) -almost every ( y 1 , … , y k ) ∈ Y [ k ] (y_1,\ldots,y_k) \in Y^{[k]} ( y 1 , … , y k ) ∈ Y [ k ] for any s ∈ S s \in S s ∈ S .
Proof. We choose the Gaussian versions of the conditional laws, which is allowed since the identities of Theorems 4.6 and 4.7 hold for any choice. Let μ 1 : = μ \mu_1 := \mu μ 1 := μ . By Proposition 3.2 for k = 1 k = 1 k = 1 and Theorem 4.6 for k > 1 k > 1 k > 1 , we have π ( X k ∣ Y [ k ] ) = h k μ k \pi(X_k \mid Y^{[k]}) = h_k^{\mu_k} π ( X k ∣ Y [ k ] ) = h k μ k , and by Theorem 4.7 (i), we have π ( X k + 1 ∣ Y [ k ] ) = a k ∘ π ( Y [ k ] × X k ∣ Y [ k ] ) = μ k + 1 \pi(X_{k+1} \mid Y^{[k]}) = a_k \circ\pi(Y^{[k]} \times X_k \mid Y^{[k]}) = \mu_{k+1} π ( X k + 1 ∣ Y [ k ] ) = a k ∘ π ( Y [ k ] × X k ∣ Y [ k ] ) = μ k + 1 . Hence (i) and (ii) follow by induction on k k k . If μ k = N ( m k ∣ k − 1 , P k ∣ k − 1 ) \mu_k = \mathcal{N}(\mathbf{m}_{k|k-1}, P_{k|k-1}) μ k = N ( m k ∣ k − 1 , P k ∣ k − 1 ) , then Corollary 5.9 with V = Y [ k − 1 ] V = Y^{[k-1]} V = Y [ k − 1 ] , A = H k A = H_k A = H k , b = c k \mathbf{b} = \mathbf{c}_k b = c k and R = R k R = R_k R = R k gives h k μ k = N ( m k ∣ k , P k ∣ k ) h_k^{\mu_k} = \mathcal{N}(\mathbf{m}_{k|k}, P_{k|k}) h k μ k = N ( m k ∣ k , P k ∣ k ) , the innovation covariance D k D_k D k and the Kalman gain K k K_k K k of Definition 5.10 (i) being D D D and K K K of Corollary 5.9 . Then (17) applied to a k a_k a k , regarded as a stochastic morphism on S × Y [ k ] × X k S \times Y^{[k]} \times X_k S × Y [ k ] × X k , with parameter space S × Y [ k ] S \times Y^{[k]} S × Y [ k ] gives μ k + 1 = N ( m k + 1 ∣ k , P k + 1 ∣ k ) \mu_{k+1} = \mathcal{N}(\mathbf{m}_{k+1|k}, P_{k+1|k}) μ k + 1 = N ( m k + 1∣ k , P k + 1∣ k ) .
For (iii), we use backward induction on j j j , the case j = k j = k j = k being (i). By Corollary 5.9 for the prior π ( X j ∣ Y [ j ] ) = N ( m j ∣ j , P j ∣ j ) \pi(X_j \mid Y^{[j]}) = \mathcal{N}(\mathbf{m}_{j|j}, P_{j|j}) π ( X j ∣ Y [ j ] ) = N ( m j ∣ j , P j ∣ j ) and the observation a j a_j a j , whose law is N ( m j + 1 ∣ j , P j + 1 ∣ j ) \mathcal{N}(\mathbf{m}_{j+1|j}, P_{j+1|j}) N ( m j + 1∣ j , P j + 1∣ j ) by (ii), we have
a j π ( X j ∣ Y [ j ] ) = N ( m j ∣ j + J j ( X j + 1 − m j + 1 ∣ j ) , P j ∣ j − J j P j + 1 ∣ j J j T ) a_j^{\pi(X_j\mid Y^{[j]})} = \mathcal{N}\left(\mathbf{m}_{j|j} + J_j(X_{j+1} - \mathbf{m}_{j+1|j}),\ P_{j|j} - J_jP_{j+1|j}J_j^{\mathsf{T}}\right) a j π ( X j ∣ Y [ j ] ) = N ( m j ∣ j + J j ( X j + 1 − m j + 1∣ j ) , P j ∣ j − J j P j + 1∣ j J j T )
on S × Y [ j ] × X j + 1 S \times Y^{[j]} \times X_{j+1} S × Y [ j ] × X j + 1 . By Theorem 4.7 (ii), π ( X j ∣ Y [ k ] ) \pi(X_j \mid Y^{[k]}) π ( X j ∣ Y [ k ] ) is the composition of this stochastic morphism with π ( X j + 1 ∣ Y [ k ] ) = N ( m j + 1 ∣ k , P j + 1 ∣ k ) \pi(X_{j+1} \mid Y^{[k]}) = \mathcal{N}(m_{j+1\mid k}, P_{j+1\mid k}) π ( X j + 1 ∣ Y [ k ] ) = N ( m j + 1 ∣ k , P j + 1 ∣ k ) , which is N ( m j ∣ k , P j ∣ k ) \mathcal{N}(m_{j\mid k}, P_{j\mid k}) N ( m j ∣ k , P j ∣ k ) by (17) . □
Remark 5.12. The smoothing gain J j J_j J j is the Kalman gain of Corollary 5.9 for the transition a j a_j a j viewed as an observation of X j X_j X j with prior π ( X j ∣ Y [ j ] ) \pi(X_j \mid Y^{[j]}) π ( X j ∣ Y [ j ] ) , in accordance with (12) , which identifies the Bayesian inverse of the transition with the backward transition π ( X j ∣ Y [ j ] × X j + 1 ) \pi(X_j \mid Y^{[j]} \times X_{j+1}) π ( X j ∣ Y [ j ] × X j + 1 ) of the hidden state process. The smoother is thus the composition of the backward transition kernels with the filter, and the smoothing recursion of Definition 5.10 expresses this composition. In this way, Theorem 5.11 is Theorems 4.6 and 4.7 evaluated in the category of affine Gaussian stochastic morphisms.
Remark 5.13 (Extended Kalman Filter). Consider a nonlinear model with prior μ : 1 → X \mu: 1 \to X μ : 1 → X , transitions N ( f k ( X k ) , Q k ) \mathcal{N}(f_k(X_k), Q_k) N ( f k ( X k ) , Q k ) and observations N ( g k ( X k ) , R k ) \mathcal{N}(g_k(X_k), R_k) N ( g k ( X k ) , R k ) . Then the extended Kalman filter linearizes f k f_k f k and g k g_k g k at the current filtered and predicted means, which are functions of the past observations. The resulting surrogate model is an instance of the model of this section with feedback, and Theorem 5.11 applied to it gives the extended Kalman filter and smoother, exact for the surrogate model.
Existence and Uniqueness of the Conditional Law
In this appendix, we prove Theorem 2.2 concerning the existence and uniqueness of the conditional law. This theorem is known. The existence is proved in [17 Theorem 1.25 (i)] when X X X is standard Borel, and [13 Theorem 2.29] for X X X countably generated, with uniqueness as in [13 Lemma 2.28] . See also [9 Theorem 3.2] . We give a complete proof for the convenience of the reader, in our notation, and with the martingale argument written out.
For reference, we recall the definition of the conditional law and restate the theorem as Theorem A.1 . For a measurable space X X X , we denote by B X \mathcal{B}_X B X its σ \sigma σ -algebra.
Theorem A.1. Consider a stochastic morphism π : S → X × Y \pi: S \to X \times Y π : S → X × Y . A conditional law π ( Y ∣ X ) \pi(Y \mid X) π ( Y ∣ X ) of Y Y Y given X X X for π \pi π is a stochastic morphism
π ( Y ∣ X ) : S × X → Y , \pi(Y \mid X): S \times X \to Y, π ( Y ∣ X ) : S × X → Y , which satisfies
π = ( pr X , π ( Y ∣ X ) ) ∘ ( id S , π X ) , (19) \pi= \left(\operatorname{pr}_X, \pi(Y \mid X)\right) \circ\left(\operatorname{id}_S, \pi_X\right), \tag*{(19)} π = ( pr X , π ( Y ∣ X ) ) ∘ ( id S , π X ) , (19) where π X = pr X ∘ π \pi_X = \operatorname{pr}_X \circ\pi π X = pr X ∘ π is the marginal. If we assume that X X X is countably generated, then we have the following.
(i) If Y Y Y is countably generated, and if a conditional law π ( Y ∣ X ) \pi(Y \mid X) π ( Y ∣ X ) of Y Y Y given X X X for π \pi π exists, then such π ( Y ∣ X ) \pi(Y \mid X) π ( Y ∣ X ) is unique π X ( s ) \pi_X(s) π X ( s ) -almost everywhere for any s ∈ S s \in S s ∈ S .
(ii) In particular, if Y Y Y is standard Borel, then a conditional law π ( Y ∣ X ) \pi(Y \mid X) π ( Y ∣ X ) of Y Y Y given X X X for π \pi π exists, and is determined uniquely π X ( s ) \pi_X(s) π X ( s ) -almost everywhere for any s ∈ S s \in S s ∈ S .
Note that for s ∈ S s \in S s ∈ S , the measure ( π X ) ∧ ( s ) (\pi_X)^{\wedge}(s) ( π X ) ∧ ( s ) on S × X S \times X S × X is the product of the Dirac measure δ s \delta_s δ s and π X ( s ) \pi_X(s) π X ( s ) . Hence for any stochastic morphism κ : S × X → Y \kappa: S \times X \to Y κ : S × X → Y , we have
( ( pr X , κ ) ∘ ( π X ) ∧ ) ( s ) ( A × B ) = ∫ A κ ( s , x ) ( B ) π X ( s ) ( d x ) , A ∈ B X , B ∈ B Y . (20) \left((\operatorname{pr}_X,\kappa) \circ(\pi_X)^{\wedge}\right)(s)(A \times B) = \int_A \kappa(s,x)(B)\,\pi_X(s)(dx), \qquad A \in\mathcal{B}_X,\quad B \in\mathcal{B}_Y. \tag*{(20)} ( ( pr X , κ ) ∘ ( π X ) ∧ ) ( s ) ( A × B ) = ∫ A κ ( s , x ) ( B ) π X ( s ) ( d x ) , A ∈ B X , B ∈ B Y . (20)
Since a probability measure on X × Y X \times Y X × Y is determined by its values on measurable rectangles, a stochastic morphism κ : S × X → Y \kappa: S \times X \to Y κ : S × X → Y is a conditional law of Y Y Y given X X X for π \pi π , that is, satisfies (19), if and only if
∫ A κ ( s , x ) ( B ) π X ( s ) ( d x ) = π ( s ) ( A × B ) , A ∈ B X , B ∈ B Y , (21) \int_A \kappa(s,x)(B)\,\pi_X(s)(\mathrm{d}x)=\pi(s)(A\times B), \qquad A\in\mathcal{B}_X,\quad B\in\mathcal{B}_Y, \tag*{(21)} ∫ A κ ( s , x ) ( B ) π X ( s ) ( d x ) = π ( s ) ( A × B ) , A ∈ B X , B ∈ B Y , (21)
for any s ∈ S s\in S s ∈ S .
Proof of Theorem A.1 (i). Let κ \kappa κ and κ ′ \kappa' κ ′ be conditional laws of Y Y Y given X X X for π \pi π , and fix s ∈ S s\in S s ∈ S . By (21), for any B ∈ B Y B\in\mathcal{B}_Y B ∈ B Y we have ∫ A κ ( s , x ) ( B ) π X ( s ) ( d x ) = ∫ A κ ′ ( s , x ) ( B ) π X ( s ) ( d x ) \int_A\kappa(s,x)(B)\,\pi_X(s)(\mathrm{d}x)=\int_A\kappa'(s,x)(B)\,\pi_X(s)(\mathrm{d}x) ∫ A κ ( s , x ) ( B ) π X ( s ) ( d x ) = ∫ A κ ′ ( s , x ) ( B ) π X ( s ) ( d x ) for any A ∈ B X A\in\mathcal{B}_X A ∈ B X , hence κ ( s , x ) ( B ) = κ ′ ( s , x ) ( B ) \kappa(s,x)(B)=\kappa'(s,x)(B) κ ( s , x ) ( B ) = κ ′ ( s , x ) ( B ) for x x x outside a π X ( s ) \pi_X(s) π X ( s ) -null set N B N_B N B . Since Y Y Y is countably generated, there exists a countable π \pi π -system G \mathcal{G} G generating B Y \mathcal{B}_Y B Y , namely the finite intersections of a countable family of generators. For x x x outside the π X ( s ) \pi_X(s) π X ( s ) -null set ⋃ B ∈ G N B \bigcup_{B\in\mathcal{G}}N_B ⋃ B ∈ G N B , the probability measures κ ( s , x ) \kappa(s,x) κ ( s , x ) and κ ′ ( s , x ) \kappa'(s,x) κ ′ ( s , x ) agree on G \mathcal{G} G , hence on B Y \mathcal{B}_Y B Y by the π \pi π -λ \lambda λ theorem. □
The rest of this appendix is devoted to the proof of Theorem A.1 (ii). For t ∈ [ 0 , 1 ] t\in[0,1] t ∈ [ 0 , 1 ] and a subset Y ⊂ [ 0 , 1 ] Y\subset[0,1] Y ⊂ [ 0 , 1 ] , we let Y ≤ t : = Y ∩ [ 0 , t ] Y^{\leq t}:=Y\cap[0,t] Y ≤ t := Y ∩ [ 0 , t ] . We first prove the following lemma.
Lemma A.2. Let Y Y Y be a Borel subset of [ 0 , 1 ] [0,1] [ 0 , 1 ] , and let S S S and X X X be measurable spaces such that X X X is countably generated. Let
π : S → X × Y \pi:S\to X\times Y π : S → X × Y be a stochastic morphism, and let π X : = pr X ∘ π \pi_X:=\operatorname{pr}_X\circ\pi π X := pr X ∘ π be the marginal. Then for any r ∈ Q ∩ [ 0 , 1 ] r\in\mathbb{Q}\cap[0,1] r ∈ Q ∩ [ 0 , 1 ] , there exist jointly measurable functions u r : S × X → R u_r:S\times X\to\mathbb{R} u r : S × X → R satisfying u r ( s , x ) ≤ u r ′ ( s , x ) u_r(s,x)\leq u_{r'}(s,x) u r ( s , x ) ≤ u r ′ ( s , x ) if r ≤ r ′ r\leq r' r ≤ r ′ , and u 1 ( s , x ) ≡ 1 u_1(s,x)\equiv1 u 1 ( s , x ) ≡ 1 , such that
∫ A u r ( s , x ) π X ( s ) ( d x ) = π ( s ) ( A × Y ≤ r ) \int_A u_r(s,x)\,\pi_X(s)(\mathrm{d}x)=\pi(s)(A\times Y^{\leq r}) ∫ A u r ( s , x ) π X ( s ) ( d x ) = π ( s ) ( A × Y ≤ r ) for any A ∈ B X A\in\mathcal{B}_X A ∈ B X .
Proof. Since X X X is countably generated, there exist measurable subsets E 1 , E 2 , … E_1,E_2,\ldots E 1 , E 2 , … of X X X such that B X = σ ( { E i } i = 1 ∞ ) \mathcal{B}_X=\sigma(\{E_i\}_{i=1}^{\infty}) B X = σ ({ E i } i = 1 ∞ ) . For integers n ≥ 1 n\geq1 n ≥ 1 and ε = ( ε 1 , … , ε n ) ∈ { 0 , 1 } n \varepsilon=(\varepsilon_1,\ldots,\varepsilon_n)\in\{0,1\}^n ε = ( ε 1 , … , ε n ) ∈ { 0 , 1 } n , we let E ε : = E ε 1 ∩ ⋯ ∩ E ε n E^\varepsilon:=E^{\varepsilon_1}\cap\cdots\cap E^{\varepsilon_n} E ε := E ε 1 ∩ ⋯ ∩ E ε n , where E i ε i = E i E_i^{\varepsilon_i}=E_i E i ε i = E i if ε i = 1 \varepsilon_i=1 ε i = 1 and E i ε i = X ∖ E i E_i^{\varepsilon_i}=X\setminus E_i E i ε i = X ∖ E i if ε i = 0 \varepsilon_i=0 ε i = 0 . Then X = ⋃ ε ∈ { 0 , 1 } n E ε X=\bigcup_{\varepsilon\in\{0,1\}^n}E^\varepsilon X = ⋃ ε ∈ { 0 , 1 } n E ε gives a partition of X X X . Let A n : = { E ε } ε ∈ { 0 , 1 } n \mathcal{A}^n:=\{E^\varepsilon\}_{\varepsilon\in\{0,1\}^n} A n := { E ε } ε ∈ { 0 , 1 } n be the set of atoms of the partition given by E 1 , … , E n E_1,\ldots,E_n E 1 , … , E n , and let B n : = σ ( A n ) = σ ( { E i } i = 1 n ) \mathcal{B}^n:=\sigma(\mathcal{A}^n)=\sigma(\{E_i\}_{i=1}^n) B n := σ ( A n ) = σ ({ E i } i = 1 n ) .
For n ≥ 1 n\geq1 n ≥ 1 and r ∈ Q ∩ [ 0 , 1 ] r\in\mathbb{Q}\cap[0,1] r ∈ Q ∩ [ 0 , 1 ] , set
u r n ( s , x ) : = ∑ E ε ∈ A n 1 E ε ( x ) π ( s ) ( E ε × Y ≤ r ) π X ( s ) ( E ε ) . u_r^n(s,x):=\sum_{E^\varepsilon\in\mathcal{A}^n}\mathbf{1}_{E^\varepsilon}(x)\frac{\pi(s)(E^\varepsilon\times Y^{\leq r})}{\pi_X(s)(E^\varepsilon)}. u r n ( s , x ) := E ε ∈ A n ∑ 1 E ε ( x ) π X ( s ) ( E ε ) π ( s ) ( E ε × Y ≤ r ) .
where 1 E ε \mathbf{1}_{E^\varepsilon} 1 E ε is the indicator function of E ε E^\varepsilon E ε and
π ( s ) ( E ε × Y ≤ r ) π X ( s ) ( E ε ) : = { π ( s ) ( E ε × Y ≤ r ) π X ( s ) ( E ε ) π X ( s ) ( E ε ) > 0 r π X ( s ) ( E ε ) = 0. (22) \frac{\pi(s)(E^\varepsilon\times Y^{\leq r})}{\pi_X(s)(E^\varepsilon)}
:=
\begin{cases}
\dfrac{\pi(s)(E^\varepsilon\times Y^{\leq r})}{\pi_X(s)(E^\varepsilon)} & \pi_X(s)(E^\varepsilon)>0\\
r & \pi_X(s)(E^\varepsilon)=0.
\end{cases} \tag*{(22)} π X ( s ) ( E ε ) π ( s ) ( E ε × Y ≤ r ) := ⎩ ⎨ ⎧ π X ( s ) ( E ε ) π ( s ) ( E ε × Y ≤ r ) r π X ( s ) ( E ε ) > 0 π X ( s ) ( E ε ) = 0. (22)
By construction, u r n ( s , x ) u_r^n(s,x) u r n ( s , x ) is a measurable function on S × X S\times X S × X with values in [ 0 , 1 ] [0,1] [ 0 , 1 ] and is non-decreasing with respect to r r r . In addition, $u_1^n(s,x)\equiv1. Fix s ∈ S s \in S s ∈ S and r ∈ Q ∩ [ 0 , 1 ] r \in\mathbb{Q} \cap[0,1] r ∈ Q ∩ [ 0 , 1 ] . We next prove that the functions { u r n ( s , ⋅ ) } n ≥ 1 \{u_r^n(s,\cdot)\}_{n\geq1} { u r n ( s , ⋅ ) } n ≥ 1 form a martingale on X X X for the probability measure π X ( s ) \pi_X(s) π X ( s ) and filtration { B n } n ≥ 1 \{\mathcal{B}^n\}_{n\geq1} { B n } n ≥ 1 . For any E ε ∈ A n E^\varepsilon\in\mathcal{A}^n E ε ∈ A n , we have
E^\varepsilon= (E^\varepsilon\cap E_{n+1}) \mathbin{\mathaccent\cdot\cup} (E^\varepsilon\cap E_{n+1}^c), \qquad E_{n+1}^c := X \setminus E_{n+1}.
By definition of u r n + 1 ( s , x ) u_r^{n+1}(s,x) u r n + 1 ( s , x ) , we have
∫ E ε u r n + 1 ( s , x ) π X ( s ) ( d x ) = ∫ E ε ∩ E n + 1 u r n + 1 ( s , x ) π X ( s ) ( d x ) + ∫ E ε ∩ E n + 1 c u r n + 1 ( s , x ) π X ( s ) ( d x ) = π ( s ) ( ( E ε ∩ E n + 1 ) × Y ≤ r ) π X ( s ) ( E ε ∩ E n + 1 ) π X ( s ) ( E ε ∩ E n + 1 ) + π ( s ) ( ( E ε ∩ E n + 1 c ) × Y ≤ r ) π X ( s ) ( E ε ∩ E n + 1 c ) π X ( s ) ( E ε ∩ E n + 1 c ) . \begin{aligned}
\int_{E^\varepsilon} u_r^{n+1}(s,x)\pi_X(s)(dx)
&= \int_{E^\varepsilon\cap E_{n+1}} u_r^{n+1}(s,x)\pi_X(s)(dx)
+ \int_{E^\varepsilon\cap E_{n+1}^c} u_r^{n+1}(s,x)\pi_X(s)(dx) \\
&= \frac{\pi(s)((E^\varepsilon\cap E_{n+1})\times Y^{\leq r})}{\pi_X(s)(E^\varepsilon\cap E_{n+1})}\pi_X(s)(E^\varepsilon\cap E_{n+1}) \\
&\quad+ \frac{\pi(s)((E^\varepsilon\cap E_{n+1}^c)\times Y^{\leq r})}{\pi_X(s)(E^\varepsilon\cap E_{n+1}^c)}\pi_X(s)(E^\varepsilon\cap E_{n+1}^c).
\end{aligned} ∫ E ε u r n + 1 ( s , x ) π X ( s ) ( d x ) = ∫ E ε ∩ E n + 1 u r n + 1 ( s , x ) π X ( s ) ( d x ) + ∫ E ε ∩ E n + 1 c u r n + 1 ( s , x ) π X ( s ) ( d x ) = π X ( s ) ( E ε ∩ E n + 1 ) π ( s ) (( E ε ∩ E n + 1 ) × Y ≤ r ) π X ( s ) ( E ε ∩ E n + 1 ) + π X ( s ) ( E ε ∩ E n + 1 c ) π ( s ) (( E ε ∩ E n + 1 c ) × Y ≤ r ) π X ( s ) ( E ε ∩ E n + 1 c ) .
If π X ( s ) ( E ε ) > 0 \pi_X(s)(E^\varepsilon)>0 π X ( s ) ( E ε ) > 0 , then the above sum equals π ( s ) ( E ε × Y ≤ r ) \pi(s)(E^\varepsilon\times Y^{\leq r}) π ( s ) ( E ε × Y ≤ r ) , and if π X ( s ) ( E ε ) = 0 \pi_X(s)(E^\varepsilon)=0 π X ( s ) ( E ε ) = 0 , then the above sum equals 0. Thus we have
∫ E ε u r n + 1 ( s , x ) π X ( s ) ( d x ) = ∫ E ε u r n ( s , x ) π X ( s ) ( d x ) \int_{E^\varepsilon} u_r^{n+1}(s,x)\pi_X(s)(dx) = \int_{E^\varepsilon} u_r^n(s,x)\pi_X(s)(dx) ∫ E ε u r n + 1 ( s , x ) π X ( s ) ( d x ) = ∫ E ε u r n ( s , x ) π X ( s ) ( d x )
for any E ε ∈ A n E^\varepsilon\in\mathcal{A}^n E ε ∈ A n , where the integral on both sides is zero for E ε E^\varepsilon E ε such that π X ( s ) ( E ε ) = 0 \pi_X(s)(E^\varepsilon)=0 π X ( s ) ( E ε ) = 0 . By definition of the conditional expectation, this shows that
E π X ( s ) [ u r n + 1 ( s , ⋅ ) ∣ B n ] = u r n ( s , ⋅ ) , \mathbb{E}_{\pi_X(s)}[u_r^{n+1}(s,\cdot)\mid\mathcal{B}^n] = u_r^n(s,\cdot), E π X ( s ) [ u r n + 1 ( s , ⋅ ) ∣ B n ] = u r n ( s , ⋅ ) ,
hence { u r n ( s , ⋅ ) } n ≥ 1 \{u_r^n(s,\cdot)\}_{n\geq1} { u r n ( s , ⋅ ) } n ≥ 1 form a martingale on X X X for π X ( s ) \pi_X(s) π X ( s ) and filtration { B n } n ≥ 1 \{\mathcal{B}^n\}_{n\geq1} { B n } n ≥ 1 . By the bounded martingale convergence theorem, for each s ∈ S s\in S s ∈ S , the sequence { u r n ( s , ⋅ ) } n ≥ 1 \{u_r^n(s,\cdot)\}_{n\geq1} { u r n ( s , ⋅ ) } n ≥ 1 converges π X ( s ) \pi_X(s) π X ( s ) -almost everywhere and in L 1 ( X , π X ( s ) ) L^1(X,\pi_X(s)) L 1 ( X , π X ( s )) to a function u r ( s , ⋅ ) u_r(s,\cdot) u r ( s , ⋅ ) . For any ( s , x ) ∈ S × X (s,x)\in S\times X ( s , x ) ∈ S × X , let
u r ( s , x ) : = lim sup n → ∞ u r n ( s , x ) . u_r(s,x):=\limsup_{n\to\infty}u_r^n(s,x). u r ( s , x ) := n → ∞ lim sup u r n ( s , x ) .
Then u r ( s , x ) u_r(s,x) u r ( s , x ) is a jointly measurable function on S × X S\times X S × X which coincides with the pointwise and L 1 L^1 L 1 -limits π X ( s ) \pi_X(s) π X ( s ) -almost everywhere. We have
∣ ∫ A u r n ( s , x ) π X ( s ) ( d x ) − ∫ A u r ( s , x ) π X ( s ) ( d x ) ∣ ≤ ∫ X ∣ u r n ( s , x ) − u r ( s , x ) ∣ π X ( s ) ( d x ) , \left|\int_A u_r^n(s,x)\pi_X(s)(dx)-\int_A u_r(s,x)\pi_X(s)(dx)\right|
\leq\int_X |u_r^n(s,x)-u_r(s,x)|\pi_X(s)(dx), ∫ A u r n ( s , x ) π X ( s ) ( d x ) − ∫ A u r ( s , x ) π X ( s ) ( d x ) ≤ ∫ X ∣ u r n ( s , x ) − u r ( s , x ) ∣ π X ( s ) ( d x ) ,
thus
lim n → ∞ ∫ A u r n ( s , x ) π X ( s ) ( d x ) = ∫ A u r ( s , x ) π X ( s ) ( d x ) . \lim_{n\to\infty}\int_A u_r^n(s,x)\pi_X(s)(dx)=\int_A u_r(s,x)\pi_X(s)(dx). n → ∞ lim ∫ A u r n ( s , x ) π X ( s ) ( d x ) = ∫ A u r ( s , x ) π X ( s ) ( d x ) .
For A ∈ B n A\in\mathcal{B}^n A ∈ B n , by definition of u r m ( s , x ) u_r^m(s,x) u r m ( s , x ) , for m ≥ n m\geq n m ≥ n , we have ∫ A u r m ( s , x ) π X ( s ) ( d x ) = π ( s ) ( A × Y ≤ r ) \int_A u_r^m(s,x)\pi_X(s)(dx)=\pi(s)(A\times Y^{\leq r}) ∫ A u r m ( s , x ) π X ( s ) ( d x ) = π ( s ) ( A × Y ≤ r ) . This shows that u r ( s , x ) u_r(s,x) u r ( s , x ) satisfies
∫ A u r ( s , x ) π X ( s ) ( d x ) = π ( s ) ( A × Y ≤ r ) \int_A u_r(s,x)\pi_X(s)(dx)=\pi(s)(A\times Y^{\leq r}) ∫ A u r ( s , x ) π X ( s ) ( d x ) = π ( s ) ( A × Y ≤ r )
for any A ∈ ⋃ n ≥ 1 B n A\in\bigcup_{n\geq1}\mathcal{B}^n A ∈ ⋃ n ≥ 1 B n . The measures are probability measures and hence in particular σ \sigma σ -finite. The equality extends to any A ∈ B X = σ ( ⋃ n ≥ 1 B n ) A\in\mathcal{B}_X=\sigma\left(\bigcup_{n\geq1}\mathcal{B}^n\right) A ∈ B X = σ ( ⋃ n ≥ 1 B n ) , since any finite measures that agree on an algebra necessarily agree on the generated σ \sigma σ -algebra. This completes the proof of our assertion. □
Proof of Theorem A.1 (ii). Since we have assumed that Y Y Y is a standard Borel space, it is isomorphic as a measurable space to a Borel subset of [ 0 , 1 ] [0,1] [ 0 , 1 ] . We identify Y Y Y with its image and assume that Y ⊂ [ 0 , 1 ] Y \subset[0,1] Y ⊂ [ 0 , 1 ] . By Lemma A.2, for any r ∈ Q ∩ [ 0 , 1 ] r \in\mathbb{Q} \cap[0,1] r ∈ Q ∩ [ 0 , 1 ] , there exist jointly measurable functions u r : S × X → R u_r:S \times X \to\mathbb{R} u r : S × X → R satisfying u r ( s , x ) ≤ u r ′ ( s , x ) u_r(s,x) \le u_{r'}(s,x) u r ( s , x ) ≤ u r ′ ( s , x ) if r ≤ r ′ r \le r' r ≤ r ′ and u 1 ( s , x ) ≡ 1 u_1(s,x) \equiv1 u 1 ( s , x ) ≡ 1 , such that
∫ A u r ( s , x ) π X ( s ) ( d x ) = π ( s ) ( A × Y ≤ r ) \int_A u_r(s,x)\pi_X(s)(\mathrm{d}x)=\pi(s)(A \times Y^{\le r}) ∫ A u r ( s , x ) π X ( s ) ( d x ) = π ( s ) ( A × Y ≤ r )
for any A ∈ B X A \in\mathcal{B}_X A ∈ B X . Let
F t ( s , x ) : = inf r ∈ Q ∩ ( t , 1 ] u r ( s , x ) , t ∈ [ 0 , 1 ) F_t(s,x):=\inf_{r\in\mathbb{Q}\cap(t,1]}u_r(s,x), \qquad t\in[0,1) F t ( s , x ) := r ∈ Q ∩ ( t , 1 ] inf u r ( s , x ) , t ∈ [ 0 , 1 )
and F 1 ( s , x ) ≡ 1 F_1(s,x) \equiv1 F 1 ( s , x ) ≡ 1 . For fixed ( s , x ) ∈ S × X (s,x) \in S \times X ( s , x ) ∈ S × X , the function t ↦ F t ( s , x ) t \mapsto F_t(s,x) t ↦ F t ( s , x ) on [ 0 , 1 ] [0,1] [ 0 , 1 ] is a non-decreasing right continuous function with F 1 ( s , x ) ≡ 1 F_1(s,x) \equiv1 F 1 ( s , x ) ≡ 1 . By the theorem of Lebesgue–Stieltjes, t ↦ F t ( s , x ) t \mapsto F_t(s,x) t ↦ F t ( s , x ) is a distribution function of a unique probability measure κ ( s , x ) \kappa(s,x) κ ( s , x ) on [ 0 , 1 ] [0,1] [ 0 , 1 ] , such that
κ ( s , x ) ( [ 0 , t ] ) = F t ( s , x ) \kappa(s,x)([0,t])=F_t(s,x) κ ( s , x ) ([ 0 , t ]) = F t ( s , x )
for any t ∈ [ 0 , 1 ] t \in[0,1] t ∈ [ 0 , 1 ] . For a fixed t t t , the function F t ( s , x ) F_t(s,x) F t ( s , x ) is a countable infimum of jointly measurable functions, hence is jointly measurable. For t ∈ [ 0 , 1 ) t \in[0,1) t ∈ [ 0 , 1 ) , take a sequence of rational points r m ↓ t r_m \downarrow t r m ↓ t . Then u r m ( s , x ) → F t ( s , x ) u_{r_m}(s,x) \to F_t(s,x) u r m ( s , x ) → F t ( s , x ) by monotonicity, so by the dominated convergence theorem and continuity from above of π ( s ) \pi(s) π ( s ) , we see that
∫ A κ ( s , x ) ( [ 0 , t ] ) π X ( s ) ( d x ) = π ( s ) ( A × Y ≤ t ) , t ∈ [ 0 , 1 ] , A ∈ B X . \int_A \kappa(s,x)([0,t])\pi_X(s)(\mathrm{d}x)=\pi(s)(A \times Y^{\le t}), \qquad t\in[0,1], \quad A\in\mathcal{B}_X. ∫ A κ ( s , x ) ([ 0 , t ]) π X ( s ) ( d x ) = π ( s ) ( A × Y ≤ t ) , t ∈ [ 0 , 1 ] , A ∈ B X .
The system
D = { B ~ ∈ B [ 0 , 1 ] ∣ κ ( s , x ) ( B ~ ) jointly measurable in ( s , x ) } \mathcal{D}=\{\widetilde{B}\in\mathcal{B}_{[0,1]}\mid\kappa(s,x)(\widetilde{B})\text{ jointly measurable in }(s,x)\} D = { B ∈ B [ 0 , 1 ] ∣ κ ( s , x ) ( B ) jointly measurable in ( s , x )}
is a λ \lambda λ -system containing the π \pi π -system { [ 0 , t ] ∣ t ∈ [ 0 , 1 ] } \{[0,t]\mid t\in[0,1]\} {[ 0 , t ] ∣ t ∈ [ 0 , 1 ]} generating B [ 0 , 1 ] \mathcal{B}_{[0,1]} B [ 0 , 1 ] . Hence again by the π \pi π -λ \lambda λ theorem, we have D = B [ 0 , 1 ] \mathcal{D}=\mathcal{B}_{[0,1]} D = B [ 0 , 1 ] . This shows that κ ( s , x ) ( B ~ ) \kappa(s,x)(\widetilde{B}) κ ( s , x ) ( B ) is jointly measurable in ( s , x ) (s,x) ( s , x ) for any B ~ ∈ B [ 0 , 1 ] \widetilde{B}\in\mathcal{B}_{[0,1]} B ∈ B [ 0 , 1 ] . We next extend the above equality from [ 0 , t ] [0,t] [ 0 , t ] to any measurable B ~ ⊂ [ 0 , 1 ] \widetilde{B}\subset[0,1] B ⊂ [ 0 , 1 ] . Fix s ∈ S s\in S s ∈ S and A ∈ B X A\in\mathcal{B}_X A ∈ B X , and consider the finite measures on [ 0 , 1 ] [0,1] [ 0 , 1 ] given by
∫ A κ ( s , x ) ( B ~ ) π X ( s ) ( d x ) , π ( s ) ( A × ( Y ∩ B ~ ) ) \int_A \kappa(s,x)(\widetilde{B})\pi_X(s)(\mathrm{d}x), \qquad\pi(s)(A \times(Y \cap\widetilde{B})) ∫ A κ ( s , x ) ( B ) π X ( s ) ( d x ) , π ( s ) ( A × ( Y ∩ B ))
for any B ~ ∈ B [ 0 , 1 ] . T h e y a g r e e o n t h e \widetilde{B}\in\mathcal{B}_{[0,1]}. They agree on the B ∈ B [ 0 , 1 ] . T h ey a g r eeo n t h e \pi$-system { [ 0 , t ] ∣ t ∈ [ 0 , 1 ] } \{[0,t]\mid t\in[0,1]\} {[ 0 , t ] ∣ t ∈ [ 0 , 1 ]} generating B [ 0 , 1 ] \mathcal{B}_{[0,1]} B [ 0 , 1 ] , hence by the π \pi π -λ \lambda λ theorem coincide as finite measures on [ 0 , 1 ] [0,1] [ 0 , 1 ] . Thus we have
∫ A κ ( s , x ) ( B ~ ) π X ( s ) ( d x ) = π ( s ) ( A × ( Y ∩ B ~ ) ) , A ∈ B X \int_A \kappa(s,x)(\widetilde{B})\pi_X(s)(\mathrm{d}x)=\pi(s)(A \times(Y \cap\widetilde{B})), \qquad A\in\mathcal{B}_X ∫ A κ ( s , x ) ( B ) π X ( s ) ( d x ) = π ( s ) ( A × ( Y ∩ B )) , A ∈ B X
for any $\widetilde{B}\in\mathcal{B}_{[0,1]}. In particular,
∫ X κ ( s , x ) ( Y ) π X ( s ) ( d x ) = π ( s ) ( X × Y ) = 1. \int_X \kappa(s,x)(Y)\pi_X(s)(\mathrm{d}x)=\pi(s)(X\times Y)=1. ∫ X κ ( s , x ) ( Y ) π X ( s ) ( d x ) = π ( s ) ( X × Y ) = 1.
Since κ ( s , x ) ( Y ) ≤ 1 \kappa(s,x)(Y)\le1 κ ( s , x ) ( Y ) ≤ 1 , the set N s : = { x ∈ X ∣ κ ( s , x ) ( Y ) < 1 } N_s:=\{x\in X\mid\kappa(s,x)(Y)<1\} N s := { x ∈ X ∣ κ ( s , x ) ( Y ) < 1 } is π X ( s ) \pi_X(s) π X ( s ) -null. Moreover, since Y ∈ D Y\in\mathcal{D} Y ∈ D , the function κ ( s , x ) ( Y ) \kappa(s,x)(Y) κ ( s , x ) ( Y ) is jointly measurable on S × X S\times X S × X , so the set N : = { ( s , x ) ∈ S × X ∣ κ ( s , x ) ( Y ) < 1 } N:=\{(s,x)\in S\times X\mid\kappa(s,x)(Y)<1\} N := {( s , x ) ∈ S × X ∣ κ ( s , x ) ( Y ) < 1 } is measurable in S × X S\times X S × X . Fix y 0 ∈ Y y_0\in Y y 0 ∈ Y and modify κ \kappa κ so that κ ( s , x ) = δ y 0 \kappa(s,x)=\delta_{y_0} κ ( s , x ) = δ y 0 on N N N . This modification does not change the fact that κ ( s , x ) ( B ~ ) \kappa(s,x)(\widetilde{B}) κ ( s , x ) ( B ) is jointly measurable on S × X S\times X S × X , and ensures that the measure κ ( s , x ) \kappa(s,x) κ ( s , x ) is supported on Y Y Y for any ( s , x ) ∈ S × X (s,x)\in S\times X ( s , x ) ∈ S × X . Since B Y ⊂ B [ 0 , 1 ] \mathcal{B}_Y\subset\mathcal{B}_{[0,1]} B Y ⊂ B [ 0 , 1 ] , for any B ∈ B Y B \in\mathcal{B}_Y B ∈ B Y , the function κ ( s , x ) ( B ) \kappa(s,x)(B) κ ( s , x ) ( B ) is jointly measurable on S × X S \times X S × X , hence κ \kappa κ gives a stochastic morphism κ : S × X → Y \kappa:S \times X \to Y κ : S × X → Y . Moreover,
∫ A κ ( s , x ) ( B ) π X ( s ) ( d x ) = π ( s ) ( A × B ) , A ∈ B X , B ∈ B Y , (23) \int_A \kappa(s,x)(B)\pi_X(s)(dx)=\pi(s)(A \times B), \qquad A \in\mathcal{B}_X,\quad B \in\mathcal{B}_Y, \tag*{(23)} ∫ A κ ( s , x ) ( B ) π X ( s ) ( d x ) = π ( s ) ( A × B ) , A ∈ B X , B ∈ B Y , (23)
which is (21). Hence κ \kappa κ is a conditional law of Y Y Y given X X X for π \pi π . The uniqueness follows from (i), since a standard Borel space is countably generated. This completes the proof of Theorem A.1 (ii). □
Expectation and Conditional Expectation
In this appendix, we define the expectations and conditional expectations as pull-backs of functions with respect to conditional laws. Throughout this appendix, we assume that the parameter space S = 1 : = { ∗ } S = 1 := \{\ast\} S = 1 := { ∗ } , and will identify μ ∈ P ( X ) \mu\in\mathcal{P}(X) μ ∈ P ( X ) with a stochastic morphism μ : 1 → X \mu:1 \to X μ : 1 → X mapping ∗ \ast ∗ to μ \mu μ . Here, P ( X ) \mathcal{P}(X) P ( X ) is the space of probability measures on X X X . For a stochastic morphism u : X → Y u:X \to Y u : X → Y , we write u ( μ ) : = u ∘ μ u(\mu):=u \circ\mu u ( μ ) := u ∘ μ for the probability measure on Y Y Y given by
u ( μ ) ( B ) = ∫ X u ( x ) ( B ) μ ( d x ) for B ∈ B Y . u(\mu)(B)=\int_X u(x)(B)\mu(dx) \text{ for } B \in\mathcal{B}_Y. u ( μ ) ( B ) = ∫ X u ( x ) ( B ) μ ( d x ) for B ∈ B Y .
For any measurable space X X X , denote by B ( X ) \mathcal{B}(X) B ( X ) the space of bounded measurable functions on X X X . The space B ( X ) \mathcal{B}(X) B ( X ) is a Banach space with respect to the supremum norm ∥ f ∥ ∞ : = sup x ∈ X ∣ f ( x ) ∣ \lVert f\rVert_\infty:=\sup_{x\in X}|f(x)| ∥ f ∥ ∞ := sup x ∈ X ∣ f ( x ) ∣ for any f ∈ B ( X ) f \in\mathcal{B}(X) f ∈ B ( X ) . We define the expectation of f f f with respect to μ ∈ P ( X ) \mu\in\mathcal{P}(X) μ ∈ P ( X ) by
E μ [ f ] : = ∫ X f ( x ) μ ( d x ) . \mathbb{E}_{\mu}[f]:=\int_X f(x)\mu(dx). E μ [ f ] := ∫ X f ( x ) μ ( d x ) .
Definition B.1. Let u : X → Y u:X \to Y u : X → Y be a stochastic morphism. For any g ∈ B ( Y ) g \in\mathcal{B}(Y) g ∈ B ( Y ) , we define the pull-back u ∗ g ∈ B ( X ) u^*g \in\mathcal{B}(X) u ∗ g ∈ B ( X ) to be the bounded measurable function
u ∗ g ( x ) : = ∫ Y g ( y ) u ( x ) ( d y ) , x ∈ X . u^*g(x):=\int_Y g(y)u(x)(dy), \qquad x \in X. u ∗ g ( x ) := ∫ Y g ( y ) u ( x ) ( d y ) , x ∈ X . Note that if u : X → Y u:X \to Y u : X → Y is a deterministic morphism, then
u ∗ g ( x ) = ∫ Y g ( y ) δ u ( x ) ( d y ) = g ( u ( x ) ) = ( g ∘ u ) ( x ) u^*g(x)=\int_Y g(y)\delta_{u(x)}(dy)=g(u(x))=(g\circ u)(x) u ∗ g ( x ) = ∫ Y g ( y ) δ u ( x ) ( d y ) = g ( u ( x )) = ( g ∘ u ) ( x ) for any g ∈ B ( Y ) g \in\mathcal{B}(Y) g ∈ B ( Y ) and x ∈ X x \in X x ∈ X , hence we have u ∗ g = g ∘ u u^*g=g\circ u u ∗ g = g ∘ u .
Proposition B.2. Let u : X → Y u:X \to Y u : X → Y be a stochastic morphism. Then the pull-back
u ∗ : B ( Y ) → B ( X ) u^*:\mathcal{B}(Y)\to\mathcal{B}(X) u ∗ : B ( Y ) → B ( X ) is a continuous map of operator norm ≤ 1 \le1 ≤ 1 . In addition, for stochastic morphisms u : X → Y u:X \to Y u : X → Y and v : Y → Z v:Y \to Z v : Y → Z , the pull-back of the composition satisfies
( v ∘ u ) ∗ = u ∗ ∘ v ∗ : B ( Z ) → B ( X ) . (24) (v\circ u)^*=u^*\circ v^*:\mathcal{B}(Z)\to\mathcal{B}(X). \tag*{(24)} ( v ∘ u ) ∗ = u ∗ ∘ v ∗ : B ( Z ) → B ( X ) . (24)
Proof. Given a stochastic morphism u : X → Y u:X \to Y u : X → Y and g ∈ B ( Y ) g \in\mathcal{B}(Y) g ∈ B ( Y ) , the pull-back u ∗ g u^*g u ∗ g satisfies
∣ u ∗ g ( x ) ∣ ≤ ∫ Y ∣ g ( y ) ∣ u ( x ) ( d y ) ≤ ∥ g ∥ ∞ , x ∈ X . |u^*g(x)|\le\int_Y |g(y)|u(x)(dy)\le\lVert g\rVert_\infty,\qquad x\in X. ∣ u ∗ g ( x ) ∣ ≤ ∫ Y ∣ g ( y ) ∣ u ( x ) ( d y ) ≤ ∥ g ∥ ∞ , x ∈ X .
This shows that u ∗ : B ( Y ) → B ( X ) u^*: \mathcal{B}(Y) \to\mathcal{B}(X) u ∗ : B ( Y ) → B ( X ) has operator norm ≤ 1 \le1 ≤ 1 , hence gives a continuous map of Banach spaces. In addition, if u : X → Y u:X \to Y u : X → Y and v : Y → Z v:Y \to Z v : Y → Z are stochastic morphisms, then
u ∗ ( v ∗ h ) ( x ) = ∫ Y v ∗ h ( y ) u ( x ) ( d y ) = ∫ Z ∫ Y h ( z ) v ( y ) ( d z ) u ( x ) ( d y ) = ∫ Z h ( z ) ( v ∘ u ) ( x ) ( d z ) = ( v ∘ u ) ∗ h ( x ) , (25) u^*(v^*h)(x)=\int_Y v^*h(y)u(x)(dy)=\int_Z\int_Y h(z)v(y)(dz)u(x)(dy)
=\int_Z h(z)(v\circ u)(x)(dz)=(v\circ u)^*h(x), \tag*{(25)} u ∗ ( v ∗ h ) ( x ) = ∫ Y v ∗ h ( y ) u ( x ) ( d y ) = ∫ Z ∫ Y h ( z ) v ( y ) ( d z ) u ( x ) ( d y ) = ∫ Z h ( z ) ( v ∘ u ) ( x ) ( d z ) = ( v ∘ u ) ∗ h ( x ) , (25)
which proves (23). □
We next extend the pull-back to L p L^p L p -spaces. For any probability measure μ \mu μ on X X X and p ≥ 1 p\ge1 p ≥ 1 , let L p ( X , μ ) L^p(X,\mu) L p ( X , μ ) be the L p L^p L p space consisting of equivalence classes of p p p -integrable functions on X X X with respect to the probability measure μ \mu μ , where two functions are equivalent if they agree μ \mu μ -almost everywhere. The L p L^p L p -norm is defined by
∥ f ∥ L p ( X , μ ) : = ( ∫ X ∣ f ( x ) ∣ p μ ( d x ) ) 1 / p . \|f\|_{L^p(X,\mu)}:=\left(\int_X |f(x)|^p\mu(dx)\right)^{1/p}. ∥ f ∥ L p ( X , μ ) := ( ∫ X ∣ f ( x ) ∣ p μ ( d x ) ) 1/ p .
The space of bounded measurable functions B ( X ) \mathcal{B}(X) B ( X ) is dense in L p ( X , μ ) L^p(X,\mu) L p ( X , μ ) for the L p L^p L p -norm.
Lemma B.3. Let μ \mu μ be a probability measure on X X X , and let u : X → Y u:X\to Y u : X → Y be a stochastic morphism. Then for any p ≥ 1 p\ge1 p ≥ 1 , the pull-back extends uniquely to a continuous map
u ∗ : L p ( Y , u ( μ ) ) → L p ( X , μ ) u^*:L^p(Y,u(\mu))\to L^p(X,\mu) u ∗ : L p ( Y , u ( μ )) → L p ( X , μ ) of operator norm ≤ 1 \le1 ≤ 1 .
Proof. By definition of u ( μ ) u(\mu) u ( μ ) , for any h ∈ B ( Y ) h\in\mathcal{B}(Y) h ∈ B ( Y ) we have
E μ [ u ∗ h ] = ∫ X ∫ Y h ( y ) u ( x ) ( d y ) μ ( d x ) = ∫ Y h ( y ) u ( μ ) ( d y ) = E u ( μ ) [ h ] . \mathbb{E}_{\mu}[u^*h]=\int_X\int_Y h(y)u(x)(dy)\mu(dx)=\int_Y h(y)u(\mu)(dy)=\mathbb{E}_{u(\mu)}[h]. E μ [ u ∗ h ] = ∫ X ∫ Y h ( y ) u ( x ) ( d y ) μ ( d x ) = ∫ Y h ( y ) u ( μ ) ( d y ) = E u ( μ ) [ h ] .
Let g ∈ B ( Y ) g\in\mathcal{B}(Y) g ∈ B ( Y ) . Since u ( x ) u(x) u ( x ) is a probability measure on Y Y Y for any x ∈ X x\in X x ∈ X , Jensen’s inequality for the convex function t ↦ ∣ t ∣ p t\mapsto|t|^p t ↦ ∣ t ∣ p gives
∣ u ∗ g ( x ) ∣ p = ∣ ∫ Y g ( y ) u ( x ) ( d y ) ∣ p ≤ ∫ Y ∣ g ( y ) ∣ p u ( x ) ( d y ) = u ∗ ∣ g ∣ p ( x ) , x ∈ X , |u^*g(x)|^p=\left|\int_Y g(y)u(x)(dy)\right|^p\le\int_Y |g(y)|^p u(x)(dy)=u^*|g|^p(x),\qquad x\in X, ∣ u ∗ g ( x ) ∣ p = ∫ Y g ( y ) u ( x ) ( d y ) p ≤ ∫ Y ∣ g ( y ) ∣ p u ( x ) ( d y ) = u ∗ ∣ g ∣ p ( x ) , x ∈ X ,
hence applying the above equality to h = ∣ g ∣ p h=|g|^p h = ∣ g ∣ p , we have
∥ u ∗ g ∥ L p ( X , μ ) p = E μ [ ∣ u ∗ g ∣ p ] ≤ E μ [ u ∗ ∣ g ∣ p ] = E u ( μ ) [ ∣ g ∣ p ] = ∥ g ∥ L p ( Y , u ( μ ) ) p . \|u^*g\|_{L^p(X,\mu)}^p=\mathbb{E}_{\mu}[|u^*g|^p]\le\mathbb{E}_{\mu}[u^*|g|^p]=\mathbb{E}_{u(\mu)}[|g|^p]=\|g\|_{L^p(Y,u(\mu))}^p. ∥ u ∗ g ∥ L p ( X , μ ) p = E μ [ ∣ u ∗ g ∣ p ] ≤ E μ [ u ∗ ∣ g ∣ p ] = E u ( μ ) [ ∣ g ∣ p ] = ∥ g ∥ L p ( Y , u ( μ )) p .
In particular, if g = 0 g=0 g = 0 holds u ( μ ) u(\mu) u ( μ ) -almost everywhere, then u ∗ g = 0 u^*g=0 u ∗ g = 0 holds μ \mu μ -almost everywhere, hence u ∗ u^* u ∗ induces a map of operator norm ≤ 1 \le1 ≤ 1 from the image of B ( Y ) \mathcal{B}(Y) B ( Y ) in L p ( Y , u ( μ ) ) L^p(Y,u(\mu)) L p ( Y , u ( μ )) to L p ( X , μ ) L^p(X,\mu) L p ( X , μ ) . Since B ( Y ) \mathcal{B}(Y) B ( Y ) is dense in L p ( Y , u ( μ ) ) L^p(Y,u(\mu)) L p ( Y , u ( μ )) , this map extends uniquely to a continuous map u ∗ : L p ( Y , u ( μ ) ) → L p ( X , μ ) u^*:L^p(Y,u(\mu))\to L^p(X,\mu) u ∗ : L p ( Y , u ( μ )) → L p ( X , μ ) of operator norm ≤ 1 \le1 ≤ 1 . □
The value u ∗ g ( x ) = E u ( x ) [ g ] u^*g(x)=\mathbb{E}_{u(x)}[g] u ∗ g ( x ) = E u ( x ) [ g ] is the expectation of g g g for the probability measure u ( x ) u(x) u ( x ) on Y Y Y . Hence we will often write
E u [ g ] : = u ∗ g \mathbb{E}_u[g]:=u^*g E u [ g ] := u ∗ g
and refer to the pull-back u ∗ g u^*g u ∗ g as the expectation of g g g with respect to u u u . Consider a probability measure π ∈ P ( X × Y ) \pi\in\mathcal{P}(X\times Y) π ∈ P ( X × Y ) , which we also view as a stochastic morphism π : 1 → X × Y \pi:1\to X\times Y π : 1 → X × Y . In what follows, we assume that the conditional laws π ( X ∣ Y ) : Y → X \pi(X \mid Y):Y \to X π ( X ∣ Y ) : Y → X and π ( Y ∣ X ) : X → Y \pi(Y \mid X):X \to Y π ( Y ∣ X ) : X → Y exist. The expectations of conditional laws satisfy the following adjoint property.
Lemma B.4. Let π ∈ P ( X × Y ) \pi\in\mathcal{P}(X \times Y) π ∈ P ( X × Y ) . Then for any f ∈ B ( X ) f \in\mathcal{B}(X) f ∈ B ( X ) and g ∈ B ( Y ) g \in\mathcal{B}(Y) g ∈ B ( Y ) , we have
E π X [ f E π ( Y ∣ X ) [ g ] ] = E π [ f g ] = E π Y [ E π ( X ∣ Y ) [ f ] g ] , (26) \mathbb{E}_{\pi_X}\left[f\mathbb{E}_{\pi(Y\mid X)}[g]\right]=\mathbb{E}_{\pi}[fg]=\mathbb{E}_{\pi_Y}\left[\mathbb{E}_{\pi(X\mid Y)}[f]g\right], \tag*{(26)} E π X [ f E π ( Y ∣ X ) [ g ] ] = E π [ f g ] = E π Y [ E π ( X ∣ Y ) [ f ] g ] , (26) where π X \pi_X π X and π Y \pi_Y π Y are the X X X - and Y Y Y -marginals of π \pi π , and f g ∈ B ( X × Y ) fg \in\mathcal{B}(X \times Y) f g ∈ B ( X × Y ) denotes the function ( x , y ) ↦ f ( x ) g ( y ) (x,y) \mapsto f(x)g(y) ( x , y ) ↦ f ( x ) g ( y ) on X × Y X \times Y X × Y .
Proof. For S = 1 S=1 S = 1 , the conditional law is characterized by π = ( pr X , π ( Y ∣ X ) ) ∘ π X \pi=(\operatorname{pr}_X,\pi(Y\mid X))\circ\pi_X π = ( pr X , π ( Y ∣ X )) ∘ π X . Hence
E π [ f g ] = ∫ X × Y f ( x ) g ( y ) ∫ X δ x ( d x ′ ) π ( Y ∣ X ) ( x ′ ) ( d y ) π X ( d x ′ ) = ∫ X f ( x ) ∫ Y g ( y ) π ( Y ∣ X ) ( x ) ( d y ) π X ( d x ) = E π X [ f E π ( Y ∣ X ) [ g ] ] , \begin{aligned}
\mathbb{E}_{\pi}[fg]=\int_{X\times Y}f(x)g(y)\int_X\delta_x(\mathrm{d}x')\pi(Y\mid X)(x')(\mathrm{d}y)\pi_X(\mathrm{d}x') \\
&=\int_X f(x)\int_Y g(y)\pi(Y\mid X)(x)(\mathrm{d}y)\pi_X(\mathrm{d}x)=\mathbb{E}_{\pi_X}\left[f\mathbb{E}_{\pi(Y\mid X)}[g]\right],
\end{aligned} E π [ f g ] = ∫ X × Y f ( x ) g ( y ) ∫ X δ x ( d x ′ ) π ( Y ∣ X ) ( x ′ ) ( d y ) π X ( d x ′ ) = ∫ X f ( x ) ∫ Y g ( y ) π ( Y ∣ X ) ( x ) ( d y ) π X ( d x ) = E π X [ f E π ( Y ∣ X ) [ g ] ] ,
which proves the first equality. The second equality follows similarly by exchanging the roles of X X X and Y Y Y . □
The spaces L 2 ( X , π X ) L^2(X,\pi_X) L 2 ( X , π X ) and L 2 ( Y , π Y ) L^2(Y,\pi_Y) L 2 ( Y , π Y ) are Hilbert spaces with inner products
⟨ f , f ′ ⟩ π X : = E π X [ f f ′ ] , ⟨ g , g ′ ⟩ π Y : = E π Y [ g g ′ ] \langle f,f'\rangle_{\pi_X}:=\mathbb{E}_{\pi_X}[ff'],\qquad\langle g,g'\rangle_{\pi_Y}:=\mathbb{E}_{\pi_Y}[gg'] ⟨ f , f ′ ⟩ π X := E π X [ f f ′ ] , ⟨ g , g ′ ⟩ π Y := E π Y [ g g ′ ]
for f , f ′ ∈ L 2 ( X , π X ) f,f'\in L^2(X,\pi_X) f , f ′ ∈ L 2 ( X , π X ) and g , g ′ ∈ L 2 ( Y , π Y ) g,g'\in L^2(Y,\pi_Y) g , g ′ ∈ L 2 ( Y , π Y ) . Then (24) extended to L 2 L^2 L 2 by continuity gives
⟨ f , E π ( Y ∣ X ) [ g ] ⟩ π X = ⟨ E π ( X ∣ Y ) [ f ] , g ⟩ π Y , \langle f,\mathbb{E}_{\pi(Y\mid X)}[g]\rangle_{\pi_X}=\langle\mathbb{E}_{\pi(X\mid Y)}[f],g\rangle_{\pi_Y}, ⟨ f , E π ( Y ∣ X ) [ g ] ⟩ π X = ⟨ E π ( X ∣ Y ) [ f ] , g ⟩ π Y ,
showing that E π ( Y ∣ X ) \mathbb{E}_{\pi(Y\mid X)} E π ( Y ∣ X ) and E π ( X ∣ Y ) \mathbb{E}_{\pi(X\mid Y)} E π ( X ∣ Y ) are adjoint to each other as operators between Hilbert spaces.
For π ∈ P ( X × Y ) \pi\in\mathcal{P}(X\times Y) π ∈ P ( X × Y ) , the conditional expectation E π [ f ∣ Y ] \mathbb{E}_{\pi}[f\mid Y] E π [ f ∣ Y ] of f ∈ L 1 ( X , π X ) f\in L^1(X,\pi_X) f ∈ L 1 ( X , π X ) given Y Y Y for the joint law π \pi π is characterized as the unique function in L 1 ( Y , π Y ) L^1(Y,\pi_Y) L 1 ( Y , π Y ) satisfying
E π Y [ E π [ f ∣ Y ] g ] = E π [ f g ] , g ∈ B ( Y ) . (27) \mathbb{E}_{\pi_Y}[\mathbb{E}_{\pi}[f\mid Y]g]=\mathbb{E}_{\pi}[fg],\qquad g\in\mathcal{B}(Y). \tag*{(27)} E π Y [ E π [ f ∣ Y ] g ] = E π [ f g ] , g ∈ B ( Y ) . (27)
Lemma B.4 gives the following.
Lemma B.5. Let π ∈ P ( X × Y ) \pi\in\mathcal{P}(X\times Y) π ∈ P ( X × Y ) . Then for any f ∈ L 1 ( X , π X ) f\in L^1(X,\pi_X) f ∈ L 1 ( X , π X ) , we have
E π [ f ∣ Y ] = E π ( X ∣ Y ) [ f ] ∈ L 1 ( Y , π Y ) . \mathbb{E}_{\pi}[f\mid Y]=\mathbb{E}_{\pi(X\mid Y)}[f]\in L^1(Y,\pi_Y). E π [ f ∣ Y ] = E π ( X ∣ Y ) [ f ] ∈ L 1 ( Y , π Y ) .
Proof. By Lemma B.4, E π ( X ∣ Y ) [ f ] \mathbb{E}_{\pi(X\mid Y)}[f] E π ( X ∣ Y ) [ f ] satisfies the characterization (25) of the conditional expectation for f ∈ B ( X ) f\in\mathcal{B}(X) f ∈ B ( X ) , and for f ∈ L 1 ( X , π X ) f\in L^1(X,\pi_X) f ∈ L 1 ( X , π X ) by continuity, since both sides of (25) are continuous in f f f for the L 1 L^1 L 1 -norm by ∣ E π [ f g ] ∣ ≤ ∥ g ∥ ∞ ∥ f ∥ L 1 ( X , π X ) |\mathbb{E}_{\pi}[fg]|\leq\lVert g\rVert_{\infty}\lVert f\rVert_{L^1(X,\pi_X)} ∣ E π [ f g ] ∣ ≤ ∥ g ∥ ∞ ∥ f ∥ L 1 ( X , π X ) and Lemma B.3. For the uniqueness, suppose h 1 , h 2 ∈ L 1 ( Y , π Y ) h_1,h_2\in L^1(Y,\pi_Y) h 1 , h 2 ∈ L 1 ( Y , π Y ) both satisfy E π Y [ h i g ] = E π [ f g ] \mathbb{E}_{\pi_Y}[h_i g]=\mathbb{E}_{\pi}[fg] E π Y [ h i g ] = E π [ f g ] for all g ∈ B ( Y ) g\in\mathcal{B}(Y) g ∈ B ( Y ) . Taking g = 1 B g=1_B g = 1 B for B ∈ B Y B\in\mathcal{B}_Y B ∈ B Y gives
∫ B h 1 d π Y = E π [ f 1 B ] = ∫ B h 2 d π Y for all B ∈ B Y , \int_B h_1\,\mathrm{d}\pi_Y=\mathbb{E}_{\pi}[f1_B]=\int_B h_2\,\mathrm{d}\pi_Y\qquad\text{for all }B\in\mathcal{B}_Y, ∫ B h 1 d π Y = E π [ f 1 B ] = ∫ B h 2 d π Y for all B ∈ B Y ,
so ∫ B ( h 1 − h 2 ) d π Y = 0 \int_B(h_1-h_2)\,\mathrm{d}\pi_Y=0 ∫ B ( h 1 − h 2 ) d π Y = 0 for every B ∈ B Y B\in\mathcal{B}_Y B ∈ B Y . Choosing B = { h 1 > h 2 } B=\{h_1>h_2\} B = { h 1 > h 2 } , the integrand is strictly positive on B B B , forcing π Y ( B ) = 0 \pi_Y(B)=0 π Y ( B ) = 0 . Similarly for { h 1 < h 2 } \{h_1<h_2\} { h 1 < h 2 } . Hence h 1 = h 2 h_1=h_2 h 1 = h 2 holds π Y \pi_Y π Y -almost everywhere, i.e. they are the same element of L 1 ( Y , π Y ) L^1(Y,\pi_Y) L 1 ( Y , π Y ) . □
The tower property of the conditional law (Theorem 2.7 ), in the form of the chain rule Lemma 2.6 (c), gives the tower property of conditional expectations. Consider π ∈ P ( X × Y × Z ) \pi\in\mathcal{P}(X \times Y \times Z) π ∈ P ( X × Y × Z ) . The conditional laws and expectations below are taken with respect to the marginals of π \pi π .
Proposition B.6. Let π ∈ P ( X × Y × Z ) \pi\in\mathcal{P}(X \times Y \times Z) π ∈ P ( X × Y × Z ) , and suppose the conditional laws π ( Y ∣ X ) \pi(Y \mid X) π ( Y ∣ X ) and π ( Z ∣ X × Y ) \pi(Z \mid X \times Y) π ( Z ∣ X × Y ) exist. Then π ( Z ∣ X ) \pi(Z \mid X) π ( Z ∣ X ) exists, and for any f ∈ B ( Z ) f \in\mathcal{B}(Z) f ∈ B ( Z ) , we have
E π [ E π [ f ∣ X × Y ] ∣ X ] = E π [ f ∣ X ] . \mathbb{E}_{\pi}\left[\mathbb{E}_{\pi}[f \mid X \times Y] \mid X\right] = \mathbb{E}_{\pi}[f \mid X]. E π [ E π [ f ∣ X × Y ] ∣ X ] = E π [ f ∣ X ] . Proof. By the chain rule Lemma 2.6 (c) for S = 1 S = 1 S = 1 , the conditional law π ( Z ∣ X ) \pi(Z \mid X) π ( Z ∣ X ) exists and satisfies
π ( Z ∣ X ) = π ( Z ∣ X × Y ) ∘ π ( Y ∣ X ) ∧ . \pi(Z \mid X) = \pi(Z \mid X \times Y) \circ\pi(Y \mid X)^{\wedge}. π ( Z ∣ X ) = π ( Z ∣ X × Y ) ∘ π ( Y ∣ X ) ∧ . By Lemma B.5, we have E π [ f ∣ X × Y ] = E π ( Z ∣ X × Y ) [ f ] \mathbb{E}_{\pi}[f \mid X \times Y] = \mathbb{E}_{\pi(Z \mid X \times Y)}[f] E π [ f ∣ X × Y ] = E π ( Z ∣ X × Y ) [ f ] and E π [ f ∣ X ] = E π ( Z ∣ X ) [ f ] \mathbb{E}_{\pi}[f \mid X] = \mathbb{E}_{\pi(Z \mid X)}[f] E π [ f ∣ X ] = E π ( Z ∣ X ) [ f ] . For h ∈ B ( X × Y ) h \in\mathcal{B}(X \times Y) h ∈ B ( X × Y ) , the characterization (27) of E π [ h ∣ X ] \mathbb{E}_{\pi}[h \mid X] E π [ h ∣ X ] and π X × Y = π ( Y ∣ X ) ∧ ∘ π X \pi_{X \times Y} = \pi(Y \mid X)^{\wedge} \circ\pi_X π X × Y = π ( Y ∣ X ) ∧ ∘ π X of (3) give
E π X [ E π [ h ∣ X ] g ] = E π X × Y [ h ( g ∘ pr X ) ] = E π X [ E π ( Y ∣ X ) ∧ [ h ] g ] , g ∈ B ( X ) , \mathbb{E}_{\pi_X}[\mathbb{E}_{\pi}[h \mid X]g] = \mathbb{E}_{\pi_{X \times Y}}[h(g \circ\operatorname{pr}_X)] = \mathbb{E}_{\pi_X}[\mathbb{E}_{\pi(Y \mid X)^{\wedge}}[h]g], \qquad g \in\mathcal{B}(X), E π X [ E π [ h ∣ X ] g ] = E π X × Y [ h ( g ∘ pr X )] = E π X [ E π ( Y ∣ X ) ∧ [ h ] g ] , g ∈ B ( X ) , hence E π [ h ∣ X ] = E π ( Y ∣ X ) ∧ [ h ] \mathbb{E}_{\pi}[h \mid X] = \mathbb{E}_{\pi(Y \mid X)^{\wedge}}[h] E π [ h ∣ X ] = E π ( Y ∣ X ) ∧ [ h ] . Hence by (23), we have
E π [ f ∣ X ] = π ( Z ∣ X ) ∗ f = ( π ( Y ∣ X ) ∧ ) ∗ ( π ( Z ∣ X × Y ) ∗ f ) = E π [ E π [ f ∣ X × Y ] ∣ X ] \mathbb{E}_{\pi}[f \mid X] = \pi(Z \mid X)^{*}f = \left(\pi(Y \mid X)^{\wedge}\right)^{*}\left(\pi(Z \mid X \times Y)^{*}f\right) = \mathbb{E}_{\pi}\left[\mathbb{E}_{\pi}[f \mid X \times Y] \mid X\right] E π [ f ∣ X ] = π ( Z ∣ X ) ∗ f = ( π ( Y ∣ X ) ∧ ) ∗ ( π ( Z ∣ X × Y ) ∗ f ) = E π [ E π [ f ∣ X × Y ] ∣ X ] as desired. □
Consider random variables X X X , Y Y Y on a probability space ( Ω , F , P ) (\Omega, \mathcal{F}, \mathbb{P}) ( Ω , F , P ) with values in measurable spaces ( X , B X ) (X, \mathcal{B}_X) ( X , B X ) , ( Y , B Y ) (Y, \mathcal{B}_Y) ( Y , B Y ) . Let π \pi π be the joint law of X X X and Y Y Y on the canonical probability space ( X × Y , B X ⊗ B Y ) (X \times Y, \mathcal{B}_X \otimes\mathcal{B}_Y) ( X × Y , B X ⊗ B Y ) . The coordinate projections pr X \operatorname{pr}_X pr X and pr Y \operatorname{pr}_Y pr Y on the probability space ( X × Y , π ) (X \times Y,\pi) ( X × Y , π ) have the same joint law as X X X and Y Y Y , so that
E P [ f ( X ) ] = E π [ f ∘ pr X ] = E π X [ f ] \mathbb{E}_{\mathbb{P}}[f(X)] = \mathbb{E}_{\pi}[f \circ\operatorname{pr}_X] = \mathbb{E}_{\pi_X}[f] E P [ f ( X )] = E π [ f ∘ pr X ] = E π X [ f ]
for any bounded measurable f : X → R f : X \to\mathbb{R} f : X → R . Thus, our expectation notation E π \mathbb{E}_{\pi} E π agrees with classical expectation under this canonical realization.
A Dictionary of Notations
In this appendix, we compare the notation of this article with the classical notation of probability theory and with the notation of Markov categories [10 ] , in which morphisms are drawn as string diagrams read from bottom to top, with copy X : X → X ⊗ X \operatorname{copy}_X : X \to X \otimes X copy X : X → X ⊗ X and del X : X → I \operatorname{del}_X : X \to I del X : X → I the copy and delete morphisms, and copy X ( 3 ) : X → X ⊗ X ⊗ X \operatorname{copy}^{(3)}_X : X \to X \otimes X \otimes X copy X ( 3 ) : X → X ⊗ X ⊗ X the threefold copy. In the classical column, X X X , Y Y Y and Z Z Z denote random variables on a probability space ( Ω , F , P ) (\Omega, \mathcal{F}, \mathbb{P}) ( Ω , F , P ) . In the other two columns, they denote measurable spaces or objects. Classical conditional probabilities and conditionals in Markov categories are unique only almost surely, as is the conditional law of this article.
Table C.1.
Table 1.
Table 1 (PDF p. 35).
Acknowledgment. The first author would like to thank Emtiyaz Khan for introducing to him [15 ] , and for inspiration and passionate discussion through the Bayes-Duality Project, which helped him to understand the Bayesian way of thinking. The authors thank Thomas Möllenhoff and Yoshino Taro for helpful insights. We also thank the members of the Bayes Study Group at Keio University/RIKEN AIP for discussion, especially Kei Hagihara and Kanji Inui.
Email address: bannai@math.keio.ac.jp
(Bannai) Department of Mathematics, Faculty of Science and Technology, Keio University, 3-14-1 Hiyoshi, Kohoku-ku, Yokohama 223-8522, Japan.
(Bannai, Kurisaki) Mathematical Science Team, Riken Center for Advanced Intelligence Project (AIP), 1-4-1 Nihonbashi, Chuo-ku, Tokyo 103-0027, Japan.