4  Conditional expectation

4.1 Why?

Ok, time to move on to the final one in this block of four chapters that builds our foundations of modern Probability Theory — after this one we have everything in place to start exploring the world of stochastic processes and martingales! :).

We have now properly formalised all aspects of running an experiment with a (or more) random variable(s), cf. Definition 2.1 — and never forget about the key visual Figure 2.1:

  • a probability space \((\Omega,\mathcal{F},\P)\) (cf. Definition 1.50) consisting of a universe \(\Omega\) containing the possible outcomes of the experiment, a \(\sigma\)-algebra \(\mathcal{F}\) whose elements are subsets of \(\Omega\) that make up our events, and a probability measure \(\P:\mathcal{F} \to [0,1]\) yielding for each event a probability/likelihood of it happening;
  • a random variable \(X\) (cf. Definition 2.13) is a mapping/function \(X: \Omega \to \R\) with in particular a measurability property that establishes a crucial mechanism: we can talk about probabilities of stuff happening to \(X\) in its co-domain the real line, by linking via inverse images back to events in \(\mathcal{F}\) which naturally have probabilities (cf. Figure 2.5) — ultimately captured in the distribution of \(X\) (cf. Definition 2.20);
  • a new definition for the expectation \(\E[X]\) of a random variable \(X\) (cf. Definition 3.22) built around the intuition that it should equal the (properly weighted) “average” of all values that \(X\) can take on its co-domain/the real line, reassuringly consistent with formulas we knew already (cf. Proposition 3.23) and with a load of useful properties (cf. Theorem 3.24).

There is one more concept, that you will also already have seen before to some limited extent at least, that we need to give a proper place in our framework: conditioning, and that’s the goal of this chapter!

Now, as everything we have and will be discussing, conditioning is just hardcore maths: you could write down the definitions, results and proofs without any form of interpretation/intuition just fine. However, in general interpretation/intuition is (arguably) crucial to have an (abstract) picture/story in your head of what is actually going on, which is a massive help to understand how all the concepts work together, why the proofs are formulated the way they are, where to naturally go find a solution for a problem, etc. That’s not any different for conditioning, and therefore I’d like to start with building an intuitive story. It’s definitely far from the only possible story you could come up with, you decide whether you like mine or not!

Let’s first make the following observation:

Proposition 4.1 (The “best prediction” for the value that a random variable takes is its expectation) On some probability space \((\Omega,\mathcal{F},\P)\) (cf. Definition 1.50), let \(X\) be a random variable (cf. Definition 2.13) satisfying \(\E[X^2]<\infty\) so that \(\E[X] \in \R\).

We can interpret \(\E[X]\) as the “average value” of \(X\), as we did in Chapter 3, but also as the “best prediction” for the value that \(X\) will take in the sense that if you were forced to choose a number in the co-domain of \(X\), \(\R\), that is “closest to” the values that \(X\) takes (in suitable sense), then the number \(\E[X]\) is your best answer.

See Exercise 4.1 for a mathematical formulation and (simple) proof.

Now let’s describe our intuitive thinking.

Example 4.2 (Motivation: conditioning in real life) In maths, conditioning is regularly a fantastic tool to gain insights into complicated probabilistic experiments that otherwise seem impenetrable. It is essentially the mathematical equivalent of something you all already naturally do to break down, analyse and understand (complicated) real life situations with uncertain outcomes! Two examples:

  • Imagine that you are organising a BBQ for the people in your student flat. You need to make decisions about how many sausages to get (obviously you need to reserve some for Kevin the dog!) while you’re not entirely certain how many people will attend. What do you do? Well you naturally start thinking along the lines of “If 10 people attend I will need at least 40 sausages. If Harry attends as well I should get 10 extra (no offense Harry). If Sue and Jingsong attend I also need to get some vegetarian alternatives.” etc. These “ifs” are conditions that you add, and you decide what actions you should take in case there “ifs” materialise. If you’re a very organised person, you may even make different shopping lists to be prepared for the different “ifs”.
  • You’re in the pub with some friends discussing the FA Cup final Manchester United vs Manchester City to be played tomorrow. A lot of the chatter will be along the lines of “Well if Jack Grealish plays then it’s likely City will score a lot” or “If United manages to score first and keeps a clean sheet until halftime, then I’m pretty certain they will put their hands on the trophy” etc. — again, adding an “if” and analysing the outcome of the game if such a condition holds. If you’re very organised then maybe you want to even keep a list detailing what the likelihood of United/City winning looks like for each of the conditions that comes up.

Bottom line:

  1. You’re trying to predict an uncertain quantity/the value that a random variable \(X\) will take (above: \(X=\)number of sausages needed resp. say \(X=0\) (United wins) or \(X=1\) (City wins)). Or, equivalently by Proposition 4.1, you’re trying to compute \(\E[X]\). But: hard!

  2. You add extra information to the experiment by making an “if” assumption which turns the experiment into a simpler one (eliminating some possible outcomes, causing different probabilities for events, hence also different “behaviour” of \(X\) on the real line/distribution) where you can predict the value that \(X\) will take/compute its expectation.

  3. If you create a list of “if” assumptions, that jointly exhaustively cover all possible runs of the experiments, and you:

    • execute step 2 for each “if” assumption,
    • and compute the probability that each “if” assumption materialises

    then you can put all these pieces together to actually solve your original challenge in step 1!

    This step is nothing but the lovely Law of Total Expectation, cf. Exercise 4.4!

Now, there are multiple different types of conditioning: on an event (as you’ll already have seen in earlier Probability courses), on a random variable (as you’ll very likely also already have seen) and even on a \(\sigma\)-algebra (very likely new for you)! Step 2 in Example 4.2 above best aligns with the situation of conditioning on an event: “if Sue and Jingsong attend, then …” mathematically naturally translates to “with \(A\) the event that Sue and Jingsong attend, conditional on \(A\) we have that …”. So:

Definition 4.3 (Intuition behind conditioning on an event) In the context of a probabilistic experiment (cf. Definition 2.1)/probability space \((\Omega,\mathcal{F},\P)\) (cf. Definition 1.50), let \(X\) be a random variable (cf. Definition 2.13) and \(A \in \mathcal{F}\) an event. Then you can think about the conditional expectation of \(X\) given \(A\), denoted \(\E[X \, | \, A]\), as either the best prediction for the value that \(X\) will take or the “average value” of \(X\), under the assumption that the event \(A\) happens.

Based on this intuition, you’d expect the following extreme cases:

  • If \(A=\Omega\), then the assumption that \(A\) happens does not actually change anything since trivially \(\Omega\) always happens, and hence we’re asking just for the best prediction for/average value of \(X\) without further ado. Therefore \(\E[X \, | \, A] = \E[X]\).
  • If \(A\) is a singleton i.e. \(A=\{\omega\}\) for some \(\omega \in \Omega\), then the assumption that \(A\) happens means that we assume that \(\omega\) is the actual outcome of the experiment. In this case we know exactly what value \(X\) takes, namely \(X(\omega)\) and hence that is also the best prediction for/average value of \(X\): \(\E[X \, | \, A] = X(\omega)\).

For conditioning on a random variable or on a \(\sigma\)-algebra we need a slightly more dynamic context though, where essentially the information added to the experiment partly depends on the outcome of the experiment. I know, that seems a bit awkward — but mathematically reasonable and very valuable! For instance if you condition on a random variable \(Y\), then what that means is that the information added is the value that \(Y\) takes. But that means knowing \(Y(\omega)\), where \(\omega\) is the outcome of the experiment. And the whole point of the setup in Example 4.2 is that you do not know what the outcome of the experiment is, that’s the actual problem!

Therefore we create a slightly different setup to support our intuition of conditioning on a random variable or sigma-algebra, which goes back to the exciting ;) prisoner story from Subsection 1.5.4:

Definition 4.4 (Intuition behind conditioning on a random variable or sigma-algebra) In the context of a probabilistic experiment (cf. Definition 2.1)/probability space \((\Omega,\mathcal{F},\P)\) (cf. Definition 1.50), let \(X\) be a random variable (cf. Definition 2.13). Then you can think about the following concepts:

  1. the conditional expectation of \(X\) given \(Y\), where \(Y\) is another random variable, denoted \(\E[X \, | \, Y]\), or
  2. the conditional expectation of \(X\) given \(\mathcal{G}\), where \(\mathcal{G} \subseteq \mathcal{F}\) is a \(\sigma\)-algebra, denoted \(\E[X \, | \, \mathcal{G}]\)

as follows.

  1. Imagine that the experiment is executed with unknown (for you) outcome \(\omega \in \Omega\) (and hence \(X(\omega)\) is known behind the scenes).

  2. You are being given certain info, which is one of the following two:

    • in case a, the value \(Y(\omega)\);
    • in case b, the elements of/events in \(\mathcal{G}\) that happen (recall a \(\sigma\)-algebra as a “level of information” from Subsection 1.5.4!).
  3. You are now asked to provide the best prediction for the value that \(X\) has taken (or: the “average value” of \(X\)), obviously optimally using the info from step 2. Your answer is then the value of the conditional expectation.

There is a crucial difference here with Definition 4.3: generally, the number you’ll give as answer in step 3 will depend on the info received in step 2 and hence on the outcome \(\omega\) of the experiment! That is to say, where in Definition 4.3 the conditional expectation is a number, in this situation steps 1–3 above rather describe a mapping \(\Omega \to \R\). Hence the conditional expectations \(\E[X \, | \, Y]\) and \(\E[X \, | \, \mathcal{G}]\) are random variables (ignoring measurability for the moment)!

This is often a source of massive notational confusion, and I don’t blame you! Just keep in mind that “\(\E[X \, | \, Y]\)” and “\(\E[X \, | \, \mathcal{G}]\)” (despite the notation involving an “\(\E\)” etc.) are just names of specific random variables, used rather than one of the more formulaic/boring names like “\(X\)”, “\(Z\)”, “\(U\)” etc. The name does contain two specific bits of info/parameters: the random variable we’re taking the conditional expectation of (before the “\(|\)”) and the random variable resp. \(\sigma\)-algebra we’re conditioning on (after the “\(|\)”). So in particular, for some \(\omega \in \Omega\) fixed, \(\E[X \, | \, Y](\omega) \in \R\) resp. \(\E[X \, | \, \mathcal{G}](\omega) \in \R\) is the answer you give in step 3 if \(\omega\) is the outcome of the experiment feeding into step 1.

Based on this intuition, you’d expect the following extreme cases:

  • If \(Y\) is a constant random variable resp. \(\mathcal{G}=\{\emptyset,\Omega\}\) (cf. Example 1.34), then the info you get in step 2 is useless: a constant random variable tells you no difference between one outcome or the other, resp. \(\emptyset\) never happens while \(\Omega\) always happens. Hence in this situation, step 3 is asking for the best prediction for/average value of \(X\) without any further ado and the answer is always going to be \(\E[X]\), no matter what \(\omega \in \Omega\) feeds into step 1. That is, the conditional expectations simplify to constant random variables: \[\E[X \, | \, Y]=\E[X] \quad \text{and} \quad \E[X \, | \, \mathcal{G}]=\E[X].\]
  • If \(Y: \Omega \to \R\) is a one-to-one mapping resp. \(X\) is \(\mathcal{G}\)-measurable, then the info in step 2 is perfect in the sense that it allows you to deduce what \(X(\omega)\) is (with \(\omega\) as in step 1). Indeed if \(Y\) is a one-to-one mapping then knowing \(Y(\omega)\) means knowing \(\omega\) and hence \(X(\omega)\); resp. see Proposition 2.18. And if we can deduce the value \(X(\omega)\) then that is clearly also the answer we should give in step 3. That is, the conditional expectations are simply equal to \(X\): \[\E[X \, | \, Y]=X \quad \text{and} \quad \E[X \, | \, \mathcal{G}]=X.\]

The rest of this chapter is just ;) a matter of properly working out these bits of intuition!

NoteExercises

You can now do Exercise 4.1.

4.2 Conditioning on an event

Let’s first make firm the intuition about conditioning on an event, from Definition 4.3. We don’t need to do too much here — you’ll recall this from earlier Probability courses, nevertheless it’s useful to run through. Recall the basic definitions:

Definition 4.5 (Conditioning on an event: probabilities and expectations) On some probablity space \((\Omega,\mathcal{F},\P)\) (cf. Definition 1.50), let \(C \in \mathcal{F}\) be an event with \(\P(C)>0\) and let \(X\) be a random variable (cf. Definition 2.13). Then we define:

  1. for any event \(A \in \mathcal{F}\), the conditional probability of \(A\) given the event \(C\) as \[\P(A \, | \, C):=\frac{\P(A \cap C)}{\P(C)}, \tag{4.1}\]
  2. and the conditional expectation of \(X\) given the event \(C\) as \[\E[X \, | \, C] := \frac{\E[\mathbf{1}_C X]}{\P(C)} \tag{4.2}\] (provided \(\E[\mathbf{1}_C X]\) is well defined), where \(\mathbf{1}_C\) is the indicator function of \(C\) (cf. Subsection 2.4.2). It is useful to keep in mind that we can naturally interpret \(\E[X \, | \, C]\) still as the “average value” of \(X\), but now only over the domain \(C\) (rather over the whole \(\Omega\) which equals \(\E[X]\)).

Some notes:

  • Recall that indicator functions provide a natural link between probabilities and expectations, in the sense that for any event \(A \in \mathcal{F}\) it holds that \(\P(A)=\E[\mathbf{1}_A]\). So you could say that as long as you can do expectations, you can also do probabilities. In that vein, we could also have simply defined \(\P(A \, | \, C):=\E[\mathbf{1}_A \, | \, C]\), because then Equation 4.2 yields Equation 4.1: \[\begin{align*} \E \left[ \left. \mathbf{1}_A \, \right| \, C \right] &= \frac{\E \left[ \mathbf{1}_C \mathbf{1}_A \right]}{\P(C)} \\ &= \frac{\E \left[ \mathbf{1}_{A \cap C} \right]}{\P(C)} \\ &= \frac{\P(A \cap C)}{\P(C)}, \end{align*} \] the second equality using Exercise 4.2.

Here’s the thinking behind these definitions (using the same notation as in Definition 4.5). As we also said in Definition 4.3, if we condition on the event \(C\) then what we mean is that we look at the experiment under the assumption that the event \(C\) happens. Fix some event \(A \in \mathcal{F}\), and observe that only its elements that are also in \(C\) can still possibly happen. So that’s the elements of \(A \cap C\) (which may be empty of course). Further, the outcomes in \(C\) are becoming more likely than they were originally (just because we now know it must be one of them rather than one elsewhere in \(\Omega\)) i.e. their probabilities need to be scaled up. So we need to multiply \(\P(A \cap C)\) with a suitable scaling factor. The scaling factor \(1/\P(C)\) (which is \(\geq 1\) since \(\P(C) \in (0,1]\)), as used in Equation 4.1, is the correct one because \(C\) is now replacing \(\Omega\) as the (smallest) event certain to happen and should hence have probability \(1\), which is confirmed by Equation 4.1: \[\P(C \, | \, C)=\frac{\P(C \cap C)}{\P(C)}=\frac{\P(C)}{\P(C)}=1.\]

Further, for the conditional expectation of \(X\) given \(C\), given our ongoing interpretation of expectation as “average value” and that now only elements in \(C\) can still happen, it only makes sense that we want \(\E[X \, | \, C]\) to equal the “average value” of \(X\), but only over the domain \(C\) i.e. the “average value” of the restricted mapping \(X:C \to \R\) (as also mentioned in Definition 4.5). To see that this yields Equation 4.2 there are at least two ways.

The first is to consider (the restriction of) \(X\) as defined on a new space with universe \(C\) rather than \(\Omega\), and then go back to Lebesgue integrals (because this new space is typically no longer a probability space but rather a measure space): using Equation 3.29 together with Equation 3.27.

The second is to first realise that the random variable \(\mathbf{1}_C X\) (never forget, always feet firmly on the ground: this is just the random variable that is the product of the indicator function \(\mathbf{1}_C\) with \(X\) written in “pointwise mode”) is handy here because it only “keeps” the values that \(X\) takes on \(C\) while setting the rest equal to \(0\): for any \(\omega \in \Omega\): \[\mathbf{1}_C(\omega) X(\omega)=\begin{cases} 1 \cdot X(\omega)=X(\omega) & \text{if } \omega \in C \\ 0 \cdot X(\omega)=0 & \text{if } \omega \not\in C. \end{cases} \] So the “average value” of \(\mathbf{1}_C X\) (over the domain \(\Omega\)) i.e. \(\E[\mathbf{1}_C X]\) is almost what we’re looking for — it’s just the \(0\) contributions on \(C^c\) still contribute to that average while we don’t want that. Again, we can compensate for this with a scaling factor and again \(1/\P(C)\) is your guy, yielding Equation 4.2. Indeed, you would for instance want that the constant random variable \(X=1\) has “average value” equal to \(1\) over \(C\) right? Equation 4.2 delivers: \[\frac{\E[\mathbf{1}_C \cdot 1]}{\P(C)}=\frac{\E[\mathbf{1}_C]}{\P(C)}=\frac{\P(C)}{\P(C)}=1,\] where we used Equation 2.21.

Let’s conclude this section with a quick example and a remark.

Example 4.6 (Simple example of conditioning on an event) Let’s take the boring but hence easy to analyse example where \(X\) represents the result of rolling a fair die. We could e.g. take the probability space \((\Omega,\mathcal{F},\P)\) where \(\Omega=\{1,\ldots,6\}\), \(\mathcal{F}=\mathcal{P}(\Omega)\) (the powerset) and \(\P\) is determined by the values it assigns to the singletons i.e. \(\P(\{1\})=\ldots=\P(\{6\})=1/6\) — our standard setup for a “simple” experiment like this, recall e.g. from Example 1.54. And then \(X\) doesn’t really need to do anything with the outcomes, so we just take it to be the identity mapping \(X: \Omega \to \R\) given by \(X(\omega)=\omega\) for all \(\omega \in \Omega\). A visual in our favourite style can be found in Figure 4.1 (a).

