In probability theory, the Doob–Dynkin lemma, named after Joseph L. Doob and Eugene Dynkin (also known as the factorization lemma), characterizes the situation when one random variable is a function of another by the inclusion of the 
  
    
      
        σ
      
    
    {\displaystyle \sigma }
  
-algebras generated by the random variables. The usual statement of the lemma is formulated in terms of one random variable being measurable with respect to the 
  
    
      
        σ
      
    
    {\displaystyle \sigma }
  
-algebra generated by the other.
 The lemma plays an important role in the conditional expectation in probability theory, where it allows replacement of the conditioning on a random variable by conditioning on the 
  
    
      
        σ
      
    
    {\displaystyle \sigma }
  
-algebra that is generated by the random variable.
 In the lemma below, 
  
    
      
        
          
            B
          
        
        [
        0
        ,
        1
        ]
      
    
    {\displaystyle {\mathcal {B}}[0,1]}
  
 is the 
  
    
      
        σ
      
    
    {\displaystyle \sigma }
  
-algebra of Borel sets on 
  
    
      
        [
        0
        ,
        1
        ]
        .
      
    
    {\displaystyle [0,1].}
  
 If 
  
    
      
        T
        :
        X
        →
        Y
        ,
      
    
    {\displaystyle T\colon X\to Y,}
  
 and 
  
    
      
        (
        Y
        ,
        
          
            Y
          
        
        )
      
    
    {\displaystyle (Y,{\mathcal {Y}})}
  
 is a measurable space, then
 is the smallest 
  
    
      
        σ
      
    
    {\displaystyle \sigma }
  
-algebra on 
  
    
      
        X
      
    
    {\displaystyle X}
  
 such that 
  
    
      
        T
      
    
    {\displaystyle T}
  
 is 
  
    
      
        σ
        (
        T
        )
        
          /
        
        
          
            Y
          
        
      
    
    {\displaystyle \sigma (T)/{\mathcal {Y}}}
  
