This is from a standing point of a new student of measure-theoretic probability. For example, we have the following two definitions of conditional expectation:
Definition 1 ($L^2$):
Let $(\Omega, F , P )$ be a probability space and let $G$ be a $σ$−algebra contained in $F$ . For any real random variable $X ∈ L^2(Ω,F,P)$, define $E(X |G)$ to be the orthogonal projection of $X$ onto the closed subspace $L^2(Ω,G,P)$
Definition 2 ($L^1$):
Let $(Ω,F,P)$ be a probability space and let $G$ be a $σ$−algebra contained in F. For any real random variable $X∈L^1(Ω,F,P)$, define $E(X|G)$ to be the unique random variable $Z∈L^1(Ω,G,P)$such that for every bounded, $G$−measurable random variable $Y$, $E(XY)=E(ZY)$.
How do we know which one to work with? And we also hear frequently that "Assume xx is square integrable"..."We require this is in $L^1$"..."We require this is in $L^2$ etc. But I never undestood, for example, why certain theorems require a random variable to be $L^1$-bounded.
Please enlighten me about why this distinction is crucial, either from Probability Theory standing point or Analysis standing point.