Let’s condition on the event \(C\) that the outcome is larger than \(3\) i.e. \(C=\{4,5,6\}\), and look at the implications both intuitively and more formulaically using the expressions from Definition 4.5.

Intuitively. Conditioned on \(C\), we know that the outcome of the experiment must be one of \(4, 5, 6\) and can no longer be \(1, 2, 3\) which now hence get probability \(0\). The outcomes \(4, 5, 6\) remain equally likely (because there is nothing in the conditioning that changes that) and as these three are now the only possible outcomes, their probability goes up from \(1/6\) to \(1/3\) (since \(3 \cdot 1/3=1\) eh). Of course, this also changes the “behaviour” of \(X\) on the real line, with what probabilities it takes its possible values there i.e. its distribution (cf. Definition 2.20). See Figure 4.1 (b). This is our new context in which we now compute probabilities and expectations.

For a probability, take for instance \(A=\{5,6\}\). Then this event contains two out of the three equally likely outcomes and hence we’d expect that its probability is now \(2/3\). For the expectation of \(X\), we know need to look at the “average value” of \(X\) but only over the domain \(C\). With \(C\) as domain, \(X\) takes the values \(4, 5, 6\) on the real line with equal probabilities (in purple in Figure 4.1 (b)), and hence we’d expect its expectation/“average value” now to be \(5\).

Using the formulas from Definition 4.5. We can also simply don’t do any of the intuition above at all, i.e. stick with Figure 4.1 (a), and just apply the formulas from Definition 4.5. With \(A=\{5,6\}\), Equation 4.1 yields \[\P(A \, | \, C)=\frac{\P(\{5,6\} \cap \{4,5,6\})}{\P(\{4,5,6\})}=\frac{\P(\{5,6\})}{\P(\{4,5,6\})}=\frac{2/6}{3/6}=\frac{2}{3}.\] Further let’s work out Equation 4.2 for our \(X\). First observe that \(\mathbf{1}_C X: \Omega \to \R\) is the following random variable, recalling that \(X(\omega)=\omega\): \[\mathbf{1}_C(\omega) X(\omega)=\begin{cases} 0 & \text{if } \omega \in \{1,2,3\} \\ \omega & \text{if } \omega \in \{4,5,6\}. \end{cases} \] In order to compute the expectation of this guy, we just stay cool and collected and we note that it has range \(\{0,4,5,6\}\) and is therefore a discrete random variable (cf. Subsection 2.4.1), so that we can use Equation 2.19 (or/via Proposition 3.23) to compute \[\begin{align*} \E[\mathbf{1}_C X] &= 0 \cdot \P(\mathbf{1}_C X=0)+4 \cdot \P(\mathbf{1}_C X=4)+5 \cdot \P(\mathbf{1}_C X=5)+6 \cdot \P(\mathbf{1}_C X=6) \\ &= 4 \cdot \P(\{4\})+5 \cdot \P(\{5\})+6 \cdot \P(\{6\}) \\ &= 4 \cdot \frac{1}{6}+5 \cdot \frac{1}{6}+6 \cdot \frac{1}{6} \\ &= \frac{15}{6}. \end{align*} \] So Equation 4.2 yields \[\E[X \, | \, C] = \frac{\E[\mathbf{1}_C X]}{\P(C)}=\frac{15/6}{1/2}=5.\]

So, our intuition beautifully agrees with the formulas from Definition 4.5! :).

(a) Without any conditioning. In magenta the probabilities \(\mathbb{P}\) assigns to the possible outcomes, and in green the distribution of \(X\) that results in
(b) With conditioning on the event \(C=\{4,5,6\}\) in place. We can think about this as changing the probabilities of the possible outcomes in \(\Omega\) (in orange), and consequently also changing the “behaviour” of \(X\) on the real line i.e. its distribution (in purple)
Figure 4.1: Illustrating the experiment in Example 4.6

Remark 4.7. The intuitive approach in Definition 4.5 raises an interesting perspective: it seems to suggest that on a probability space \((\Omega,\mathcal{F},\P)\) with random variable \(X\), the effect of conditioning on an event \(C\) can also be captured by introducing a new probability measure, say \(\Q\) on \((\Omega,\mathcal{F})\) (in the above example, \(\Q\) is determined by assigning the orange probabilities in Figure 4.1 (b) to the possible outcomes), and that conditional probabilities/expectations on \((\Omega,\mathcal{F},\P)\) can equally well be computed as “normal” probabilities/expectations on this new probability space \((\Omega,\mathcal{F},\Q)\)!

It turns out that this indeed is the case in general — and will remain the case also after we’ve introduced the new concept of conditioning on \(\sigma\)-algebras. It won’t be part of our main discussion because of the whole having to draw the line somewhere business, but it is of course quite fascinating and therefore we’ll briefly explore this in Section 4.6.

NoteExercises

You can now do Exercise 4.2–Exercise 4.5.

4.3 Conditioning on a sigma-algebra

Now let’s move on to something new, and make the intuitive ideas behind conditioning on a \(\sigma\)-algebra from Definition 4.4 firm. Have another read of Definition 4.4, and take as our setting a probability space \((\Omega,\mathcal{F},\P)\) (cf. Definition 1.50) with a random variable \(X\) (cf. Definition 2.13). Further let \(\mathcal{G} \subseteq \mathcal{F}\) be a sub-\(\sigma\)-algebra of \(\mathcal{F}\), the one we want to condition on.

Now, as it turns out it is actually not that easy to make the intuition from Definition 4.4 rigorous for general \(\sigma\)-algebras, in particular because the “level of information” provided by a general \(\sigma\)-algebra (as used in step 2 in Definition 4.4) is hard to make precise (recall from Subsection 1.5.4). But we don’t let us get beaten that easily! Rather we come up with the following cunning plan: in the special case that \(\mathcal{G}\) is finite, we do understand its “level of information” pretty well and we can make the conditional expectation precise. Next we look at how we can use the insights we’ve gained to extend to the general case.

4.3.1 Special case: conditioning on a finite sigma-algebra

So let’s assume in this subsection, still working on \((\Omega,\mathcal{F},\P)\), that \(\mathcal{G}\) is a finite sub-\(\sigma\)-algebra of \(\mathcal{F}\). Look again at the process in Definition 4.4: the experiment has been done, there is some hidden outcome \(\omega \in \Omega\), and we’re told the “level of information” that \(\mathcal{G}\) provides about this outcome. Recall from Proposition 1.38 that because \(\mathcal{G}\) is finite, it has atoms: a collection of subsets \(A_1,\ldots,A_n\) that form a partition of \(\Omega\) and that generate \(\mathcal{G}\). Further, because \(\mathcal{G} \subseteq \mathcal{F}\), \(A_1,\ldots,A_n\) are also all elements of \(\mathcal{F}\) i.e. events.

Now, because \(A_1,\ldots,A_n\) forms a partition of \(\Omega\), each time the experiment is done the resulting outcome \(\omega \in \Omega\) is an element of exactly one of the \(A_i\)’s, and that’s also exactly the “level of information” provided by \(\mathcal{G}\): the \(A_i\) that happens (cf. Example 1.48). So, in step 2 of Definition 4.4, we’re being told which \(A_i\) happens. What do you then do in step 3 of Definition 4.4, to determine your best prediction of the value that \(X\) has taken, or equivalently the “average value” of \(X\)? We know that \(\omega \in A_i\), nothing more, nothing less about \(\omega\). So the best we can do to answer in step 3 of Definition 4.4 is by giving the “average value” of \(X\) but only over \(A_i\)! And this is of course, by Definition 4.5, exactly \(\E[X \, | \, A_i]\)!

So, following Definition 4.4, the value that we give the conditional expectation \(\E[X \, | \, \mathcal{G}]\) (a mapping from \(\Omega\) to \(\R\)!) is \(\E[X \, | \, A_i]\) (a number!), where \(A_i\) is the (unique) atom of \(\mathcal{G}\) that you’re being told happens in step 2 i.e. that contains the outcome \(\omega \in \Omega\) from step 1. In terms of a mathematical expression, that is the mapping \(\E[X \, | \, \mathcal{G}]: \Omega \to \R\) given by \[\E[X \, | \, \mathcal{G}](\omega)=\begin{cases} \E[X \, | \, A_1] & \text{if } \omega \in A_1 \\ \E[X \, | \, A_2] & \text{if } \omega \in A_2 \\ \quad \vdots & \quad \vdots \\ \E[X \, | \, A_n] & \text{if } \omega \in A_n. \end{cases} \tag{4.3}\] There we are — our first expression for the conditional expectation if we use a finite \(\sigma\)-algebra! Lovely.

It is worthwhile to note that rather than a list of different cases, as in Equation 4.3, we can equivalently write it in the form of a sum of indicator functions (cf. Subsection 2.4.2): \[\E[X \, | \, \mathcal{G}]=\sum_{i=1}^n \E[X \, | \, A_i] \mathbf{1}_{A_i}, \tag{4.4}\] which can be mathematically a bit more convenient at times. Note that each term in the summation is “just” of the form of a real number \(\E[X \, | \, A_i]\) multiplied by an indicator function \(\mathbf{1}_{A_i}\). To see that this is true, fix any \(\omega \in \Omega\) and plug it into both sides of Equation 4.4: \[\E[X \, | \, \mathcal{G}](\omega)=\sum_{i=1}^n \E[X \, | \, A_i] \mathbf{1}_{A_i}(\omega).\] Recall that \(\omega\) is necessarily an element of exactly one of \(A_1, \ldots, A_n\), say \(A_k\). Then \(\omega \in A_k\) implies that \(\mathbf{1}_{A_k}(\omega)=1\) while for any \(i \in \{1,\ldots,n\} \setminus \{k\}\) we have that \(\omega \not\in A_i\) and hence \(\mathbf{1}_{A_i}(\omega)=0\). Plugging this into the above, we indeed get that \(\E[X \, | \, \mathcal{G}](\omega)=\E[X \, | \, A_k]\), exactly what Equation 4.3 also yields. So ultimately, Equation 4.4 holds because \(A_1, \ldots, A_n\) is a partition of \(\Omega\), which ensures that for any \(\omega \in \Omega\) exactly one of the indictar functions equals \(1\) and that one has the right factor in front of it.

Fine! Let’s wrap up this discussion of the finite \(\sigma\)-algebra case by discussing three (as we will see, very important) properties of this conditional expectation i.e. the mapping given by Equation 4.3 & Equation 4.4, as well as a quick example. Here are the properties (bit of algebra ahead!):

Property 1. \(\E[X \, | \, \mathcal{G}]\) is a \(\mathcal{G}\)-measurable function, and hence also a random variable on \((\Omega,\mathcal{F},\P)\).

To prove this, observe that despite all the symbols and stuff, Equation 4.3 is a relatively simple mapping: it has finite range \[\big\{ \E[X \, | \, A_1], \E[X \, | \, A_2], \ldots, \E[X \, | \, A_n] \big\},\] and since \(A_1, \ldots, A_n \in \mathcal{G}\) it immediately follows from Exercise 2.3 i that \(\E[X \, | \, \mathcal{G}]\) is \(\mathcal{G}\)-measurable. Further, since by assumption \(\mathcal{G} \subseteq \mathcal{F}\), it is then also \(\mathcal{F}\)-measurable (cf. Exercise 2.2) and therefore a random variable on \((\Omega,\mathcal{F},\P)\) (cf. Definition 2.13).

Property 2. If \(X\) is integrable, then so is \(\E[X \, | \, \mathcal{G}]\).

For this, recall from Definition 3.22 that this means that if \(\E[\vert X \rvert]<\infty\) then also \(\E[ \lvert \E[X \, | \, \mathcal{G}] \rvert]<\infty\) (I know about this last expression — don’t let the symbol overload confuse you, just keep in mind that “\(\E[X \, | \, \mathcal{G}]\)” is to be read as one symbol defining a random variable!). Assume that \(\E[\vert X \rvert]<\infty\).

First note that for any event \(C \in \mathcal{F}\), we have that \[\lvert \E[\mathbf{1}_C X] \rvert \leq \E[ \lvert \mathbf{1}_C X \rvert ] \leq \E[\vert X \rvert]<\infty, \tag{4.5}\] where for the first inequality we can e.g. use Jensen’s inequality (cf. Theorem 3.24 iv and in particular Equation 3.45) and for the second that we have the pointwise inequality \(\lvert \mathbf{1}_C X \rvert \leq \vert X \rvert\) (easy to see, just plug in some \(\omega \in \Omega\) if you’re not convinced) to which we can then apply the non-negativity property (cf. Theorem 3.24 ii and in particular Equation 3.43).

Now, as also used in property 1 above, observe from Equation 4.3 that \(\E[X \, | \, \mathcal{G}]\) is a random variable with finite range, which of course means that it is just a discrete random variable! So we can just use Proposition 3.23 with \(h(x)=\lvert x \rvert\) to deduce that \[\E \big[ \lvert \E[X \, | \, \mathcal{G}] \rvert \big] = \sum_{i=1}^n \lvert \E[X \, | \, A_i] \rvert \P(A_i).\] Using that \(\P(A_i) \leq 1\) together with Equation 4.2 from Definition 4.5 and Equation 4.5, it immediately follows that the above right hand side is finite.

Property 3. For any event \(C \in \mathcal{G}\) it holds that \[\E \big[ \mathbf{1}_C \E[X \, | \, \mathcal{G}] \big]=\E[\mathbf{1}_C X]. \tag{4.6}\]

Note that we’re strictly only talking about the case that \(C\) is an element of the \(\sigma\)-algebra we’re conditioning on rather than the larger \(\mathcal{F}\)! Furtner note that on the left hand side of Equation 4.6, we’re talking the expectation of the random variable that is the product of the two random variables \(\mathbf{1}_C\) and \(\E[X \, | \, \mathcal{G}]\), while on the right hand side similarly the product of the random variables \(\mathbf{1}_C\) and \(X\)).

To see this, it’s maybe easier to work with Equation 4.4 rather than Equation 4.3. Let’s first work out the left hand side of Equation 4.6 a bit. Observe that plugging in Equation 4.4 we get that \[\begin{align*} \mathbf{1}_C \E[X \, | \, \mathcal{G}] &= \mathbf{1}_C \cdot \sum_{i=1}^n \E[X \, | \, A_i] \mathbf{1}_{A_i} \\ &= \sum_{i=1}^n \E[X \, | \, A_i] \mathbf{1}_C \mathbf{1}_{A_i} \\ &= \sum_{i=1}^n \E[X \, | \, A_i] \mathbf{1}_{A_i \cap C}, \end{align*} \] where the second equality just works out the bracket around the summation if you will (just write out the summation if you don’t believe me), and the final one uses Exercise 4.2 i. Now taking expectations on both sides, using linearity (cf. Theorem 3.24 i, recall that \(\E[X \, | \, A_n]\) is a real number i.e. a constant for this purpose) as well as that \(\E[\mathbf{1}_{A_i \cap C}]=\P(A_i \cap C)\) (cf. Equation 2.21), we arrive at \[\E \big[ \mathbf{1}_C \E[X \, | \, \mathcal{G}] \big] = \sum_{i=1}^n \E[X \, | \, A_i] \P(A_i \cap C).\]

So, the property we want to show we can now also write as: for any event \(C \in \mathcal{G}\) it holds that \[\sum_{i=1}^n \E[X \, | \, A_i] \P(A_i \cap C)=\E[\mathbf{1}_C X]. \tag{4.7}\] Now, recall from Proposition 1.38 the special form that any element of \(\mathcal{G}\) (being a finite \(\sigma\)-algebra with atoms \(A_1, \ldots, A_n\)) must have: either \(\emptyset\), or one of \(A_1, \ldots, A_n\), or some union of two or more of the \(A_i\)’s. Further recall that \(A_1, \ldots, A_n\) form a partition of \(\Omega\), cf. Definition 1.23.

  • Suppose that \(C=\emptyset\). Then because for any \(\omega \in \Omega\), \(\omega \not\in \emptyset\) (it’s empty after all eh!) we simply have that \(\mathbf{1}_C X=0\) and hence also \(\E[\mathbf{1}_C X]=0\) (cf. Exercise 3.5). Further for any \(i\) also \(\P(A_i \cap C)=\P(A_i \cap \emptyset)=\P(\emptyset)=0\) and hence Equation 4.7 indeed trivially holds.
  • Suppose that \(C=A_j\) for some \(j=1,\ldots,n\). Then looking at the terms in the left hand side of Equation 4.7, for any \(i \not= j\) we have that \(A_i \cap A_j=\emptyset\) (since the \(A_i\)’s form a partition of \(\Omega\)) and hence \(\P(A_i \cap A_j)=0\). This shows that the left hand side of Equation 4.7 simplifies to \(\E[X \, | \, A_j] \P(A_j)\), while on the right hand side of Equation 4.7 we have \(\E[\mathbf{1}_{A_j} X]\). And these are equal by very def, recall from Definition 4.5.
  • Finally suppose that \(C\) is the union of two or more of the \(A_i\)’s To express this, let \(I \subseteq \{1,\ldots,n\}\) be the indices of the \(A_i\)’s that are used to form \(C\), that is \(C=\cup_{j \in I} A_j\). On the left hand side of Equation 4.7, we get again from the partition property that \(A_i \cap C=\emptyset\) and hence \(\P(A_i \cap C)=0\) if \(i \not\in I\) while \(A_i \cap C=A_i\) and hence \(\P(A_i \cap C)=\P(A_i)\) if \(i \in I\). Hence the left hand side of Equation 4.7 boils down to \[\sum_{i \in I} \E[X \, | \, A_i] \P(A_i)=\sum_{i \in I} \E \left[ \mathbf{1}_{A_i} X \right],\] the final step by def (cf. Definition 4.5). Further, since \(C=\cup_{j \in I} A_j\) is a union of disjoint sets (again a partition property), we can write (cf. Exercise 4.2) \[\mathbf{1}_C=\sum_{i \in I} \mathbf{1}_{A_i}\] and hence \[\E[\mathbf{1}_C X]=\E \left[ X \sum_{i \in I} \mathbf{1}_{A_i} \right] = \sum_{i \in I} \E \left[ \mathbf{1}_{A_i} X \right],\] the final equality by linearity (cf. Theorem 3.24 i). Done!