-measurable. 
 Let 
  
    
      
        T
        :
        Ω
        →
        
          Ω
          ′
        
      
    
    {\displaystyle T\colon \Omega \rightarrow \Omega '}
  
 be a function, and 
  
    
      
        (
        
          Ω
          ′
        
        ,
        
          
            
              A
            
          
          ′
        
        )
      
    
    {\displaystyle (\Omega ',{\mathcal {A}}')}
  
 a measurable space. A function 
  
    
      
        f
        :
        Ω
        →
        [
        0
        ,
        1
        ]
      
    
    {\displaystyle f\colon \Omega \rightarrow [0,1]}
  
 is 
  
    
      
        σ
        (
        T
        )
        
          /
        
        
          
            B
          
        
        [
        0
        ,
        1
        ]
      
    
    {\displaystyle \sigma (T)/{\mathcal {B}}[0,1]}
  
-measurable if and only if 
  
    
      
        f
        =
        g
        ∘
        T
        ,
      
    
    {\displaystyle f=g\circ T,}
  
 for some 
  
    
      
        
          
            
              A
            
          
          ′
        
        
          /
        
        
          
            B
          
        
        [
        0
        ,
        1
        ]
      
    
    {\displaystyle {\mathcal {A}}'/{\mathcal {B}}[0,1]}
  
-measurable 
  
    
      
        g
        :
        
          Ω
          ′
        
        →
        [
        0
        ,
        1
        ]
        .
      
    
    {\displaystyle g\colon \Omega '\to [0,1].}
  

 Remark. The "if" part simply states that the composition of two measurable functions is measurable. The "only if" part is proven below.
 Let 
  
    
      
        f
      
    
    {\displaystyle f}
  
 be 
  
    
      
        σ
        (
        T
        )
        
          /
        
        
          
            B
          
        
        [
        0
        ,
        1
        ]
      
    
    {\displaystyle \sigma (T)/{\mathcal {B}}[0,1]}
  
-measurable.
 Assume that 
  
    
      
        f
        =
        
          
            1
          
          
            A
          
        
      
    
    {\displaystyle f=\mathbf {1} _{A}}
  
 is an indicator of some set 
  
    
      
        A
        ∈
        σ
        (
        T
        )
        .
      
    
    {\displaystyle A\in \sigma (T).}
  
 If 
  
    
      
        A
        =
        
          T
          
            −
            1
          
        
        (
        
          A
          ′
        
        )
        ,
      
    
    {\displaystyle A=T^{-1}(A'),}
  
 then the function 
  
    
      
        g
        =
        
          
            
              1
            
          
          
            
              A
              ′
            
          
        
      
    
    {\displaystyle g={\mathbf {1} }_{A'}}
  
 suits the requirement. By linearity, the claim extends to any simple measurable function 
  
    
      
        f
        .
      
    
    {\displaystyle f.}
  

 Let 
  
    
      
        f
      
    
    {\displaystyle f}
  
 be measurable but not necessarily simple. As explained in the article on simple functions, 
  
    
      
        f
      
    
    {\displaystyle f}
  
 is a pointwise limit of a monotonically non-decreasing sequence 
  
    
      
        
          f
          
            n
          
        
        ≥
        0
      
    
    {\displaystyle f_{n}\geq 0}
  
 of simple functions. The previous step guarantees that 
  
    
      
        
          f
          
            n
          
        
        =
        
          g
          
            n
          
        
        ∘
        T
        ,
      
    
    {\displaystyle f_{n}=g_{n}\circ T,}
  
 for some measurable 
  
    
      
        
          g
          
            n
          
        
        .
      
    
    {\displaystyle g_{n}.}
  
 The supremum 
  
    
      
        
          g
          (
          x
          )
          =
          
            sup
            
              n
              ≥
              1
            
          
          
            g
            
              n
            
          
          (
          x
          )
        
      
    
    {\displaystyle \textstyle g(x)=\sup _{n\geq 1}g_{n}(x)}
  
 exists on the entire 
  
    
      
        
          Ω
          ′
        
      
    
    {\displaystyle \Omega '}
  
 and is measurable. (The article on measurable functions explains why supremum of a sequence of measurable functions is measurable). For every 
  
    
      
        x
        ∈
        Im
        ⁡
        T
        ,
      
    
    {\displaystyle x\in \operatorname {Im} T,}
  
 the sequence 
  
    
      
        
          g
          
            n
          
        
        (
        x
        )
      
    
    {\displaystyle g_{n}(x)}
  
 is non-decreasing, so 
  
    
      
        
          g
          
            
              |
            
            
              Im
              ⁡
              T
            
          
          (
          x
          )
          =
          
            lim
            
              n
              →
              ∞
            
          
          
            g
            
              n
            
          
          
            
              |
            
            
              Im
              ⁡
              T
            
          
          (
          x
          )
        
      
    
    {\displaystyle \textstyle g|_{\operatorname {Im} T}(x)=\lim _{n\to \infty }g_{n}|_{\operatorname {Im} T}(x)}
  
 which shows that 
  
    
      
        f
        =
        g
        ∘
        T
        .
      
    
    {\displaystyle f=g\circ T.}
  

 Remark. The lemma remains valid if the space 
  
    
      
        (
        [
        0
        ,
        1
        ]
        ,
        
          
            B
          
        
        [
        0
        ,
        1
        ]
        )
      
    
    {\displaystyle ([0,1],{\mathcal {B}}[0,1])}
  
 is replaced with 
  
    
      
        (
        S
        ,
        
          
            B
          
        
        (
        S
        )
        )
        ,
      
    
    {\displaystyle (S,{\mathcal {B}}(S)),}
  
 where 
  
    
      
        S
        ⊆
        [
        −
        ∞
        ,
        ∞
        ]
        ,
      
    
    {\displaystyle S\subseteq [-\infty ,\infty ],}
  
 
  
    
      
        S
      
    
    {\displaystyle S}
  
 is bijective with 
  
    
      
        [
        0
        ,
        1
        ]
        ,
      
    
    {\displaystyle [0,1],}
  
 and the bijection is measurable in both directions.
 By definition, the measurability of 
  
    
      
        f
      
    
    {\displaystyle f}
  
 means that 
  
    
      
        
          f
          
            −
            1
          
        
        (
        S
        )
        ∈
        σ
        (
        T
        )
      
    
    {\displaystyle f^{-1}(S)\in \sigma (T)}
  
 for every Borel set 
  
    
      
        S
        ⊆
        [
        0
        ,
        1
        ]
        .
      
    
    {\displaystyle S\subseteq [0,1].}
  
 Therefore 
  
    
      
        σ
        (
        f
        )
        ⊆
        σ
        (
        T
        )
        ,
      
    
    {\displaystyle \sigma (f)\subseteq \sigma (T),}
  
 and the lemma may be restated as follows.
 Lemma. Let 
  
    
      
        T
        :
        Ω
        →
        
          Ω
          ′
        
        ,
      
    
    {\displaystyle T\colon \Omega \rightarrow \Omega ',}
  
 
  
    
      
        f
        :
        Ω
        →
        [
        0
        ,
        1
        ]
        ,
      
    
    {\displaystyle f\colon \Omega \rightarrow [0,1],}
  
  and 
  
    
      
        (
        
          Ω
          ′
        
        ,
        
          
            
              A
            
          
          ′
        
        )
      
    
    {\displaystyle (\Omega ',{\mathcal {A}}')}
  
 is a measurable space. Then 
  
    
      
        f
        =
        g
        ∘
        T
        ,
      
    
    {\displaystyle f=g\circ T,}
  
 for some 
  
    
      
        
          
            
              A
            
          
          ′
        
        
          /
        
        
          
            B
          
        
        [
        0
        ,
        1
        ]
      
    
    {\displaystyle {\mathcal {A}}'/{\mathcal {B}}[0,1]}
  
-measurable 
  
    
      
        g
        :
        
          Ω
          ′
        
        →
        [
        0
        ,
        1
        ]
        ,
      
    
    {\displaystyle g\colon \Omega '\to [0,1],}
  
 if and only if 
  
    
      
        σ
        (
        f
        )
        ⊆
        σ
        (
        T
        )
      
    
    {\displaystyle \sigma (f)\subseteq \sigma (T)}
  
.