Conditional Probability
Conditional Probability Space
We start with Probability Spaces. Consider and an even with positive Probability. Conditioned on the occurrence of , the probability of an event is now
One can verify that is a probability measure on . Actually, this gives a conditional probability space or .
The definition directly gives some properties:
- Law of total probability: Given any countable partition of , for any ,
- Bayes’ theorem
- Chain rule: For any countable ,
Conditional Distribution
Let be two Random Variables defined on the same Probability Space with Joint Distribution . The conditional distribution of given is defined as
We can consider the conditional distribution as a distribution on the new probability space where is a deterministic event; thus, we require . Visually, we can think of the conditional distribution as a slice of the joint distribution along the axis, renormalized to be a probability distribution.
If are discrete, we define the conditional PMF as
If they are continuous, we define the conditional PDF as
Conditional Expectation
The conditional expectation is just the expectation on the conditional probability space:
Given another r.v. , let . Then, the conditional expectation of on is
- 💡 The existence of expectation (integrability) implies the existence of conditional expectation. But the reverse is not true.
Similar to ^law-prob, we have law of total expectation: given any countable partition of , for any r.v. ,
Conditional Expectation as a Random Variable
Conditioned on the random variable instead of an event , the conditional expectation is a Random Variable: . In this sense, the law of total expectation gives the tower property: For any measurable function such that is integrable, we have
\mathbb{E}\left\[ \mathbb{E}\[X\given Y]g(Y) \right] = \mathbb{E}\[Xg(Y)].In particular, if , then
\mathbb{E}\left\[ \mathbb{E}\[X\given Y] \right] = \mathbb{E}\[X].General Definition of Conditional Expectation
The tower property gives an alternative definition of conditional expectation: it is a Random Variable of the form , where is a measurable function, such that
for any measurable function . This definition is valid for all kinds of random variables, including continuous and discrete ones.
- (Existence) exists for any integrable r.v. .
- (Uniqueness) is unique up to a set of measure zero.
Optimal Estimation
The above definition of conditional expectation can be interpreted as the optimal estimation of given in the sense that it minimizes the mean square error: Suppose is square integrable; for any measurable function , we have
To see this, we expand the MSE:
\mathbb{E}\left\[ (X-g(Y))^{2} \right] = \mathbb{E}\[(X-\mathbb{E}\[X\given Y])^{2}] + 2\mathbb{E}\[(X-\mathbb{E}\[X\given Y])(\mathbb{E}\[X\given Y]-g(Y))] + \mathbb{E}\[(\mathbb{E}\[X\given Y]-g(Y))^{2}] \ge \mathbb{E}\[(X-\mathbb{E}\[X\given Y])^{2}] + 2\mathbb{E}\[(\phi(Y)-X)f(Y)],where . By the general definition, we know , which gives the desired inequality.