It’s worthwhile to observe that this proof of property 3 fundamentally relies on the shape that \(C\) must have as it’s an element of \(\mathcal{G}\). So generally this proof wouldn’t work for events \(C \in \mathcal{F}\) that are not also elements of \(\mathcal{G}\), reiterating that the equality Equation 4.7 and hence Equation 4.6 is really only guaranteed to hold for events \(C \in \mathcal{G}\)!

Example 4.8 (Simple example of conditioning on a sigma-algebra) Consider the simple die rolling experiment from Example 4.6 again. Recall that we had chosen the event \(C=\{4,5,6\}\) and that we had already computed that \(\E[X \, | \, C]=5\).

Let’s go back to one of our favourite simple \(\sigma\)-algebras, namely set \(\mathcal{G}:=\{\emptyset,C,C^c,\Omega\}\) (cf. Example 1.34). As this is a finite \(\sigma\)-algebra, by Proposition 1.38 (and as discussed above) it must contains atoms \(A_1, \ldots, A_n\) i.e. a collection of “smallest” elements that form a partition of \(\Omega=\{1,\ldots,6\}\). Clearly in this case, \(n=2\) with \(A_1=C^c=\{1,2,3\}\) and \(A_2=C=\{4,5,6\}\) (or the other other way around of course).

Let’s see if we can compute the conditional expectation \(\E[X \, | \, \mathcal{G}]\) using Equation 4.3. For this we need to compute \(\E[X \, | \, A_1]\) and \(\E[X \, | \, A_2]\). Of course we have already computed \(\E[X \, | \, A_2]=\E[X \, | \, C]=5\), and if you repeat the comps from Example 4.6 where you condition on the event \(A_1=C^c\) rather then you’ll find that \(\E[X \, | \, A_2]=2\). Plugging this into Equation 4.3, we can conclude that \(\E[X \, | \, \mathcal{G}]\) is the random variable defined as follows: \[\E[X \, | \, \mathcal{G}](\omega)=\begin{cases} 2 & \text{if } \omega \in A_1 \\ 5 & \text{if } \omega \in A_2. \end{cases} \tag{4.8}\] See Figure 4.2 for a visual, and compare/contrast with the visual for \(X\) itself (i.e. without conditioning) from Figure 4.1 (a).

Let’s also walk through the intuition from Definition 4.4 for this specific experiment:

  • Step 1: the dice is rolled with an outcome \(\omega \in \Omega=\{1,\ldots,6\}\) and \(X\) takes its value \(X(\omega)\) (both unknown to us).
  • Step 2: we are being told which elements of \(\mathcal{G}\) happen. Looking at our \(\mathcal{G}\), this will either be \(A_1=C^c=\{1,2,3\}\) and \(\Omega\), or \(A_2=C=\{4,5,6\}\) and \(\Omega\). Indeed recall from Subsection 1.5.4 that it is always the case that multiple elements of a \(\sigma\)-algebra happen and that loosely speaking, the smallest one of them is logically the most informative for you.
  • Step 3: we now need to give our best prediction for the value that \(X\) has taken (i.e. the outcome of the die in this case)/its “average value”. Now, if we are told in Step 2 that \(A_1=C^c=\{1,2,3\}\) and \(\Omega\) happen, then we deduce that the die has shown \(1\), \(2\) or \(3\). As these outcomes are equally likely, we’d say that our best prediction/the “average value” of \(X\) given that info is \(2\). Similar if we are rather told in Step 2 that \(A_2=C=\{4,5,6\}\) and \(\Omega\) happen, then we deduce that the die has shown \(4\), \(5\) or \(6\) and our answer would rather be \(5\). Indeed, Equation 4.8 exactly expresses these possible answers!

Finally, it is worthwhile to make the following observation. As is immediate from Equation 4.8, \(\E[X \, | \, \mathcal{G}]\) is a random variable takin values \(2\) and \(5\) with probability \(1/2\) each. Hence its expectation is \(3.5\). Looking back at the original \(X\), which takes values \(1,\ldots,6\) with probability \(1/6\) each, this guy also has expectation \(3.5\). And this is actually not a coincidence! As we will see later, it is generally true that \[\E \big[ \E[X \, | \, \mathcal{G}] \big] = \E[X].\] This is, at its essence, a natural analogue of the Law of Total Expectation as seen in Exercise 4.4, and often both called by the same name and exploited in a similar way!

Figure 4.2: Illustrating Equation 4.8

4.3.2 The general case: conditioning on any sigma-algebra

Alrighty! So still working on a probability space \((\Omega,\mathcal{F},\P)\) (cf. Definition 1.50) with a random variable \(X\) (cf. Definition 2.13) and \(\mathcal{G} \subseteq \mathcal{F}\) a sub-\(\sigma\)-algebra of \(\mathcal{F}\), we have now developed an expression for the (what we think should be the) conditional expectation \(\E[X \, | \, \mathcal{G}]\) in the case that \(\mathcal{G}\) is finite, cf. Equation 4.3 & Equation 4.4.

But what about the general case, if \(\mathcal{G}\) is not finite? Well the analysis we did for the finite case relied heavily on the special structure such \(\sigma\)-algebras have, and sadly we have no such thing at all in the general case… So we’ll need to go about things in a different way. Let’s, for simplicity/to avoid having to track edge cases etc., for the sequel assume that \(X\) is integrable i.e. that \(\E[\lvert X \rvert]<\infty\) (cf. Definition 3.22).

If we can’t (easily) explicitly construct \(\E[X \, | \, \mathcal{G}]\), then maybe we can go down a more abstract existence route at least:

  • formulate properties that we would like \(\E[X \, | \, \mathcal{G}]\) to have,
  • prove that a random variable with such properties indeed (uniquely) exists.

My claim is that the properties we should focus on are naturally the following — not coincidentally the same ones we singled out and proved to hold in the finite case in Subsection 4.3.1 above: if \(Z\) is a random variable on \((\Omega,\mathcal{F},\P)\) with the properties

  1. \(Z\) is integrable,
  2. \(Z\) is \(\mathcal{G}\)-measurable,
  3. it holds that \[\E[\mathbf{1}_A Z]=\E[\mathbf{1}_A X] \quad \text{for all } A \in \mathcal{G} \tag{4.9}\]

then it is natural to define \(\E[X \, | \, \mathcal{G}]:=Z\).

Let me try to convince you intuitively. Property 1 is a technical one, not much to say. Properties 2 & 3 are where the soul is. Look again at Definition 4.4. In Step 2 there, we’re being given a load of elements/events in \(\mathcal{G}\) that happen and we’re staring at the question in Step 3. My claim is that if (and only if) \(Z\) satisfies the conditions 1–3 above, then is the(/a) right choice to use as answer in Step 3.

First of all, we need to be able to compute the value that \(Z\) takes i.e. \(Z(\omega)\) based on the limited information we’re given in Step 2 only so that we can give that one value as the answer in Step 3. Using Proposition 2.18, that translates to condition 2 above.

We can see this in action in Example 4.8. If we had an expression for \(Z\)/conditonal expectation there that would take a different value for \(\omega=4\) and \(\omega=5\) for instance then that would be unworkable. Indeed if we’re told that \(C=\{4,5,6\}\) and \(\Omega\) happen then that’s all we have and we need to be able to compute \(Z\)/conditonal expectation with that info only. So we need the \(Z\)/conditonal expectation to be constant on \(C=\{4,5,6\}\) and \(C^c=\{1,2,3\}\), which is exactly what \(\mathcal{G}\)-measurability in that example boils down to.

Next, if we ensure that condition 3 above holds, then if we divide both sides of Equation 4.9 by \(\P(A)\) it translates to (cf. Definition 4.5) \[\E[Z \, | \, A]=\E[X \, | \, A] \quad \text{for all } A \in \mathcal{G}\] that is: for any \(A \in \mathcal{G}\), \(Z\) has the same “average value” on \(A\) as \(X\) has. And that is exactly what you want it to do. Given the elements/events in \(\mathcal{G}\) that happen in Step 2 of Definition 4.4, you pick (the) one that is smallest/most informative, and then in Step 3 you want your answer i.e. the value of \(Z\) to equal the “average value” of \(X\) on that element!

Ok! I hope at least. ;). What about existence and uniqueness of a random variable \(Z\) satisfying properties 1–3 above? Existence can be shown but is a rather technical challenge, so we’re nicely going to delegate that one. ;). For uniqueness, we’re running into the same situation as we saw in Subsection 2.7.2 when we talked about almost sure convergence: unfortuantely there is no uniqueness in pointwise sense, but luckily there is uniqueness in almost sure sense. That is, if \(Z\) and \(\widetilde{Z}\) are two random variables on \((\Omega,\mathcal{F},\P)\) that both satisfy properties 1–3 above, then we have that \(Z=\widetilde{Z}\) a.s. (but not necessarily \(Z=\widetilde{Z}\) pointwise i.e. \(Z(\omega)=\widetilde{Z}(\omega)\) for all \(\omega \in \Omega\) is not necessarily true). See Exercise 4.8. The lack of pointwise uniqueness is also no big surprise at this point: if \(Z\) satisfies properties 1–3 and we change \(Z\) on a null event in \(\mathcal{G}\) only to create a new random variable \(\widetilde{Z}\), then \(\widetilde{Z}\) is still \(\mathcal{G}\)-measurable and satisfies properties 1 & 3 as well, because these are both formulated in terms of \(\E\) and \(\E\) notoriously doesn’t see any difference between the almost surely equal random variables \(Z\) and \(\widetilde{Z}\), as extensively discussed in Theorem 3.24!

Alright — here is then finally the Big And Complete Definition!

Definition 4.9 (Conditioning on a sigma-algebra) On a probability space \((\Omega,\mathcal{F},\P)\) (cf. Definition 1.50), let \(X\) be an integrable random variable (cf. Definition 2.13 & Definition 3.22). Further let \(\mathcal{G}\) be a sub-\(\sigma\)-algebra of \(\mathcal{F}\) i.e. \(\mathcal{G} \subseteq \mathcal{F}\). Then there exists an integrable random variable \(Z\) on this space with the properties:

  1. \(Z\) is \(\mathcal{G}\)-measurable (cf. Definition 2.6),
  2. for any event \(A \in \mathcal{G}\) it holds that \(\E[\mathbf{1}_A Z]=\E[\mathbf{1}_A X]\).

If \(\widetilde{Z}\) is any other random variable satisying properties i and ii, then \(\widetilde{Z}=Z\) a.s. (recall from Subsection 2.3.1), cf. Exercise 4.8.

We call any \(Z\) satisfying these two properties (a version of) the conditional expectation of \(X\) given the \(\sigma\)-algebra \(\mathcal{G}\) and denote it by \(\E[X \, | \, \mathcal{G}]\).

If \(\mathcal{G}\) is finite with atoms \(A_1,\ldots,A_n\) (cf. Proposition 1.38) with \(\P(A_i)>0\) for all \(i=1,\ldots,n\), then we can, and typically will, make the following specific explicit choice: for any \(\omega \in \Omega\) \[\E[X \, | \, \mathcal{G}](\omega)=\begin{cases} \E[X \, | \, A_1] & \text{if } \omega \in A_1 \\ \E[X \, | \, A_2] & \text{if } \omega \in A_2 \\ \qquad \vdots & \qquad \vdots \\ \E[X \, | \, A_n] & \text{if } \omega \in A_n \end{cases} = \sum_{i=1}^n \E[X \, | \, A_i] \mathbf{1}_{A_i}(\omega), \tag{4.10}\] where the \(\E[X \, | \, A_i]\)’s are numbers (!) defined in Definition 4.5 and the \(\mathbf{1}_{A_i}\)’s are indicator functions (cf. Subsection 2.4.2).

Some notes:

  • For a proof of the existence of a random variable satisfying properties i and ii (if \(\mathcal{G}\) is not finite), see e.g. Section 9.2 in Williams (1991). See also Section 4.6 for the outline of a construction via a change of measure.
  • Despite having “expectation” in its name and the symbol containing an “\(\E\)”, this conditional expectation is a (family of) random variable(s) rather than a number! Think about “\(\E[X \, | \, \mathcal{G}]\)” as just an elaborate name for a random variable where we otherwise would use just a “\(Y\)” or “\(Z\)” or so — of course this name does carry the information what the original random variable is (\(X\)) and what \(\sigma\)-algebra we’re conditioning on (\(\mathcal{G}\)).
  • The fact that we do not have a pointwise unique definition for \(\E[X \, | \, \mathcal{G}]\) may seem a bit disturbing at first, but it’s functionally not any different than that the amost sure limit of a sequence of random variables is not pointwise uniquely defined (cf. Subsection 2.7.2). See also the discussion in Remark 4.10.
  • If \(\mathcal{G}\) is finite but one or more of its atoms have probability \(0\), then you can still make Equation 4.10 work: just set \(\E[X \, | \, \mathcal{G}](\omega)\) in Equation 4.10 equal to some arbitrary value if \(\omega\) is an element of any such atom. Because this then amounts to a change on a null event only, the resulting expression is still a version of the conditional expectation.

Remark 4.10. Now that we’ve seen the definition Definition 4.9 above, let’s zoom in a little bit more on that “versions” issue, as I can imagine that it seems like a dirty plate in your kitchen sink that you’ve put a little bit too much washing up liquid on: very slippery and hard to get a firm and solid grip of!

Fix some \((\Omega,\mathcal{F},\P)\), \(X\) and \(\mathcal{G}\) as in Definition 4.9. What we’ve done in that definition, because we had no better option, is that we’ve defined a whole family of random variables that are all equally valid choices for the quantity \(\E[X \, | \, \mathcal{G}]\) (because each of them satisfies conditions i & ii in Definition 4.9). Each such random variable is called a version of \(\E[X \, | \, \mathcal{G}]\), and we do have the somewhat redeeming property that if the random variables \(Z\) and \(\widehat{Z}\) are both versions of \(\E[X \, | \, \mathcal{G}]\), then at least \(Z=\widehat{Z}\) a.s. i.e. \(\{Z=\widehat{Z}\}\) is an almost sure event (cf. Subsection 2.3.1) i.e. \(\P(Z=\widehat{Z})=1\) (cf. Definition 1.55).

When we talk about/do comps with \(\E[X \, | \, \mathcal{G}]\), unless we do explicitly make a choice for a specific version (which we hardly ever (can) do, only in the situation that \(\mathcal{G}\) is finite do we have the default choice Equation 4.10), we just understand that we are working with any of these versions, and we just (design the talk/comp so that we) don’t need to care which version we’re using exactly. If we want to be explicit about this, then we use a phrasing like “Let \(Z\) be a version of \(\E[X \, | \, \mathcal{G}]\), then \(Z\) [blah blah]”.

This does mean that any (in)equality between \(\E[X \, | \, \mathcal{G}]\) and any other random variable can only ever be in “almost sure mode”, never in “pointwise mode” (cf. Subsection 2.3.1). For example, if \(U\) is another random variable on this space, then even if some version of \(\E[X \, | \, \mathcal{G}]\) is pointwise equal to \(U\), then a different version generally won’t be pointwise equal to \(U\). When we write \[\E[X \, | \, \mathcal{G}]=U \quad \text{a.s.} \tag{4.11}\] then we read this as: “any version of \(\E[X \, | \, \mathcal{G}]\) is equal to \(U\) almost surely”. Note that this is equivalent to the seemingly weaker statement “some version of \(\E[X \, | \, \mathcal{G}]\) is equal to \(U\) almost surely”. Indeed if the second statement holds for the version (random variable) \(Z\) say, and \(\widehat{Z}\) is another version (random variable), then this translates to \(Z=U\) on almost sure event \(A\) and \(\widehat{Z}=Z\) on almost sure event \(B\), so that \(\widehat{Z}=U\) on \(A \cap B\) which is also an almost sure event (cf. Exercise 1.12).

Don’t worry too much about this though — as you’ll get more experienced you’ll start to feel ever more comfortable working by default in the Probablistic pirate speak that is “almost sure mode” rather than “pointwise mode”, and generally also in “almost sure mode” things work as you’d intuitively expect.

Finally, it’s worth highlighting that this is a situation where the selective blindness of \(\E\) (i.e. that it can’t see any difference between random variables that are almost surely equal, recall from Theorem 3.24) actually comes in handy! For instance, consider the expectation of \(\E[X \, | \, \mathcal{G}]\) i.e. \[\E \big[ \E[X \, | \, \mathcal{G}] \big]. \tag{4.12}\] Given what we discussed above, we should observe that we take here the expectation of some/any version of \(\E[X \, | \, \mathcal{G}]\) rather than of a single random variable which is potentially ambiguous. However since any two versions are almost surely equal, each version has the same expectation (cf. Equation 3.44) and hence Equation 4.12 is actually a well defined, single value!

Remark 4.11. [⛔] In addition to (or instead of) the intuition in Definition 4.4, there is another appealing way to look at/think about the conditional expectation \(\E[X \, | \, \mathcal{G}]\) as defined in Definition 4.9 above on the probability space \((\Omega,\mathcal{F},\P)\).

To explore this a bit, for any \(\sigma\)-algebra \(\mathcal{H}\) on \(\Omega\) let \(\mathbf{C}_\mathcal{H}\) be the collection of all \(\mathcal{H}\)-measurable functions \(\Omega \to \R\). So, for example, the collection \(\mathbf{C}_\mathcal{F}\) contains exactly all random variables on \((\Omega,\mathcal{F},\P)\).

Further, if \(\mathcal{H}_1 \subseteq \mathcal{H}_2\) are two \(\sigma\)-algebras on \(\Omega\) then \(\mathbf{C}_{\mathcal{H}_1} \subseteq \mathbf{C}_{\mathcal{H}_2}\), cf. Exercise 2.2. In particular, a bit loosely speaking, the larger we make the \(\sigma\)-algebra, the “more complicated” the mappings in the corresponding \(\mathbf{C}\) can be.

For example (cf. Exercise 2.3):

  • if \(\mathcal{H}=\{\emptyset,\Omega\}\), then \(\mathbf{C}_{\mathcal{H}}\) consists of all constant functions.
  • if we fix some \(A \subseteq \Omega\) and set \(\mathcal{H}=\{\emptyset,A,A^c,\Omega\}\), then \(\mathbf{C}_{\mathcal{H}}\) consists of all functions that are constant on \(A\) and on \(A^c\). So all constant functions (same value on \(A\) and \(A^c\)) plus all functions that take two different values, one on \(A\) and one on \(A^c\).
  • if we fix some \(B \subseteq A^c\), consider the partition of \(\Omega\) consisting of the elements \(A\), \(B\), \((A \cup B)^c\) and set \(\mathcal{H}\) the \(\sigma\)-algebra generated by that partition, then \(\mathbf{C}_{\mathcal{H}}\) consists of all functions that are constant on \(A\), \(B\) and \((A \cup B)^c\), which contains the previously mentioned functions but they can also take three different values. Etc.

More generally, if \(A_1, \ldots, A_n\) is a partition of \(\Omega\) and \(B_1, \ldots, B_m\) for \(m \geq n\) is a further refined partition of \(\Omega\) in the sense that each \(B_i\) is contained in one of the \(A_1, \ldots, A_n\) then (cf. Subsection 1.5.2) \[\mathcal{H}_1:=\sigma(\{A_1, \ldots, A_n\}) \subseteq \sigma(\{B_1, \ldots, B_m\})=:\mathcal{H}_2\] and \(\mathbf{C}_{\mathcal{H}_1} \subseteq \mathbf{C}_{\mathcal{H}_2}\), the former consisting of all functions that are constant on each \(A_i\) and the latter of all functions that are constant on each \(B_j\). For example, if say \(A_1=B_1 \cup B_2\) then a function in \(\mathbf{C}_{\mathcal{H}_2}\) may take two different values on \(B_1\) and \(B_2\), hence not be constant on \(A_1\) and hence not be an element of \(\mathbf{C}_{\mathcal{H}_1}\).

Now, let \(X\) be a random variable i.e. \(X \in \mathbf{C}_{\mathcal{F}}\) and take \(\mathcal{G} \subseteq \mathcal{F}\), so that \(\mathbf{C}_{\mathcal{G}}\) consists of “less complicated” functions than \(\mathbf{C}_{\mathcal{F}}\). We can then wonder about “projecting” \(X\) on \(\mathbf{C}_{\mathcal{G}}\), that is, trying to find out which element of \(\mathbf{C}_{\mathcal{G}}\) is “most alike” \(X\). If we can find it, then this element is naturally the best approximation of \(X\) within \(\mathbf{C}_{\mathcal{G}}\).

It turns out, under some mild assumptions (square integrability and that we agree to use the \(L^2\) distance), that that “most alike” element in \(\mathbf{C}_{\mathcal{G}}\) can be found and it is nothing but… indeed, the conditional expectation \(\E[X \, | \, \mathcal{G}]\)! See Exercise 4.12 for details if you’re interested.

If you further think about it, then this is maybe also not too much of a surprise. To try to find the best approximation in \(\mathbf{C}_{\mathcal{G}}\), you would naturally do something as follows. Staying within the familiar world of finite \(\sigma\)-algebras, if \(A \in \mathcal{G}\) is an atom of \(\mathcal{G}\) so that functions in \(\mathbf{C}_{\mathcal{G}}\) must be constant on \(A\) and \(X\) is not constant on \(A\), then a natural guess of what the “best” approximation should do on \(A\) is be constantly equal to the “average value” of \(X\) over \(A\) no — and that comes quite close to what the intuition in Definition 4.4 does!

NoteExercises

You can now do Exercise 4.6–Exercise 4.8.

4.3.3 Conditional (on a sigma-algebra) probabilities [⛔]

We discussed in Section 4.2 how, in the context of conditioning on an event, you could see the definition of the conditional probability just as a consequence of the definition of conditional expecation of a random variable by plugging indicator functions into the latter. Now that we have established conditioning on \(\sigma\)-algebras for random variables, it is tempting to explore whether that principle could be applied here as well.

That is to say, on some probability space \((\Omega,\mathcal{F},\P)\) and with \(\mathcal{G}\) be a sub-\(\sigma\)-algebra of \(\mathcal{F}\), we could (and do) define for events \(A \in \mathcal{F}\) the conditional probability of \(A\) given the \(\sigma\)-algebra \(\mathcal{G}\) as \[\P(A \, | \, \mathcal{G}) := \E \left[ \mathbf{1}_A \, | \, \mathcal{G} \right]. \tag{4.13}\] Now, keep in mind that since the right hand side, as defined in Definition 4.9, is a random variable (rather than a number), and hence so is the left hand side, which stretches our understanding of what a probability means a bit. Nevertheless we could take this at face value and investigate some of its properties. First note that (using Exercise 4.6) \[\P(\emptyset \, | \, \mathcal{G})=\E \left[ \mathbf{1}_\emptyset \, | \, \mathcal{G} \right]=\E \left[ 0 \, | \, \mathcal{G} \right]=0 \quad \text{(a.s.)}\] and similarly \(\P(\Omega \, | \, \mathcal{G})=1\) (a.s.). Further there’s even countable additivity: if \(A_1, A_2, \ldots \in \mathcal{F}\) are mutually disjoint events, then we have a.s. \[\begin{aligned} \P \left( \bigcup_{i=1}^\infty A_i \right) &= \E \left[ \left. \mathbf{1}_{\bigcup_{i=1}^\infty A_i} \, \right| \, \mathcal{G} \right] \\ &= \E \left[ \left. \sum_{i=1}^\infty \mathbf{1}_{A_i} \, \right| \, \mathcal{G} \right] \\ &= \sum_{i=1}^\infty \E \left[ \mathbf{1}_{A_i} \, | \, \mathcal{G} \right] \\ &= \sum_{i=1}^\infty \P(A_i \, | \, \mathcal{G}), \end{aligned} \] where the second equality uses a slight extension (proven in the same way) of Exercise 4.2 and the third uses the Monotone Convergence Theorem for conditional expectations which we’ll encounter in Section 4.5. So these properties seem very nicely in line with how we need a probability measure to behave (cf. Definition 1.50)!

However, there are obvious problems with trying to see this as a probability measure as well: these “a.s.”’s i.e. “almost surely”’s everywhere. For starters, since the right hand side in Equation 4.13 is not pointwise uniquely defined, neither is the left hand side. So we can’t really talk about this object as a mapping \(A \mapsto \P(A \, | \, \mathcal{G})\) withour further ado, because any mapping should assign a single, well defined value (whatever object it may be) to all of its arguments.

What we effectively need to resolve this problem, is a process to identify for each event \(A\) the version of the conditional expectation \(\E [ \mathbf{1}_A \, | \, \mathcal{G} ]\) that we want to use, in a consistent way throughout the above. That is, a mapping \(\mathbf{P}: \Omega \times \mathcal{F} \to [0,1]\) so that

  • for any event \(A \in \mathcal{F}\), the random variable \(Y\) given by \(Y(\omega)=\mathbf{P}(\omega,A)\) is a version of \(\E [ \mathbf{1}_A \, | \, \mathcal{G} ]\), and
  • there exists an almost sure event \(\Omega_0 \in \mathcal{F}\) so that for every \(\omega \in \Omega_0\) fixed, the mapping \(A \mapsto \mathbf{P}(\omega,A)\) for \(A \in \mathcal{F}\) is a probability measure on \((\Omega,\mathcal{F})\) (in the usual sense of Definition 1.50).

If such a mapping \(\mathbf{P}\) exists, then we call it a regular conditional probability given the \(\sigma\)-algebra \(\mathcal{G}\) and we can use for \(A \in \mathcal{F}\) (pointwise) \[\P(A \, | \, \mathcal{G})(\omega)=\mathbf{P}(\omega,A),\] i.e. this is our particular choice from all versions of \(\E [ \mathbf{1}_A \, | \, \mathcal{G} ]\). It’s taking things a bit too far to say a lot more about this, let’s conclude with saying that such regularity exists on “most” probability spaces (especially the ones we tend to naturally use) but not on every probability space. If you’re interested in more details, see e.g. Section 9.9 in Williams (1991) and Chapter 6 in Kallenberg (1997).

4.4 Conditioning on a random variable

Now we’ve cleared conditioning on events in Section 4.2 and on \(\sigma\)-algebras in Section 4.3, we have only one variation left that we brought up in Section 4.1: conditioning on a random variable! Luckily we can deal with this one nice and quick. :).

The setting is two random variables, say \(X\) and \(Y\), on some probability space \((\Omega,\mathcal{F},\P)\). You’ll very likely already be quite familiar with the conditional expectation of \(X\) given \(Y\) i.e. \(\E[X \, | \, Y]\) from earlier Probability courses. However most likely the approach there will have been by focussing on discrete and continuous randon variables separately, and then in either case approach this via conditional cdf’s or pmf’s/pdf’s. And that’s very good of course, except that there is something a bit unsatisfactory about having to use different approaches for different types of random variables, as well as that this doesn’t cover “other” random variables (cf. Subsection 2.4.4). Indeed, very similar to how the situation with expectations of random variables was before we embarked on the unifying approach via Lebesgue integrals in Chapter 3!

And the parallel doesn’t end there: also on this topic, a reward for our abstract, general setup of the foundations in previous chapters is that we are again able to write down one single expression for \(\E[X \, | \, Y]\) that unites the previous different approaches as well as covers the “other” gap. :). And quite easily even!

For this, let’s go back to the intuition from Definition 4.4, where we wrote one single story covering conditioning on \(\sigma\)-algebras and on random variables in one go. Indeed, if we look at the information that we get provided in Step 2 of that story, then in the case that we condition on a random variable \(Y\) that info is the value \(Y(\omega)\). But hang on, didn’t we establish in Proposition 2.18 how to “exchange” between the info provided by a random variable and by a \(\sigma\)-algebra??

Well indeed! Recall the \(\sigma\)-algebra generated by \(Y\), denoted by \(\sigma(Y)\), from Definition 2.13 and Proposition 2.9: \(\sigma(Y)\) consists exactly of inverse images/events \(\{Y \in B\}\) for all Borel sets \(B\). If we know the value \(Y(\omega) \in \R\), then we know also exactly which of these events happen (indeed exactly the ones for which \(Y(\omega) \in B\), recall from Figure 2.5 if you’re not clear on the structure anymore), while vice versa if we know which events in \(\sigma(Y)\) happen then we can simply look in particular at all the inverse/images \(\{Y=y\} \in \sigma(Y)\) for \(y \in \R\), it must be the case that exactly one of these happens and the one that does tells us exactly what \(Y(\omega)\) is!

So, given that “knowing the value \(Y(\omega\))” and “knowing which events in \(\sigma(Y)\) happen” are exchangeable pieces of information, and we have just extensively discussed how conditioning on a \(\sigma\)-algebra works, we may just as well go down this route:

Definition 4.12 (Conditioning on a random variable) On a probability space \((\Omega,\mathcal{F},\P)\) (cf. Definition 1.50), let \(X, Y\) be random variables where \(X\) is integrable (cf. Definition 2.13 & Definition 3.22). Recall that we denote by \(\sigma(Y)\) the \(\sigma\)-algebra generated by \(Y\) (cf. Definition 2.13 and Proposition 2.9).

Then we define the conditional expectation of \(X\) given the random variable \(Y\), denoted \(\E[X \, | \, Y]\), as \[\E[X \, | \, Y]:=\E[X \, | \, \sigma(Y)],\] where \(\E[X \, | \, \sigma(Y)]\) is defined in Definition 4.9.

Some notes:

  • Recall from Definition 4.9 in particular that \(\E[X \, | \, \sigma(Y)]\) is a (family of) random variable(s) (rather than a number), and hence so is \(\E[X \, | \, Y]\)! Further this definition of course also means that \(\E[X \, | \, Y]\) inherits everything else we have discussed in Definition 4.9, such as that it is not pointwise uniquely defined but only in an almost sure sense.
  • Recall that Definition 4.9 requires that the \(\sigma\)-algebra we’re conditioning on, so here \(\sigma(Y)\), is a sub-\(\sigma\)-algebra of \(\mathcal{F}\). Note that that is automatically satisfied: because \(Y\) is a random variable on \((\Omega,\mathcal{F},\P)\) it is by def \(\mathcal{F}\)-measurable, and since \(\sigma(Y)\) is by def the smallest \(\sigma\)-algebra that makes \(Y\) measurable it follows that \(\sigma(Y) \subseteq \mathcal{F}\) (cf. Proposition 2.9).

Again very similar to the journey we undertook in Chapter 3: the downside of such a general, more abstract definition though is that it’s now not very clear anymore how it actually relates back to the old formulas for specific cases of discrete and continuous random variables that we got used to doing our computations with! The good news is that that is easily remedied:

Proposition 4.13 (Conditioning on a random variable: backwards compatibility) Take again the setting of Definition 4.12. Then there exists a Borel measurable function \(\psi: \R \to \R\) so that \[\E[X \, | \, Y]=\psi(Y) \quad \text{a.s.} \tag{4.14}\] If \(Y\) has finite range, say \(R_Y \subseteq \R\), with \(\P(Y=y)>0\) for all \(y \in R_Y\), then \(\psi\) can defined as \[\psi(y)=\E[X \, | \, Y=y] \quad \text{for all } y \in R_Y. \tag{4.15}\]

Some notes:

  • Observe that we add the qualifier “a.s.” i.e. “almost surely” (“almost sure mode”, recall from Subsection 2.3.1) to Equation 4.14 because we have to. Recall the discussion in Remark 4.10.
  • Observe that in Equation 4.15 we’re conditining on an event, namely the inverse image \(\{Y=y\}\), as defined in Definition 4.5. You’ll recall from your earlier Probablity courses that Equation 4.15 can be extended to a much larger class of random variables \(Y\), with some due care where needed. For instance, if \(Y\) is a continuous random variable then inverse images \(\{Y=y\}\) are null events (cf. Exercise 2.10) and hence Equation 4.15 is in principle not well defined as in Equation 4.2 we’d be dividing by zero. As this is all stuff you’ll have seen before (and not very important in this course), we won’t spend time on it. However see e.g. Sections 3.7 & 4.6 in Grimmett and Stirzaker (1992) for a review if you’d like.

Proof. Observe that since we defined \(\E[X \, | \, Y]:=\E[X \, | \, \sigma(Y)]\), it follows from Definition 4.9 that (any version of) \(\E[X \, | \, Y]\) is by construction \(\sigma(Y)\)-measurable. The existence of \(\psi\) then follows immediately from the the Doob-Dynkin Lemma, cf. Proposition 2.28.

Further, for the specified random variable \(Y\) and writing its range as \(R_Y=\{y_1,\ldots,y_n\}\), \(\sigma(Y)\) is nice and simple: it is a finite \(\sigma\)-algebra whose atoms are the inverse images/events \(\{Y=y_1\}\), \(\ldots\), \(\{Y=y_n\}\) (cf. Exercise 2.3). Hence we get from Definition 4.9 that a version of \(\E[X \, | \, Y]\) is the random variable \(Z\) given by \[Z(\omega)=\begin{cases} \E[X \, | \, Y=y_1] & \text{if } Y(\omega)=y_1 \\ \E[X \, | \, Y=y_2] & \text{if } Y(\omega)=y_2 \\ \qquad \vdots & \qquad \vdots \\ \E[X \, | \, Y=y_n] & \text{if } Y(\omega)=y_n \end{cases} \] which is indeed equal to \(\psi(Y)\) with \(\psi\) given by Equation 4.15.

4.5 Properties of conditional expectations (on sigma-algebras)

Of course, for doing useful stuff with conditioning (on a \(\sigma\)-algebra), only having the def Definition 4.9 is a bit bare bones, so the next and final stop for this chapter is to discuss some properties. Just to make this section not massively explode, we’ll limit ourselves to the most prominent properties and we’ll skip some of the proofs. See e.g. Section 9.7 in Williams (1991) for further details & proofs if you’re interested!

We’ll break the properties up in two categories. For the first one, we’ll briefly discuss in Section 4.6 how a conditional expectation (on a \(\sigma\)-algebra) can also be linked to a “regular” expectation on a different probability space. That perspective implies that conditional expectations inherit many properties that “regular” expectations also have (cf. Theorem 3.24, Theorem 3.25, Theorem 3.27 in Chapter 3), properly reformulated. And these properties are of course essentially properties of Lebesgue integrals, which ultimately stem from the fundamental integration properties outlined in Definition 3.1!

Theorem 4.14 (Properties of conditional expectations part 1: integral like ones) Let \((\Omega,\mathcal{F},\P)\) be a probability space on which integrable random variables \(X, X_1, X_2, \ldots\) live, and let \(\mathcal{G}\) be a sub-\(\sigma\)-algebra of \(\mathcal{F}\). Recall the definition of conditional expectation from Definition 4.9. Then we have the following:

  1. Linearity: for any \(\alpha, \beta \in \R\), \[\E[\alpha X_1 + \beta X_2 \, | \, \mathcal{G}]=\alpha \E[X_1 \, | \, \mathcal{G}]+\beta \E[X_2 \, | \, \mathcal{G}] \quad \text{a.s.}\]
  2. Non-negativity: if \(X \geq 0\) a.s., then \(\E[X \, | \, \mathcal{G}] \geq 0\) a.s.
  3. Almost sure equivalence: \(X_1=X_2\) a.s. if and only if \(\E[\lvert X_2-X_1 \rvert \, | \, \mathcal{G}] = 0\) a.s.
  4. Jensen’s inequality: if \(f: \R \to \R\) is convex and \(f(X)\) is integrable, then \[f \big( \E[X \, | \, \mathcal{G}] \big) \leq \E[f(X) \, | \, \mathcal{G}] \quad \text{a.s.}\]
  5. Monotone convergence (MCT): if the conditions of the MCT (cf. Theorem 3.25) hold and the limit \(X\) is integrable, then \[\lim_{n \to \infty} \E[X_n \, | \, \mathcal{G}] = \E[X \, | \, \mathcal{G}] \quad \text{a.s.}\]
  6. Dominated convergence (DCT): if the conditions of the DCT (cf. Theorem 3.27) hold then \[\lim_{n \to \infty} \E[X_n \, | \, \mathcal{G}] = \E[X \, | \, \mathcal{G}] \quad \text{a.s.}\]

Some notes:

  • Recall the discussion from Remark 4.10 about working with (versions of) conditional expectations. For instance, linearity (property i) is to be read as follows: if \(Z_1\), \(Z_2\) and \(Z_3\) are versions of the conditional expectations \(\E[\alpha X_1 + \beta X_2 \, | \, \mathcal{G}]\), \(\E[X_1 \, | \, \mathcal{G}]\) and \(\E[X_2 \, | \, \mathcal{G}]\) resp., then it holds that \[Z_1=\alpha Z_2+\beta Z_3 \quad \text{a.s.}\]
  • Compare and contrast the properties listed here with those in Theorem 3.24, Theorem 3.25 and Theorem 3.27 in Chapter 3!
  • As in Theorem 3.24, cf. Equation 3.43 & Equation 3.44, it follows from linearity and non-negativity that \[\text{if } X_1 \leq X_2 \text{ a.s., then } \E[X_1 \, | \, \mathcal{G}] \leq \E[X_2 \, | \, \mathcal{G}] \text{ a.s.}\] and \[\text{if } X_1=X_2 \text{ a.s., then } \E[X_1 \, | \, \mathcal{G}] = \E[X_2 \, | \, \mathcal{G}] \text{ a.s.}\]

Proof. We’ll only do the first three of them, see e.g. Section 9.7 in Williams (1991) for the others if you’re interested.

For part i, this is readily checked from Definition 4.9, in particular by using linearity of \(\E\) (cf. Theorem 3.24 i) in condition ii of Definition 4.9.

For part ii, this is a property you’d intuitively expect of course, ignoring the “a.s.” for a moment, looking back at our intuition from Definition 4.4: if we’re trying to predict the value of a non-negative random variable \(X\) given some/whatever information, then it would be silly to answer with a negative value no?

Let \(Z\) be any version of \(\E[X \, | \, \mathcal{G}]\). We need to show that \(Z \geq 0\) a.s. (then any other version also has that property, by the same argument as below Equation 4.11 in Remark 4.10). We know from Definition 4.9 (only) that \(Z\) is \(\mathcal{G}\)-measurable and that \[\E[\mathbf{1}_A Z]=\E[\mathbf{1}_A X] \quad \text{for all } A \in \mathcal{G}. \tag{4.16}\] So the essential argument will need to come from Equation 4.16, which is the only bridge we have between \(X\) and \(Z\) and hence the only way to transfer assumptions about \(X\) to conclusions about \(Z\). The only freedom we have in Equation 4.16 is to make choices for the event \(A \in \mathcal{G}\). Keep in mind for this: \(Z\) is by construction \(\mathcal{G}\)-measurable while \(X\) is only \(\mathcal{F}\)-measurable and not (necessarily) \(\mathcal{G}\)-measurable, so any inverse image \(\{Z \in B\}\) for a Borel set \(B\) is an element of \(\mathcal{G}\) while \(\{X \in B\}\) is not (necessarily) an element of \(\mathcal{G}\) (by def of measurability, recall from Definition 2.6). That is, inverse images/events \(\{Z \in B\}\) are valid choices for \(A\) in Equation 4.16, while inverse images/events \(\{X \in B\}\) are not!

With this in mind, consider the inverse image/event \(\{Z<0\}\). That’s the choice for \(A\) we’re making in Equation 4.16 — the rest of the proof is “just” algebra and making optimal use of the properties of \(\E\) from Theorem 3.24!

Observe that since by assumption \(X \geq 0\) a.s., also \(\mathbf{1}_{\{Z<0\}} X \geq 0\) a.s. (trivially: if \(\Omega_0\) is the almost sure event on which \(X \geq 0\), also \(\mathbf{1}_{\{Z<0\}} X \geq 0\) on \(\Omega_0\)). Hence by the non-negativity property of \(\E\) (cf. Theorem 3.24 ii), \(\E[\mathbf{1}_{\{Z<0\}} X] \geq 0\), and then we get from Equation 4.16 that also \[\E \left[ \mathbf{1}_{\{Z<0\}} Z \right] \geq 0. \tag{4.17}\]

Now consider the random variable \(\lvert \mathbf{1}_{\{Z<0\}} Z \rvert\). As it is non-negative, by the non-negativity property of \(\E\) (cf. Theorem 3.24 ii) \[\E \left[ \lvert \mathbf{1}_{\{Z<0\}} Z \rvert \right] \geq 0. \tag{4.18}\] On the other hand, since \(\mathbf{1}_{\{Z<0\}} Z \leq 0\), we have that \(\lvert \mathbf{1}_{\{Z<0\}} Z \rvert=-\mathbf{1}_{\{Z<0\}} Z\) and hence \[\E \left[ \lvert \mathbf{1}_{\{Z<0\}} Z \rvert \right]=\E \left[ -\mathbf{1}_{\{Z<0\}} Z \right]=-\E \left[ \mathbf{1}_{\{Z<0\}} Z \right] \leq 0, \tag{4.19}\] by linearity (cf. Theorem 3.24 i) and Equation 4.17.

If we now combine Equation 4.18 & Equation 4.19 we arrive at \[\E \left[ \lvert \mathbf{1}_{\{Z<0\}} Z \rvert \right]=0\] and hence by almost sure equivalence (cf. Theorem 3.24 iii) \[\lvert \mathbf{1}_{\{Z<0\}} Z \rvert=0 \quad \text{a.s.} \tag{4.20}\] Finally then, take some \(\omega \in \Omega\) so that \(\lvert \mathbf{1}_{\{Z<0\}}(\omega) Z(\omega) \rvert=0\). Then either \(\mathbf{1}_{\{Z<0\}}(\omega)=0\) i.e. \(Z(\omega) \geq 0\) or \(Z(\omega)=0\). So in either case \(Z(\omega) \geq 0\). Hence \[\big\{ \lvert \mathbf{1}_{\{Z<0\}} Z \rvert=0 \big\} \subseteq \{Z \geq 0\},\] and since the left hand side is an almost sure event (cf. Equation 4.20), that’s also true for the right hand side (cf. Theorem 1.51 i).

For part iii, let’s for notational simplicity equivalently reformulate as \[X=0 \text{ a.s. if and only if } \E[\lvert X \rvert \, | \, \mathcal{G}] = 0 \text{ a.s.}\]

Note that the statement \(\E[\lvert X \rvert \, | \, \mathcal{G}] = 0\) a.s. means that the constant random variable \(Z:=0\) is a version of \(\E[\lvert X \rvert \, | \, \mathcal{G}]\) i.e., cf. Definition 4.9, that it is integrable (trivial), that it is \(\mathcal{G}\)-measurable (also trivial, cf. Example 2.8 e.g.) and that \[\E[\mathbf{1}_A \lvert X \rvert]=\E[\mathbf{1}_A Z]=\E[0]=0 \quad \text{for all } A \in \mathcal{G}.\]

So what we’re actually looking to prove is that \[X=0 \text{ a.s.} \iff \E[\mathbf{1}_A \lvert X \rvert]=0 \text{ for all } A \in \mathcal{G}.\]

First assume that \(X=0\) a.s. Pick any \(A \in \mathcal{G}\). Then clearly also \(\mathbf{1}_A \lvert X \rvert=0\) a.s. (as always, plug in an \(\omega \in \Omega\) and double check if you’re not happy) and hence \(\E[\mathbf{1}_A \lvert X \rvert]=0\) by Equation 3.44 e.g.

Now assume that \[\E[\mathbf{1}_A \lvert X \rvert]=0 \text{ for all } A \in \mathcal{G}.\] The choice \(A=\Omega\) (which is an element of any \(\sigma\)-algebra, recall from Definition 1.33 i & ii) yields \(\E[\lvert X \rvert]=0\), and from almost sure equivalence for \(\E\) (cf. Theorem 3.24 iii) it follows that \(X=0\) a.s.

Now let’s move on to the second set of properties, which dig more into the internals of conditional expectations rather than viewing them as part of a larger “integral like” family of operators:

Theorem 4.15 (Properties of conditional expectations part 2: concept specific ones) Let \((\Omega,\mathcal{F},\P)\) be a probability space on which an integrable random variable \(X\) lives, and let \(\mathcal{G}\) be a sub-\(\sigma\)-algebra of \(\mathcal{F}\). Recall the definition of conditional expectation from Definition 4.9. Then we have the following.

  1. Law of Total Expectation: \[\E \big[ \E[X \, | \, \mathcal{G}] \big] = \E[X].\]

  2. If \(X\) is \(\mathcal{G}\)-measurable, then \[\E[X \, | \, \mathcal{G}]=X \quad \text{a.s.}\]

  3. We call \(\mathcal{G}\) trivial if \(\P(A) \in \{0,1\}\) for all \(A \in \mathcal{G}\). If that is the case, then \[\E[X \, | \, \mathcal{G}]=\E[X] \quad \text{a.s.}\]

  4. Tower property (think: you can flip the order of conditioning, and only the smallest \(\sigma\)-algebra actually matters): if \(\mathcal{H}\) be a sub-\(\sigma\)-algebra of \(\mathcal{G}\) then \[\E \big[ \E[X \, | \, \mathcal{G}] \, \big| \, \mathcal{H} \big]=\E \big[ \E[X \, | \, \mathcal{H}] \, \big| \, \mathcal{G} \big]=\E[X \, | \, \mathcal{H}] \quad \text{a.s.}.\]

  5. Taking out “known” factors: if \(Y\) is a \(\mathcal{G}\)-measurable and integrable random variable, and if \(YX\) is also integrable, then \[\E[YX \, | \, \mathcal{G}]=Y\E[X \, | \, \mathcal{G}] \quad \text{a.s.}.\] This property is also true if \(Y\) is \(\mathcal{G}\)-measurable and bounded below by a constant.

  6. Independence (part 1): if \(X\) is independent of \(\mathcal{G}\) (i.e. if \(\sigma(X)\) and \(\mathcal{G}\) are independent, cf. Section 2.6) then \[\E[X \, | \, \mathcal{G}]=\E[X] \quad \text{a.s.}.\]

  7. Independence (part 2): if

    • \(X\) is independent of \(\mathcal{G}\) (cf. Section 2.6),
    • \(Y\) a \(\mathcal{G}\)-measurable random variable, and
    • \(\Phi: \R^2 \to \R\) a Borel measurable function so that \(\Phi(X,Y)\) is integrable,

    then \[\E[\Phi(X,Y) \, | \, \mathcal{G}]=\varphi(Y) \quad \text{a.s.},\] where \(\varphi(y)=\E[\Phi(X,y)]\) for all \(y\) in the range of \(Y\).

Some notes:

  • Again, recall the discussion from Remark 4.10 about working with (versions of) conditional expectations. For the Law of Total Expectation (property i) for instance, in the left hand side we’re taking the expectation of any version of \(\E[X \, | \, \mathcal{G}]\), and this is no problem because every version has the same expectation.

  • For property iii, note that your easiest example of a “trivial” \(\sigma\)-algebra is \(\{\emptyset,\Omega\}\), since \(\P(\emptyset)=0\) and \(\P(\Omega)=1\) (recall from Definition 1.50).

  • Note that properties ii and iii beautifully confirm what happens in the “extreme cases” as we had already anticipated on an intuitive basis, cf. Definition 4.4! Property vi is another manifestation of an extreme case: if \(\mathcal{G}\) is independent of \(X\), then being told which events in \(\mathcal{G}\) happen are simply completely useful for prediction the value that \(X\) takes, and hence we’re effectively in the same situation as in property ii.

  • For property vi, a nice application is with \(\mathcal{G}=\sigma(Y)\) for a random variable \(Y\) independent of \(X\), then it reads as (cf. also Section 4.4) the well known \(\E[X \, | \, Y]=\E[X]\).

  • For property vii, this is an extremely useful result for computation in many practical applications that extends property vi, maybe typically with \(\mathcal{G}=\sigma(Y)\) and \(X,Y\) independent random variables: to compute the conditional expectation of some potentially complicated expression \(\Phi(X,Y)\) all you need is to determine \(\varphi\) i.e. compute a (normal) expectation in which \(Y\) is kept constant.

    Further, using property i, as a corrolary we get that \[\E[\Phi(X,Y)]=\E[\varphi(Y)],\] which tells you that computing the expectation of some (complicated) expression involving two independent random variables can be done by twice computing an expectation that involves only one random variable (first determine \(\varphi\), then \(\E[\varphi(Y)]\)).

Proof. We’ll do properties i & iv here, leave ii, iii and vi for Exercise 4.9, and if you’re interested in the remaining proofs then see Section 9.7 in Williams (1991) e.g.

For part i, let \(Z\) be a version of \(\E[X \, | \, \mathcal{G}]\). Recall from Remark 4.10 that any version has the same expectation. We know from Definition 4.9 that \(\E[\mathbf{1}_A Z]=\E[\mathbf{1}_A X]\) for all \(A \in \mathcal{G}\). Now simply take \(A=\Omega\) (which is an element of any \(\sigma\)-algebra, recall from Definition 1.33 i & ii) to immediately get \(\E[Z]=\E[X]\).

For part iv, let’s first establish that \[\E \big[ \E[X \, | \, \mathcal{H}] \, \big| \, \mathcal{G} \big]=\E[X \, | \, \mathcal{H}] \quad \text{a.s.}. \tag{4.21}\] Note that we should read this statement as follows: if \(Z_1\) and \(Z_2\) are any versions of \(\E[X \, | \, \mathcal{H}]\), then we have that \[\E [ Z_1 \, | \, \mathcal{G} ]=Z_2 \quad \text{a.s.}.\] You’d be forgiven for thinking that we shoud be using the same version of \(\E[X \, | \, \mathcal{H}]\) in Equation 4.21 — that’s admittedly not very clear from the formulation. The reason it’s left vague is, indeed, that it doesn’t matter: it’s true in the more liberal interpretation that we allow for two different versions!

To see this, just note that by construction (cf. Definition 4.9) \(Z_1\) is \(\mathcal{H}\)-measurable. Since \(\mathcal{H} \subseteq \mathcal{G}\), it is also \(\mathcal{G}\)-measurable (cf. Exercise 2.2). So by property ii of this theorem, \[\E [ Z_1 \, | \, \mathcal{G} ]=Z_1 \quad \text{a.s.},\] and since \(Z_1=Z_2\) a.s. (as they are both versions of the same conditional expectation) we also get that \[\E [ Z_1 \, | \, \mathcal{G} ]=Z_2 \quad \text{a.s.}\]

So it remains to show that \[\E \big[ \E[X \, | \, \mathcal{G}] \, \big| \, \mathcal{H} \big]=\E[X \, | \, \mathcal{H}] \quad \text{a.s.}.\] Starting at the left hand side, let \(Z\) be a version of \(\E[X \, | \, \mathcal{G}]\) and \(U\) a version of \(\E[Z \, | \, \mathcal{H}]\). Then the statement to prove is that \(U=\E[X \, | \, \mathcal{H}]\) a.s. i.e. that \(U\) is a version of \(\E[X \, | \, \mathcal{H}]\). To show this, we need to verify that \(U\) is integrable (clear, because \(X\) is by assumption and then Definition 4.9 guarantees that both \(Z\) and \(U\) are integrable), that \(U\) is \(\mathcal{H}\)-measurable (also guaranteed by Definition 4.9, as \(U\) is a version of \(\E[Z \, | \, \mathcal{H}]\)) and that \[\E[\mathbf{1}_A U]=\E[\mathbf{1}_A X] \quad \text{for all } A \in \mathcal{H}.\]

For this final one, take any \(A \in \mathcal{H}\). Note that also \(A \in \mathcal{G}\) since \(\mathcal{H} \subseteq \mathcal{G}\), and that \[\E[\mathbf{1}_A U]=\E[\mathbf{1}_A Z]=\E[\mathbf{1}_A X],\] the first because \(U\) a version of \(\E[Z \, | \, \mathcal{H}]\) and the second because \(Z\) be a version of \(\E[X \, | \, \mathcal{G}]\), using condition ii from Definition 4.9 twice.

NoteExercises

You can now do Exercise 4.9–Exercise 4.12.

4.6 A change of measure perspective [⛔]

In the final section of this chapter, let’s briefly highlight yet another (in addition to the intuitive approach from Definition 4.4 and the “projection” approach from Remark 4.11) fascinating way to look at/think about conditional expectations. We’ll use some of the stuff we discussed earlier in Subsection 3.4.6.

On a probability space \((\Omega,\mathcal{F},\P)\), let \(\mathcal{G} \subseteq \mathcal{F}\) be a sub-\(\sigma\)-algebra and let \(X\) be an integrable random variable. Recall its positive and negative parts \(X^+\) and \(X^-\) from Subsection 3.3.1: both non-negative and integrable. For any \(A \in \mathcal{G}\) (!!), define \[\Q^+(A) := \frac{\E_{\P}[\mathbf{1}_A X^+]}{\E_{\P}[X^+]} \quad \text{and} \quad \Q^-(A) := \frac{\E_{\P}[\mathbf{1}_A X^-]}{\E_{\P}[X^-]},\] where we use “\(\E_{\P}\)” to stress that we use the expectation operator that is built on top of the probability measure \(\P\) (recall from Chapter 3 that we defined expectation as a Lebesgue integral, which uses a probability measure in its construction, cf. Definition 3.10). It’s straightforward to check that \(\Q^+\) and \(\Q^-\) are both probability measures on \((\Omega,\mathcal{G})\), cf. Definition 1.50 — countable additivity is immediate from a slight extension of Exercise 4.2.

Have a close look at this. First of all, by taking \(X\) apart in positive and negative parts, we ensure that \(\Q^+(A), \Q^-(A) \geq 0\), and the role of the factors \(1/\E_{\P}[X^+]\) and \(1/\E_{\P}[X^-]\) is to ensure that \(\Q^+(A), \Q^-(A) \leq 1\). So these are mainly technical choices to make sure that we stay within the characteristics that probability measures should have. What \(\Q^+\) resp. \(\Q^-\) fundamentally does is to assign large probabilities to these events \(A \in \mathcal{G}\) where \(X^+\) resp. \(X^-\) take large values (relative to their average value over the whole of \(\Omega\)).

So we have now constructed two new probability measures, however both on \(\mathcal{G}\), not on the larger \(\mathcal{F}\). The information they essentially bring with them is what the “average values” (measured under \(\P\)) of \(X^+\) and \(X^-\) are on each of the events \(A \in \mathcal{G}\). It would make sense, also from the prespective of our interpretation in Definition 4.4, that for the conditional expectation of \(X\) on \(\mathcal{G}\) these “average values” are all that matter, so that we should be able to forget about \(X\) and be able to construct that conditional expectation on the basis of \(\Q^+\) and \(\Q^-\) only no?

For the sequel, consider everything on the measure space \((\Omega,\mathcal{G})\), where we have now three probability measures (with hence also each their own expectation operators): \(\Q^+\), \(\Q^-\) and \(\P\) (orginally defined on \(\mathcal{F}\), but also a probability measure on \(\mathcal{G}\)). It is easy to check that \(\Q^+ \ll \P\) and \(\Q^- \ll \P\) (recall from Subsection 3.4.6). Hence by the Radon-Nikodym theorem (also seen in Subsection 3.4.6, though this needs the slightly more general formulation), \(\mathcal{G}\)-measurable Radon-Nikodym derivatives/densities \(H^+\) and \(H^-\) exist so that for any \(\mathcal{G}\)-measurable integrable random variable \(G\) it holds that \[\E_{\Q^+}[G]=\E_{\P}[H^+ G] \quad \text{and} \quad \E_{\Q^-}[G]=\E_{\P}[H^- G].\]

In particular, define the random variable \[Z := \E_{\P}[X^+] H^+ - \E_{\P}[X^-] H^-.\] Since \(Z\) is a linear combination of the \(\mathcal{G}\)-measurable \(H^+\) and \(H^-\), it is \(\mathcal{G}\)-measurable itself. Further for any \(A \in \mathcal{G}\) \[\begin{aligned} \E_{\P}[\mathbf{1}_A Z] &= \E_{\P}[X^+] \E_{\P}[\mathbf{1}_A H^+] - \E_{\P}[X^-] \E_{\P}[\mathbf{1}_A H^-] \\ &= \E_{\P}[X^+] \Q^+(A) - \E_{\P}[X^-] \Q^-(A) \\ &= \E_{\P}[X^+] \frac{\E_{\P}[\mathbf{1}_A X^+]}{\E_{\P}[X^+]} - \E_{\P}[X^-] \frac{\E_{\P}[\mathbf{1}_A X^-]}{\E_{\P}[X^-]} \\ &= \E_{\P}[\mathbf{1}_A X]. \end{aligned} \] But this shows, according to Definition 4.9, that \(Z\) is actually (a version of) \(\E[X \, | \, \mathcal{G}]\)! This is hence also a proof of existence of \(\E[X \, | \, \mathcal{G}]\) — though of course the hard work is still left to (proving the) Radon-Nikodym theorem.

As a final comment: if \(\mathcal{G}\) is a finite \(\sigma\)-algebra, then it is a nice little exercise to track how the above construction compares with (our motivation for) Equation 4.10!

4.7 Some exercises

NoteAbout the exercises

Each exercise has a (rough) indication of its difficulty, as follows:

* easier: can be solved by (almost) only using relevant definitions/results,
** medium: in addition to relevant definitions/results, needs a limited amount of work/creativity,
*** harder: in addition to relevant definitions/results, needs a larger amount of work/serious creativity,
⛔ non-examinable: either very challenging or too much out of scope — these exercises are intended for those of you who relish a bit extra!

The exam consists of mostly ** and *** level questions, with some * thrown in there for good measure.

A bit of preaching: it is an incredibly important part of the study process to try and work on the exercises as much as possible before the tutorials/without looking at the solutions, both for your understanding and to secure yourself a juicy exam mark! You will get stuck at times, that’s the name of the game for all of us — as the famous mathematician Paul Erdős used to say: a problem worthy of attack, proves its worth by fighting back. :). Use the hints given with many questions/talk to classmates/ask me and try again!

Full & detailed model solutions for the exercises will become available, below the exercises on this page, immediately after our tutorial.

Exercise 4.1 [*/**] Let \(X\) be a random variable on a probability space \((\Omega,\mathcal{F},\P)\), and assume that \(\E[X^2]<\infty\).

  1. Show that \(X\) is integrable i.e. that \(\E[ \lvert X \rvert]<\infty\).
  2. Explain why part i implies that \(\E[X] \in \R\).

We now want to work towards expressing the idea from Proposition 4.1. Recall that in Subsection 2.7.3 we already discussed the idea of measuring the distance (in terms of a real number) between two random variables, say \(X\) and \(Y\), as \[\E[\phi(X-Y)] \in [0,\infty] \tag{4.22}\] where \(\phi: \R \to \R\) is a non-negative Borel measurable function which needs to satisfy some conditions to fit this role, but that nevertheless still leave many possible choices.

When discussing almost sure equivalence, in Theorem 3.24 iii, we used \(\phi(x)=\lvert x \rvert\) in which case you may want to call Equation 4.22 the \(L^1\) distance (cf. Definition 2.37). In the conditioning context, we prefer to work with the \(L^2\) distance, which is Equation 4.22 with the choice \(\phi(x)=x^2\). Beyond the scope of this course, but the \(L^2\) distance gives rise to the Lebesgue \(L^2\) space, which is a very special one among all Lebesgue \(L^r\) spaces (\(r \geq 1\)), in particular because it is the only one that is a Hilbert space which means that it has a fundamental property that we know from \(\R^n\) as well: any Cauchy sequence has a limit in the space. Though we won’t at all use this approach in this chapter, Exercise 4.12 below shows that if we stick with the \(L^2\) distance, then the expressions for conditional expectation with respect to a \(\sigma\)-algebra that we will develop in this chapter behave in an analogue way as what we see in this exercise/Proposition 4.1!

Ok, back to Proposition 4.1 now. Recall that a real number \(a \in \R\) can be interpreted as a trivial, constant random variable, and hence the \(L^2\) distance between \(X\) and \(a\) is given by \(\E[(X-a)^2]\). And to find the \(a \in \R\) closest to \(X\) in this distance metric then translates to solving the minimisation problem \[\min_{a \in \R} \E \left[ (X-a)^2 \right]. \tag{4.23}\]

Now, by working out the brackets in \(\E[(X-a)^2]\), show that:

  1. For any \(a \in \R\), \(\E[(X-a)^2]<\infty\),
  2. The minimisation problem Equation 4.23 is solved by \(a=\E[X]\).

For part i, there’s several ways forward for this one. Jensen’s inequality (cf. Theorem 3.24 iv) is always a good one to keep in mind for such inequalities, in particular since \(f(x)=x^2\) is convex as you can readily check! If that doesn’t help you all the way through, then don’t forget that you can apply Jensen’s inequality to any random variable — maybe in this case \(\lvert X \rvert\) rather than \(X\) is a nice choice?

For part ii, just appeal to Definition 3.22, in particular the three cases mentioned there!

For part iii, just work out the brackets in the expression \((X-a)^2\) and then use the linearity property of \(\E\) (cf. Theorem 3.24 i) to then appeal to parts i & ii.

For part iv, just observe that the expression you got in part iii is nothing but a classic second order polynomial in \(a\)!

For part i, there is several ways to do this, here are two of them:

  • a mild variation of Equation 3.45, using Jensen’s inequality (cf. Theorem 3.24 iv): observe that the function \(f:\R \to \R\) given by \(f(x)=x^2\) is convex since \(f''(x)=2 \geq 0\). Now apply Jensen’s inequality to the random variable \(\lvert X \rvert\): \[\big( \E[\lvert X \rvert] \big)^2 \leq \E \left[ \lvert X \rvert^2 \right]=\E \left[ X^2 \right]<\infty\] and hence also \(\E[ \lvert X \rvert]<\infty\).
  • alternatively you could use that if we define the functions \(f(x)=\lvert x \rvert\) and \(g(x)=x^2+1\), then you can readily check that \(f(x) \leq g(x)\) for all \(x \in \R\) and hence in terms of random variables, \(f(X) \leq g(X)\) (pointwise). Applying the non-negativity property (cf. Theorem 3.24 ii, in particular Equation 3.43) then yields \[\E[\lvert X \rvert] \leq \E[X^2+1],\] and by the linearity property (cf. Theorem 3.24 i) plus Exercise 3.5, \[\E[X^2+1]=\E[X^2]+\E[1]=\E[X^2]+1<\infty.\]

For part ii, recall from Definition 3.22 (see the three cases) that in general, \(\E[X]\) may not exist, or be equal to \(\pm \infty\), or be a real number. Since we have that \(\E[ \lvert X \rvert]<\infty\), we are in the first case in which it is guaranteed that \(\E[X] \in \R\).

For part iii, working out the brackets and using the linearity property (cf. Theorem 3.24 i) yields \[\begin{align*} \E[(X-a)^2] &= \E \left[ X^2 -2aX+a^2 \right] \\ &= \E \left[ X^2 \right] -2a\E[X]+a^2 \end{align*} \] and now just plug in the results from parts i & ii.

For part iv, as part iii shows, we need to find the minimiser of the function \[f(a)=\E \left[ X^2 \right] -2a\E[X]+a^2.\] Observe that this is simply a second order polynomial, and hence differentiating it or throwing the well known formula at it, you can readily check that the minimiser is \(a=\E[X]\).

Exercise 4.2 [*/**] On some probability space \((\Omega,\mathcal{F},\P)\), let \(A\) and \(B\) be two events. Show that we have the following indicator function identities (pointwise i.e. for all \(\omega \in \Omega\)):

  1. \(\mathbf{1}_A \mathbf{1}_B=\mathbf{1}_{A \cap B}\),
  2. if \(A\) and \(B\) are disjoint, then \(\mathbf{1}_A + \mathbf{1}_B=\mathbf{1}_{A \cup B}\). Why is this not true if \(A\) and \(B\) are not disjoint?

If you’re unsure how to approach this, then observe that an indicator function has only \(0\) and \(1\) as possible values (recall e.g. from Subsection 2.4.2) so just work out for which \(\omega \in \Omega\) each indicator function is either \(0\) or \(1\) and show that it matches up as the identities suggest.

If needs be, recall the definition of an indicator function from Subsection 2.4.2.

For part i, we have that \[\begin{aligned}\mathbf{1}_A(\omega) \mathbf{1}_B(\omega)=1 &\iff \mathbf{1}_A(\omega)=1 \text{ and } \mathbf{1}_B(\omega)=1 \\ &\iff \omega \in A \text{ and } \omega \in B \\ &\iff \omega \in A \cap B \\ &\iff \mathbf{1}_{A \cap B}(\omega)=1, \end{aligned} \] and since both sides are either \(0\) or \(1\) it also follows that \[\mathbf{1}_A(\omega) \mathbf{1}_B(\omega)=0 \iff \mathbf{1}_{A \cap B}(\omega)=0.\]

For part ii, similarly \[\begin{aligned}\mathbf{1}_A(\omega) + \mathbf{1}_B(\omega)=0 &\iff \mathbf{1}_A(\omega)=0 \text{ and } \mathbf{1}_B(\omega)=0 \\ &\iff \omega \not\in A \text{ and } \omega \not\in B \\ &\iff \omega \not\in A \cup B \\ &\iff \mathbf{1}_{A \cup B}(\omega)=0. \end{aligned} \] Since \(A\) and \(B\) are disjoint, \(\mathbf{1}_A + \mathbf{1}_B\) only takes the values \(0\) and \(1\) and we’re again done.

If \(A\) and \(B\) are not disjoint i.e. \(A \cap B \not= \emptyset\), then for any \(\omega \in A \cap B\) we have \[\mathbf{1}_A(\omega) + \mathbf{1}_B(\omega)=2 \not= 1=\mathbf{1}_{A \cup C}(\omega).\]

Exercise 4.3 [*/**] In Definition 4.5, it is intuitively pretty clear that if we condition on the event \(\Omega\), which always happens, that we don’t add any useful information and that hence we would expect the conditional expectation/probability just to be equal to the expectation/probability without any conditioning. Show that this holds slightly more generally, namely that if \(C\) is an almost sure event on \((\Omega,\mathcal{F},\P)\), then for any event \(A\) and random variable \(X\) (with well defined expectation) it holds that \[\P(A \, | \, C)=\P(A) \quad \text{and} \quad \E[X \, | \, C]=\E[X].\]

If we want to be a little bit cute about it, then we could convince ourselves that we actually only need to do the expectation. ;). And for the expectation, your key message is: never forget the selective blindness of \(\E\) i.e. that it doesn’t see any difference between two random variables that are equal almost surely!

Let’s do the expectation first. Looking at Equation 4.2 in Definition 4.5, since \(\P(C)=1\) (cf. Definition 1.55) we’ll need to show that \(\E[\mathbf{1}_C X]=\E[X]\). But observe that for any \(\omega \in C\), by def of the indicator function (cf. Subsection 2.4.2) \[\mathbf{1}_C(\omega) X(\omega)=1 \cdot X(\omega)=X(\omega)\] i.e. \(\mathbf{1}_C X=X\) on \(C\), and since \(C\) is an almost sure event, \(\mathbf{1}_C X=X\) a.s. (recall from Subsection 2.3.1). And then it follows from Equation 3.44 in Theorem 3.24 that \(\E[\mathbf{1}_C X]=\E[X]\).

For the probability, just use that \(\P(A)=\E[\mathbf{1}_A]\) (cf. Equation 2.21) and \(\P(A \, | \, C)=\E[\mathbf{1}_A \, | \, C]\) (as noted in Definition 4.5) to make it follow immediately from the above, or otherwise do it separately if you prefer of course, for instance by breaking \(A\) up in a part inside \(C\) and a part outside \(C\) i.e.  \[A=(A \cap C) \cup (A \cap C^c)\] and taking it from there.

Exercise 4.4 [*/**] On some probability space \((\Omega,\mathcal{F},\P)\), let \(C_1, \ldots, C_n\) be events that form a partition of \(\Omega\) (cf. Subsection 1.3.3) with \(\P(C_i)>0\) for all \(i=1,\ldots,n\). For any random variable \(X\) (with well defined expectation), prove the Law of Total Expectation: \[\E[X]=\sum_{i=1}^n \E[X \, | \, C_i] \P(C_i) \tag{4.24}\] As is not hard to see, this result remains true if the parition is countably infinite and/or if there are events with probability \(0\) present in the partition (in which case you should simply ignore such events in the right hand side of Equation 4.24).

How does it immediately follow that for any event \(A\) we have that \[\P(A)=\sum_{i=1}^n \P(A \, | \, C_i) \P(C_i)\] (which is often referred to as the Law of Total Probability)?

Of course start by plugging in the definition of the conditional expectation from Definition 4.5. If you’re not sure how to proceed from there, then get some inspiration from Exercise 4.2 ii!

For the Law of Total Expectation, first plugging in the def (cf. Definition 4.5) we see that \[\sum_{i=1}^n \E[X \, | \, C_i] \P(C_i)=\sum_{i=1}^n \E[\mathbf{1}_{C_i} X].\] Using linearity (cf. Theorem 3.24 i) we can bring the summation inside the expectation and then it remains to make the observation that for any \(\omega \in \Omega\) \[\sum_{i=1}^n \mathbf{1}_{C_i}(\omega)=1.\] For this, since \(C_1, \ldots, C_n\) is partition of \(\Omega\), any \(\omega \in \Omega\) is an element of exactly one \(C_i\), so that \(\mathbf{1}_{C_i}(\omega)=1\) and \(\mathbf{1}_{C_j}(\omega)=0\) for \(j \not= i\). See also Exercise 4.2 ii.

For the Law of Total Probability, just take Equation 4.24 and plug in \(X=\mathbf{1}_A\).

Exercise 4.5 [*/**] You live in Manchester with your pet dog called Kevin. Kevin needs to be walked in principle every day, but if it rains the whole day both you and Kevin prefer to stay inside. From experience you know that the probability that it rains the whole day is 20% for any given day.

Kevin is quite fond of chasing squirrels and regularly catches one while on a walk (he doesn’t actually hurt them!). You have kept count in the past and have found that he catches none in 10% of the walks, he catches one in 60% of the walks and he catches two in the remaining 30% of the walks.

Kevin’s all time weekly high currently stands at an impressive 12 squirrels (where a week consists of seven days). Compute the probability that Kevin improves on his record next week.

Just a cute application of the Law of Total Probability (well, as one way to do it at least) — if you’re not sure where to start, define for instance \(C_i\) as the event that Kevin gets to go for \(i\) walks next week, for \(i=0,\ldots,7\) and use that as your partition. All the probs needed are pretty straightforward to compute!

There’s several ways to approach this, of which one is to use the Law of Total Probability from Exercise 4.4 (that’s why the question is included here of course, just to see a cute application). Denoting by \(A\) the event that Kevin catches more than 12 squirrels next week, and by \(C_i\) the event that he gets to go for \(i\) walks next week, for \(i=0,\ldots,7\), these \(C_i\)’s form a partition of the outcome space (which you can formulate in any (sensible) way you want). Hence by the law of total probability \[\P(A)=\sum_{i=0}^7 \P(A \, | \, C_i) \P(C_i).\] Now, if Kevin gets to go out for six days or fewer then he can’t possibly catch more than 12 squirrels, so \(\P(A \, | \, C_i)=0\) for \(i=1,\ldots,6\). Further, conditional on \(C_7\), the number of squirrels that he will catch (assuming independence between walks) is 14 if he catches two every day i.e. with prob \(0.3^7\) and it is 13 if he catches two on six days and one on the remaining day i.e. with prob \(7 \cdot 0.3^6 \cdot 0.6\). So in conclusion \[\P(A)=\P(A \, | \, C_7) \P(C_7)=\big( 0.3^7 + 7 \cdot 0.3^6 \cdot 0.6 \big) \cdot 0.8^7 \approx 0.0007.\] So not the best odds for our poor friend…

Not getting off my blanket for that man!

Exercise 4.6 [*] On some probability space \((\Omega,\mathcal{F},\P)\), let \(X:=c\) be a constant random variable, where \(c \in \R\). Verify that

  1. for any event \(A \in \mathcal{F}\) with \(\P(A)>0\) we have that \(\E[X \, | \, A]=c\),
  2. for any sub-\(\sigma\)-algebra \(\mathcal{G} \subseteq \mathcal{F}\) we have that \(\E[X \, | \, \mathcal{G}]=c\) a.s.,

both as you’d hope/expect of course!

Both are pretty straightforward to check from their definitions Definition 4.5 & Definition 4.9! For the first one, don’t forget about Equation 2.21. For the second one, if you’re not entirely sure how to formulate your approach exactly, then generally you always do that in the same way: to show that \(\E[X \, | \, \mathcal{G}]=\ldots\) a.s. holds, we need to show that the right hand side “\(\ldots\)” is indeed a version of this conditional expectation i.e. that it satisfies the conditions in Definition 4.9. So in this case, define the right hand side \(Z:=c\) (constant). Then go show that this \(Z\) satisfies the conditions in Definition 4.9 — which is as straightforward as it gets!

For part i, from Definition 4.5 we know that \[\E[X \, | \, A]=\frac{\E[\mathbf{1}_{A} X]}{\P(A)}.\] Since \[\E[\mathbf{1}_{A} X]=\E[\mathbf{1}_{A} c]=c \E[\mathbf{1}_{A}]=c \P(A)\] (by linearity, cf. Theorem 3.24 i, and Equation 2.21), so indeed \(\E[X \, | \, A]=c\).

For part ii, note that we need to show that the constant random variable \(Z:=c\) is integrable (but that’s trivial) and satisfies conditions i & ii of Definition 4.9 to confirm that is indeed (a version of) \(\E[X \, | \, \mathcal{G}]\). Both are trivially true: a constant function is measurable with respect to any \(\sigma\)-algebra (cf. Exercise 2.3 e.g.), and for any event \(A \in \mathcal{G}\), \(\E[\mathbf{1}_A Z]=\E[\mathbf{1}_A X]\) is obviously true as both \(X\) and \(Z\) are constantly equal to \(c\).

Exercise 4.7 [**] Consider an experiment with five possible outcomes, represented by a probability space \((\Omega,\mathcal{F},\P)\) with \(\Omega=\{\omega_1,\ldots,\omega_5\}\), \(\mathcal{F}=\mathcal{P}(\Omega)\) (the powerset of \(\Omega\)), and \(\P\) determined by \(\P(\{\omega_i\})=1/5\) for all \(i=1,\ldots,5\).

Let the random variable \(X: \Omega \to \R\) be given by \(X(\omega_1)=1\), \(X(\omega_2)=2\), …, \(X(\omega_5)=5\), and consider the \(\sigma\)-algebra \[\mathcal{G}=\big\{ \emptyset, \{\omega_2,\omega_3\},\{\omega_1,\omega_4,\omega_5\},\Omega\big\}\] (recall from Exercise 1.4 that this is indeed a \(\sigma\)-algebra).

  1. Determine \(\E[X \, | \, \mathcal{G}]\).
  2. Verify (by working out both sides) that \(\E \big[ \E[X \, | \, \mathcal{G}] \big] = \E[X]\).

For part i, review the definition of conditional expectations (on \(\sigma\)-algebras) Definition 4.9, and observe that we’re in the lucky circumstance that \(\mathcal{G}\) is finite so that we have the fully explicit Equation 4.10 at our disposal! Now it’s just a matter of working out that expression. If you get stuck at some point, then have a look at Example 4.8 which is a very similar situation!

For part ii, you need only one thing: the standard expression for the expectation of a discrete random variable (cf. Proposition 3.23)!

For part i, obviously we need to appeal to Definition 4.9. Since \(\mathcal{G}\) is finite, we can in particular make use of Equation 4.10. First observe that the atoms of \(\mathcal{G}\) (i.e. ignoring \(\emptyset\), the “smallest” elements that form a partition of \(\Omega\) — cf. Proposition 1.38) are \[A_1:=\{\omega_2,\omega_3\} \quad \text{and} \quad A_2:=\{\omega_1,\omega_4,\omega_5\}.\] Now we just need to work out \(\E[X \, | \, A_1]\) and \(\E[X \, | \, A_2]\). From Definition 4.5 we get the expression \[\E[X \, | \, A_i]=\frac{\E[\mathbf{1}_{A_i} X]}{\P(A_i)}. \tag{4.25}\] Using countable additivity (cf. Definition 1.50) we can easily compute \(\P(A_1)=\P(\{\omega_2\})+\P(\{\omega_3\})=2/5\) and similarly \(\P(A_2)=3/5\). Further don’t get confused: \(\mathbf{1}_{A_1} X\) is “just” a random variable that is a product of two random variables: the indicator function \(\mathbf{1}_{A_1}\) and \(X\), so you can easily work out what mapping it is here: \[\mathbf{1}_{A_1}(\omega) X(\omega)= \begin{cases} 2 & \text{if $\omega=\omega_2$} \\ 3 & \text{if $\omega=\omega_3$} \\ 0 & \text{if $\omega \in A_2=\{\omega_1,\omega_4,\omega_5\}$.} \end{cases} \] Hence this is a random variable with range \(\{0,2,3\}\) i.e. a discrete one (cf. Subsection 2.4.1), and using the standard expression for its expectation (cf. Proposition 3.23 with \(h(x)=x\)) we find \[\begin{aligned} \E[\mathbf{1}_{A_1} X] &= 2 \cdot \P(\mathbf{1}_{A_1} X=2) + 3 \cdot \P(\mathbf{1}_{A_1} X=3) + 0 \cdot \P(\mathbf{1}_{A_1} X=0) \\ &= 2 \cdot \P(\{\omega_2\}) + 3 \cdot \P(\{\omega_3\})=1 \end{aligned} \] and hence Equation 4.25 yields \[\E[X \, | \, A_1]=\frac{1}{2/5}=\frac{5}{2}.\] In exactly the same way you can work out that \(\E[X \, | \, A_2]=10/3\). Finally, going back to Equation 4.10 we can now conclude that \[\E[X \, | \, \mathcal{G}](\omega)=\begin{cases} 5/2 & \text{if $\omega \in A_1=\{\omega_2,\omega_3\}$} \\ 10/3 & \text{if $\omega \in A_2=\{\omega_1,\omega_4,\omega_5\}$.} \end{cases} \tag{4.26}\]

For part ii, repeatedly using the standard expression for the expectation of a discrete random variable (cf. Proposition 3.23) we can work out \[\begin{align*} \E[X] &= 1 \cdot \P(X=1) + 2 \cdot \P(X=2) + \ldots + 5 \cdot \P(X=5) \\ &= 1 \cdot \P(\{\omega_1\}) + 2 \cdot \P(\{\omega_2\}) + \ldots + 5 \cdot \P(\{\omega_5\}) &=\frac{15}{5}=3 \end{align*} \] and, using Equation 4.26, \[\begin{align*} \E \big[ \E[X \, | \, \mathcal{G}] \big] &= \frac{5}{2} \cdot \P(A_1) + \frac{10}{3} \cdot \P(A_2) \\ &= \frac{5}{2} \cdot \frac{2}{5} + \frac{10}{3} \cdot \frac{3}{5}=3. \end{align*} \] So they’re indeed equal, as Theorem 4.15 i dictates they should be!

Exercise 4.8 [**/***] On a probability space \((\Omega,\mathcal{F},\P)\), let \(X\) be an integrable random variable and \(\mathcal{G}\) a sub-\(\sigma\)-algebra of \(\mathcal{F}\). Let \(Z\) and \(\widetilde{Z}\) be two versions of \(\E[X \, | \, \mathcal{G}]\). Let’s show that \(Z=\widetilde{Z}\) a.s. by walking through a possible proof together.

  1. Show that we have the identity (pointwise) \[\left\lvert Z-\widetilde{Z} \right\rvert=\mathbf{1}_{\{Z \leq \widetilde{Z}\}} \left( \widetilde{Z}-Z \right)+\mathbf{1}_{\{Z>\widetilde{Z}\}} \left( Z-\widetilde{Z} \right).\]
  2. Use part i together with Definition 4.9 to show that \[\E \left[ \left\lvert Z-\widetilde{Z} \right\rvert \right]=0.\]
  3. Conclude that indeed \(Z=\widetilde{Z}\) a.s.

For part i, if you’re not sure what else to do, you can always prove such an identity by fixing an arbitrary \(\omega \in \Omega\) and plug it into the random variables involved, i.e. \(Z\), \(\widetilde{Z}\), \(\mathbf{1}_{\{Z<\widetilde{Z}\}}\) and \(\mathbf{1}_{\{Z>\widetilde{Z}\}}\) (for the indicator functions, recall Subsection 2.4.2) so that you get an identity involving real numbers to work with. Then distinguish into a few different cases as needs be.

For part ii, first convince yourself that the events \(\{Z \leq \widetilde{Z}\}\) and \(\{Z>\widetilde{Z}\}\) are elements of \(\mathcal{G}\). For this, note that Definition 4.9 guarantees that \(Z\) and \(\widetilde{Z}\) are both \(\mathcal{G}\)-measurable, and ponder what that means for the random variable \(Z-\widetilde{Z}\). Then make optimal use of condition ii in Definition 4.9 and part i!

For part iii, hang on, Kevin is barking something… What do you mean, “almost sure equivalence” Kevin??

For part i, of course one possible way to verify a pointwise identity is to take an arbitrary \(\omega \in \Omega\) and plug it into the random variables involved, i.e. \(Z\), \(\widetilde{Z}\), \(\mathbf{1}_{\{Z<\widetilde{Z}\}}\) and \(\mathbf{1}_{\{Z>\widetilde{Z}\}}\), and convince yourself that the resulting identity involving real numbers holds (where you may have to distinguish a few cases etc.).

Alternatively, observe that the events \(\{Z \leq \widetilde{Z}\}\) and \(\{Z>\widetilde{Z}\}\) form a partition of \(\Omega\) i.e. that (pointwise) \[\mathbf{1}_{\{Z \leq \widetilde{Z}\}}+\mathbf{1}_{\{Z>\widetilde{Z}\}}=1\] (see also Exercise 4.2 ii). This yields \[\begin{align*} \left\lvert Z-\widetilde{Z} \right\rvert &= \left( \mathbf{1}_{\{Z \leq \widetilde{Z}\}}+\mathbf{1}_{\{Z>\widetilde{Z}\}} \right) \left\lvert Z-\widetilde{Z} \right\rvert \\ &= \mathbf{1}_{\{Z \leq \widetilde{Z}\}} \left\lvert Z-\widetilde{Z} \right\rvert + \mathbf{1}_{\{Z>\widetilde{Z}\}} \left\lvert Z-\widetilde{Z} \right\rvert \\ &= \mathbf{1}_{\{Z \leq \widetilde{Z}\}} \left( \widetilde{Z}-Z \right)+\mathbf{1}_{\{Z>\widetilde{Z}\}} \left( Z-\widetilde{Z} \right), \end{align*} \] where the final equation uses for the first term, \(\mathbf{1}_{\{Z \leq \widetilde{Z}\}}=1\) if and only if we are on the event \(\{Z \leq \widetilde{Z}\}\) where \(\lvert Z-\widetilde{Z} \rvert=\widetilde{Z}-Z\), and analogue for the second term. (Of course, also on any of the substeps here where you prefer to be more explicit to see better what’s going on, plug in an \(\omega \in \Omega\)!)

For part ii, since \(Z\) and \(\widetilde{Z}\) are both versions of \(\E[X \, | \, \mathcal{G}]\), we know from Definition 4.9 that they are both integrable, \(\mathcal{G}\)-measurable and \[\E[\mathbf{1}_A Z]=\E[\mathbf{1}_A X]=\E \left[ \mathbf{1}_A \widetilde{Z} \right] \quad \text{for all } A \in \mathcal{G}. \tag{4.27}\]

Now, first note that \(\{Z \leq \widetilde{Z}\} \in \mathcal{G}\) and \(\{Z>\widetilde{Z}\} \in \mathcal{G}\). The nicest argument for this is to write \[\{Z \leq \widetilde{Z}\}=\{Z -\widetilde{Z} \leq 0\},\] which is the inverse image of the Borel set \((-\infty,0]\) under \(Z -\widetilde{Z}\). Since \(Z\) and \(\widetilde{Z}\) are both \(\mathcal{G}\)-measurable so is \(Z -\widetilde{Z}\) (cf. Proposition 2.11 iv) and hence that inverse image is indeed an element of \(\mathcal{G}\) (by def, recall from Definition 2.6). Analogue for \(\{Z>\widetilde{Z}\}\) (or use that it’s the complement of course, and that \(\sigma\)-algebras are closed under complements).

This means that we can use these inverse images as our choice for \(A\) in Equation 4.27. This yields that \[\E \left[ \mathbf{1}_{\{Z \leq \widetilde{Z}\}} \widetilde{Z} \right]=\E \left[ \mathbf{1}_{\{Z \leq \widetilde{Z}\}} Z \right]\] and hence by linearity (cf. Theorem 3.24 i) \[\E \left[ \mathbf{1}_{\{Z \leq \widetilde{Z}\}} \left( \widetilde{Z}-Z \right) \right]=0.\] Similarly it follows that \[\E \left[ \mathbf{1}_{\{Z>\widetilde{Z}\}} \left( Z-\widetilde{Z} \right) \right]=0,\] and hence by part i and linearity again also \[\E \left[ \left\lvert Z-\widetilde{Z} \right\rvert \right]=0.\]

For part iii, given the result in part ii, all we need to do is appeal to almost sure equivalence, cf. Theorem 3.24 iii!

Exercise 4.9 [**] Prove properties ii, iii and vi from Theorem 4.15.

Recall the general approach we also used in Exercise 4.6 ii for instance: in order to show that \(\E[X \, | \, \mathcal{G}]=\ldots\) a.s. holds, define that right hand side “\(\ldots\)” as say \(Z\) and then show that \(Z\) satisfies the conditions set out in Definition 4.9.

Properties ii & iii shouldn’t be very hard. For property iii, don’t forget about Equation 2.21, treat the cases \(\P(A)=0\) and \(\P(A)=1\) separately, and also never forget that \(\E\) can’t see any difference between almost surely equal random variables as expressed by Equation 3.44 in Theorem 3.24 e.g.

Property vi, to do it perfectly correct, needs a bit of tinkering with independence of \(\sigma\)-algebras and random variables, for this don’t forget the discussion in Section 2.6. You shouldn’t need to show anything new, just combining existing defs and results, including what Theorem 3.24 brings us for independent random variables, is all you need!

For property ii, following Definition 4.9, as in Exercise 4.6 ii for instance, what we need to do is show that if we define \(Z:=X\), then \(Z\) satisfies all conditions in Definition 4.9. But that’s all obvious: \(Z\) is integrable and also \(\mathcal{G}\)-measurable since \(X\) is, and trivially also \(\E[\mathbf{1}_A X]=\E[\mathbf{1}_A Z]\) for all \(A \in \mathcal{G}\) of course!

For property iii, pursuing the same strategy as for property ii, define the constant random variable \(Z:=\E[X]\). Then \(Z\) is trivially integrable, measurable with respect to any \(\sigma\)-algebra (cf. Exercise 2.3) hence also with respect to \(\mathcal{G}\), and finally we need to show that it holds that \[\E[\mathbf{1}_A Z]=\E[\mathbf{1}_A X] \quad \text{for all } A \in \mathcal{G}.\] Note that on the left hand side, since \(Z=\E[X]\) is a constant, we can use linearity (cf. Theorem 3.24 i) together with Equation 2.21 to write \[\E[\mathbf{1}_A Z]=\E \big[ \mathbf{1}_A \E[X] \big]=\E[X] \E[\mathbf{1}_A]=\E[X] \P(A)\] so that the equation we need to show can be rewritten to \[\E[X] \P(A)=\E[\mathbf{1}_A X] \quad \text{for all } A \in \mathcal{G}. \tag{4.28}\] Now we need to start making use of the assumption that \(\mathcal{G}\) is trivial, i.e. that for any \(A \in \mathcal{G}\) we have either that \(\P(A)=0\) or \(\P(A)=1\).

First assume that \(\P(A)=0\). Then clearly the left hand side of Equation 4.28 equals \(0\). For the right hand side, observe that \(\mathbf{1}_A X=0\) a.s. (because by assumption \(A^c\) is an almost sure event, cf. Definition 1.55 & Exercise 1.12 i, and for any \(\omega \in A^c\) we have \(\mathbf{1}_A(\omega) X(\omega)=0 \cdot X(\omega)=0\)) so that we get from Equation 3.44 in Theorem 3.24 that \(\E[\mathbf{1}_A X]=\E[0]=0\) (the latter by Exercise 3.5).

Now assume that \(\P(A)=1\). Now the left hand side of Equation 4.28 equals \(\E[X]\), and by the same arguments as just used we now see that \(\mathbf{1}_A X=X\) a.s. and hence also \(\E[\mathbf{1}_A X]=\E[X]\).

For property vi, following the same arguments as we used for property iii above, we end up again needing to show that \[\E[X] \P(A)=\E[\mathbf{1}_A X] \quad \text{for all } A \in \mathcal{G}. \tag{4.29}\]

For this, fix any \(A \in \mathcal{G}\). Recall that we discussed independence in Section 2.6. We know that since \(A \in \mathcal{G}\), \(\mathbf{1}_A\) is \(\mathcal{G}\)-measurable (cf. Subsection 2.4.2). Because \(\sigma(\mathbf{1}_A)\), the \(\sigma\)-algebra generated by \(\mathbf{1}_A\), is the smallest \(\sigma\)-algebra that makes \(\mathbf{1}_A\) measurable we also have that \(\sigma(\mathbf{1}_A) \subseteq \mathcal{G}\) (cf. Proposition 2.9). Now, by assumption the \(\sigma\)-algebras \(\sigma(X)\) and \(\mathcal{G}\) are independent. Looking at the def, cf. Definition 2.30, it readily follows that \(\sigma(X)\) and \(\sigma(\mathbf{1}_A)\) are independent as well. And hence by Proposition 2.31, \(X\) and \(\mathbf{1}_A\) are independent random variables. This then implies, using e.g. Theorem 3.24 viii, that \[\E[\mathbf{1}_A X]=\E[\mathbf{1}_A] \E[X].\] Now just plug in Equation 2.21 to indeed arrive at Equation 4.29.

Exercise 4.10 [**] On some probability space \((\Omega,\mathcal{F},\P)\), let \(X\) and \(Y\) be two independent random variables with \(\E[X]=\E[Y]=7/2\) and \(\E[X^2]=\E[Y^2]=91/6\) (this could for example be the experiment of the rolling two dice with outcomes \(X\) and \(Y\) but that’s otherwise irrelevant). Further let \(\mathcal{G}=\sigma(Y)\).

  1. Compute \(\E[(X+Y)^2 \, | \, \mathcal{G}]\) by first working out the brackets and then using any results from Section 4.5 that come in handy.
  2. Compute \(\E[(X+Y)^2 \, | \, \mathcal{G}]\) by means of Theorem 4.15 vii (you shouldn’t need any other results from Section 4.5).
  3. How can you very easily compute \(\E[(X+Y)^2]\) from your answer to i or ii?

Just for your info: note from Definition 4.12 that in this exercise, we could also have written \(\E[(X+Y)^2 \, | \, Y]\) rather than \(\E[(X+Y)^2 \, | \, \mathcal{G}]\).

For part i, after working out the brackets to get to \(\E[X^2+2XY+Y^2 \, | \, \mathcal{G}]\), if you’re not sure how to proceed consider using Theorem 4.14 i, Theorem 4.15 v and Theorem 4.14 ii & vi to ultimately arrive at \(91/6+7Y+Y^2\).

For part ii, after defining \(\Phi(x,y)=(x+y)^2\) work out \(\E[\Phi(X,y)]\) by again working out the brackets and basic properties of \(\E\).

For part iii, a situation you’ll run into more often: you know the conditional expectation of a random variable but want to know its “regular” expectation. Your standard tool for this job@ the Law of Total Probability i.e. Theorem 4.14 i!

For part i, following the instructions to work out the brackets we get that \[\begin{aligned} \E[(X+Y)^2 \, | \, \mathcal{G}] &= \E[X^2+2XY+Y^2 \, | \, \mathcal{G}] \\ &=\E[X^2 \, | \, \mathcal{G}]+2 \E[XY \, | \, \mathcal{G}]+\E[Y^2 \, | \, \mathcal{G}] \\ &=\E[X^2 \, | \, \mathcal{G}]+2Y \E[X \, | \, \mathcal{G}]+\E[Y^2 \, | \, \mathcal{G}] \\ &=\E[X^2]+2Y \E[X]+Y^2 \\ &=\frac{91}{6}+7Y+Y^2 \end{aligned} \] (observe: it is a random variable, as we know such a conditional expectation generally is!), where the second equality uses linearity (Theorem 4.14 i), the third by “taking out” \(Y\) (indeed \(Y\) is \(\mathcal{G}=\sigma(Y)\)-measurable, cf. Proposition 2.9, so we can use Theorem 4.15 v), and the fourth is by Theorem 4.14 ii & vi.

For part ii, with \(\Phi(x,y)=(x+y)^2\) we can compute for any \(y \in \R\) \[\varphi(y)=\E[\Phi(X,y)]=\E[(X+y)^2]=\E[X^2]+2y \E[X]+y^2=\frac{91}{6}+7y+y^2\] (we just work out the brackets and use linearity properties of \(\E\), cf. Theorem 3.24 i) and hence by Theorem 4.15 vii \[\E[(X+Y)^2 \, | \, \mathcal{G}]=\E[\Phi(X,Y)]=\varphi(Y)=\frac{91}{6}+7Y+Y^2\] (reassuringly the same result as part i!).

For part iii, using Theorem 4.14 i, the result from i/ii, and linearity of \(\E\) (cf. Theorem 3.24 i) we can compute \[\E[(X+Y)^2]=\E \big[ \E[(X+Y)^2 \, | \, \mathcal{G}] \big] = \E \left[ \frac{91}{6}+7Y+Y^2 \right] = \frac{91}{6} + 7 \cdot \frac{7}{2} + \frac{91}{6}=\frac{329}{6}\]

Exercise 4.11 [*/**] Explain how in Theorem 4.15, property i is also a special case of the Tower Property (property iv).

Consider trying to make a particular (“extreme”) choice for the \(\sigma\)-algebra \(\mathcal{H}\) that appears in the Tower Property!

If we take for \(\mathcal{H}\) a “trivial” \(\sigma\)-algebra, e.g. \(\mathcal{H}=\{\emptyset,\Omega\}\) in the Tower Property \[\E \big[ \E[X \, | \, \mathcal{G}] \, \big| \, \mathcal{H} \big]=\E[X \, | \, \mathcal{H}]\] then using Theorem 4.15 iii it simplifies to \[\E \big[ \E[X \, | \, \mathcal{G}] \big]=\E[X].\]

Exercise 4.12 [⛔] In this (challenging!) exercise, we set out to make firm the idea from Remark 4.11 that the conditional expectation \(\E[X \, | \, \mathcal{G}]\) can also be seen as a “projection” of \(X\) onto the collection of “less complicated” \(\mathcal{G}\)-measurable random variables. Very neat but not very easy!

Consider some probability space \((\Omega,\mathcal{F},\P)\) with a random variable \(X\) satisyfing \(\E[X^2]<\infty\) (which implies it’s integrable, cf. Exercise 4.1), and let \(\mathcal{G}\) be a sub-\(\sigma\)-algebra of \(\mathcal{F}\).

  1. Show that \(\E[X \, | \, \mathcal{G}]\) also has finite second moment i.e.  \[\E \left[ \left( \E[X \, | \, \mathcal{G}] \right)^2 \right]<\infty.\]

  2. Let \(\mathbf{L}\) be the collection of all \(\mathcal{G}\)-measurable random variables with finite second moment. Take some \(Y \in \mathbf{L}\). Show that the following are equivalent:

    • \(\E[(X-Y)G]=0\) for all \(G \in \mathbf{L}\),
    • \(\E[(X-Y)^2] \leq \E[(X-G)^2]\) for all \(G \in \mathbf{L}\).
  3. Deduce that the conditional expectation \(\E[X \, | \, \mathcal{G}]\) is the unique (up to a.s. equivalence) minimiser of the following minimisation problem \[\min_{G \in \mathbf{L}} \E[(X-G)^2].\] Note: this is a precise formulation of “\(\E[X \, | \, \mathcal{G}]\) is the \(\mathcal{G}\)-measurable random variable that is closest to/most alike \(X\)” from Remark 4.11 — at least for square integrable ones, and using the \(L^2\) distance.

  4. Suppose that \(\mathcal{H}\) is a sub-\(\sigma\)-algebra of \(\mathcal{G}\). Show that \[\E \left[ \left( X-\E[X \, | \, \mathcal{H}] \right)^2 \right] \geq \E \left[ \left( X-\E[X \, | \, \mathcal{G}] \right)^2 \right].\] Note: that is, the “most alike” \(X\) one within the \(\mathcal{H}\)-measurable random variables is “less alike” \(X\) than the “most alike” \(X\) one within the \(\mathcal{G}\)-measurable random variables. This supports the thinking that if we imagine creating a sequence of ever growing \(\sigma\)-algebras, maybe starting with the trivial \(\{\emptyset,\Omega\}\) and growing to \(\mathcal{F}\), then the further along the sequence we get and the larger the \(\sigma\)-algebra becomes, the “more delicate/complicated” the measurable random variables are allowed to be, and the “more alike” the actual \(X\) the conditional expectation/“projection” becomes.

    It’s a bit like learning to paint with copying a nice Van Gogh as your ultimate goal: as time goes on and you learn increasingly delicate painting techniques, each week your attempt at recreating the Van Gogh gets a bit better and more accurate in all details!

For part i, it can be done only using Theorem 4.15 i and Jensen’s inequality (cf. Theorem 4.14 iv).

For part ii, whenever working with \(L^2\) distances the following simple “point in between” trick is often ridiculously helpful: if you have an expression like \((a-b)^2\) and you want to involve some other quantity \(c\) (the “point in between”), just write \[(a-b)^2=(a-c+c-b)^2=(a-c)^2+(a-c)(c-b)+(c-b)^2\] (the usefullness relies on the fact that the middle term \((a-c)(c-b)\) vanishes under the right conditions/with the right choices — which is one of these properties that makes working with the \(L^2\) distance so pleasant!). For “\(\Rightarrow\)”: using the “point in between trick” to bring \(Y\) into \(\E[(X-G)^2]\) is all you need. For “\(\Leftarrow\)”: this is a bit more tricky — suppose that \(G \in \mathbf{L}\) exists so that \(\E[(X-Y)G]\not=0\). Then you can construct a cleverly chosen element in \(\mathbf{L}\), of the form \(Y+\alpha G\) for some \(\alpha>0\), which violates the assumption and hence contradiction.

For part iii, the (quite, it seems) hard part is to show that the conditional expectation satisfies the first of the two equivalent statements in part ii. I can’t think of a nicer way than to get out the sledgehammer and approximate \(G\) in there by step functions!

For part iv, start with the left hand side of the inequality and use the “point in between” trick again to bring in \(\E[X \, | \, \mathcal{G}]\). There is still some algebra to do there to see that the “\((a-c)(c-b)\)” terms vanishes, though ultimately you only need basic facts to show this!

For part i, first note that since \(X^2\) is an integrable random variable, its conditional expectation \(\E[X^2 \, | \, \mathcal{G}]\) is well defined. From Theorem 4.15 i we get that \[\E \left[ \E[X^2 \, | \, \mathcal{G}] \right]=\E[X^2]<\infty.\] Jensen’s inequality (cf. Theorem 4.14 iv) with \(f(x)=x^2\) yields \[\left( \E[X \, | \, \mathcal{G}] \right)^2 \leq \E[X^2 \, | \, \mathcal{G}] \quad \text{a.s.}\] and hence by non-negativity of \(\E\) \[\E \left[ \left( \E[X \, | \, \mathcal{G}] \right)^2 \right] \leq \E \left[ \E[X^2 \, | \, \mathcal{G}] \right]<\infty.\]

For part ii, first assume that \(\E[(X-Y)G]=0\) for all \(G \in \mathbf{L}\). Then for any \(G \in \mathbf{L}\) \[\begin{aligned} \E[(X-G)^2] &= \E[(X-Y+Y-G)^2] \\ &= \E[(X-Y)^2] + 2 \E[(X-Y)(Y-G)] + \E[(Y-G)^2] \\ &= \E[(X-Y)^2] + \E[(Y-G)^2] \\ &\geq \E[(X-Y)^2], \end{aligned} \] where the third equality uses that since \(Y,G \in \mathbf{L}\), also \(Y-G \in \mathbf{L}\) (second moment condition is trivial to check) and hence \(\E[(X-Y)(Y-G)]=0\) on account of our assumption.

Now assume that \(\E[(X-Y)^2] \leq \E[(X-G)^2]\) for all \(G \in \mathbf{L}\). Suppose that a \(G \in \mathbf{L}\) exists so that \(\E[(X-Y)G]\not=0\) and let’s derive a contradiction. Without loss of generality, \(\E[(X-Y)G]>0\) (otherwise replace \(G\) by \(-G\)). Further without loss of generality, \(\E[G^2]=1\) (otherwise, scale \(G\) by an appropriate constant factor — this would only not be possible if \(\E[G^2]=0\), but that would imply \(G=0\) a.s. and hence \(\E[(X-Y)G]=0\) (both by almost sure equivalence, cf. Theorem 3.24 iii)). Now, set \(\alpha:=\E[(X-Y)G]>0\) and define \(H=Y+\alpha G \in \mathbf{L}\). Then \[\begin{aligned} \E[(X-H)^2] &= \E[(X-Y+Y-H)^2] \\ &= \E[(X-Y)^2] + 2 \E[(X-Y)(Y-H)] + \E[(Y-H)^2] \\ &= \E[(X-Y)^2] -2\alpha \E[(X-Y)G] + \alpha^2 \E[G^2] \\ &= \E[(X-Y)^2] -2\alpha \cdot \alpha + \alpha^2 \\ &= \E[(X-Y)^2] - \alpha^2 \\ &< \E[(X-Y)^2], \end{aligned} \] violating our assumption.

For part iii, first note that if \(Z \in \mathbf{L}\) is any minimiser (assuming one exists), then by part ii it satisfies \(\E[(X-Z)G]=0\) for all \(G \in \mathbf{L}\). For any \(A \in \mathcal{G}\), using this with \(G=\mathbf{1}_A\) yields \[0=\E[(X-Z)\mathbf{1}_A]=\E[\mathbf{1}_A X]-\E[\mathbf{1}_A Z],\] and hence by Definition 4.9 \(Z\) is version of \(\E[X \, | \, \mathcal{G}]\). Since all versions are equal a.s., there is also at most one (up to a.s. equivalence) minimiser.

Now for the hard part: writing \(Z=\E[X \, | \, \mathcal{G}]\), showing that \(Z\) is a minimiser. Using ii it is enough to show that \(\E[(X-Z)G]=0\) for all \(G \in \mathbf{L}\). Again by def (cf. Definition 4.9) we know for any \(A \in \mathcal{G}\) that \[\E[(X-Z)\mathbf{1}_A]=\E[\mathbf{1}_A X]-\E[\mathbf{1}_A Z]=0, \tag{4.30}\] so we need to worry about how to extend this from all indicator functions to all random variables (both in \(\mathbf{L}\)). You can do this in a constructive way: fix some \(G \in \mathbf{L}\), without loss of generality assume \(G \geq 0\) (otherwise just treat its positive and negative parts separately). Now approximate \(G\) (pointwise) by a non-decreasing sequence of non-negative \(\mathcal{G}\)-measurable step functions, say \(G^{(1)} \leq G^{(2)} \leq \ldots\), e.g. as in Subsection 3.4.2, and by writing each \(G^{(n)}\) as a sum of indicator functions we get that \(\E[(X-Z)G^{(n)}]=0\) from Equation 4.30. So if can show that \[\lim_{n \to \infty} \E[(X-Z)G^{(n)}]=\E[(X-Z)G] \tag{4.31}\] then we’re done. For this, note that (pointwise) \[\lvert (X-Z)G^{(n)} \rvert \leq \lvert (X-Z) \rvert \lvert G^{(n)} \rvert \leq \lvert (X-Z) \rvert G\] and the ultimate right hand side is integrable (because they all of \(X\), \(Z\) and \(G\) have finite second moments, use e.g. Hölder’s inequality with \(p=q=2\), cf. Theorem 3.24 vii), and so Equation 4.31 follows from the DCT (cf. Theorem 3.27). Note: this may well be a sledgehammer to crack a nut — it’s too late at night and I can’t seem to think of an easier/more elegant solution (without using facts about \(L^2\) spaces that we haven’t discussed at least), I’d be keen to hear it if you see one though!

For part iv, first note that \[\E \big[ X-\E[X \, | \, \mathcal{G}] \, | \, \mathcal{G} \big] = \E[X \, | \, \mathcal{G}] - \E \big[ \E[X \, | \, \mathcal{G}] \, | \, \mathcal{G} \big] = \E[X \, | \, \mathcal{G}]-\E[X \, | \, \mathcal{G}]=0 \quad \text{a.s.}, \tag{4.32}\] where the first equality uses linearity (cf. Theorem 4.14 i) and the second Theorem 4.15 ii since \(\E[X \, | \, \mathcal{G}]\) is \(\mathcal{G}\)-meas by definition. Hence also \[ \begin{aligned} & \E \big[ (X-\E[X \, | \, \mathcal{G}]) (\E[X \, | \, \mathcal{G}]-\E[X \, | \, \mathcal{H}]) \, | \, \mathcal{G} \big] \\ & = (\E[X \, | \, \mathcal{G}]-\E[X \, | \, \mathcal{H}]) \E \big[ X-\E[X \, | \, \mathcal{G}] \, | \, \mathcal{G} \big] =0 \end{aligned} \tag{4.33}\] where the first equality uses that \(\E[X \, | \, \mathcal{G}]-\E[X \, | \, \mathcal{H}]\) is \(\mathcal{G}\)-meas (the first term is that by definition, the second term is by def \(\mathcal{H}\)-meas and \(\mathcal{H} \subseteq \mathcal{G}\)) together with Theorem 4.15 ii. Taking expectations on both sides of Equation 4.33 yields, also using Theorem 4.15 i \[\E \big[ (X-\E[X \, | \, \mathcal{G}]) (\E[X \, | \, \mathcal{G}]-\E[X \, | \, \mathcal{H}]) \big]=0. \tag{4.34}\] Here is why this is useful. We can write (using the same trick as in part ii) \[ \begin{aligned} \E \big[ (X-\E[X \, | \, \mathcal{H}])^2 \big] &= \E \big[ (X-\E[X \, | \, \mathcal{G}]+\E[X \, | \, \mathcal{G}]-\E[X \, | \, \mathcal{H}])^2 \big] \\ &= \E \big[ (X-\E[X \, | \, \mathcal{G}])^2 \big]\\ & \qquad +2 \E \big[ (X-\E[X \, | \, \mathcal{G}]) (\E[X \, | \, \mathcal{G}]-\E[X \, | \, \mathcal{H}]) \big] \\ & \qquad + \E \big[ \big( \E[X \, | \, \mathcal{G}]-\E[X \, | \, \mathcal{H}] \big)^2 \big] \\ &= \E \big[ (X-\E[X \, | \, \mathcal{G}])^2 \big] + \E \big[ \big( \E[X \, | \, \mathcal{G}]-\E[X \, | \, \mathcal{H}] \big)^2 \big] \\ &\geq \E \big[ (X-\E[X \, | \, \mathcal{G}])^2 \big] \end{aligned} \] so that we have arrived at what we wanted to prove. The second equality just works out the brackets in the same way as in part ii, the third equality uses Equation 4.34 and finally the inequality uses non-negativity.