Beliefs depend on the available information. This idea is formalized in probability theory by conditioning. Conditional probabilities, conditional expectations, and conditional probability distributions are treated on three levels: discrete probabilities, probability density functions, and measure theory. Conditioning leads to a non-random result if the condition is completely specified; otherwise, if the condition is left random, the result of conditioning is also random.
Conditioning on the discrete level Example: A fair coin is tossed 10 times; the random variable X is the number of heads in these 10 tosses, and Y is the number of heads in the first 3 tosses. In spite of the fact that Y emerges before X it may happen that someone knows X but not Y.
Conditional probability
Given that X = 1, the conditional probability of the event Y = 0 is
ℙ(Y=0|X=1)=ℙ(Y=0,X=1)ℙ(X=1)=0.7 More generally,
ℙ(Y=0|X=x)=(7x)(10x)=7!(10−x)!(7−x)!10!x=0,1,2,3,4,5,6,7.ℙ(Y=0|X=x)=0x=8,9,10. One may also treat the conditional probability as a random variable, — a function of the random variable X, namely,
ℙ(Y=0|X)={(7X)/(10X)X⩽7,0X>7. The expectation of this random variable is equal to the (unconditional) probability,
𝔼(ℙ(Y=0|X))=∑xℙ(Y=0|X=x)ℙ(X=x)=ℙ(Y=0), namely,
∑x=07(7x)(10x)⋅1210(10x)=18, which is an instance of the law of total probability 𝔼(ℙ(A|X))=ℙ(A). Thus, ℙ(Y=0|X=1) may be treated as the value of the random variable ℙ(Y=0|X) corresponding to X = 1. On the other hand, ℙ(Y=0|X=1) is well-defined irrespective of other possible values of X.
Conditional expectation
Given that X = 1, the conditional expectation of the random variable Y is 𝔼(Y|X=1)=310 More generally,
𝔼(Y|X=x)=310x,x=0,…,10. (In this example it appears to be a linear function, but in general it is nonlinear.) One may also treat the conditional expectation as a random variable, — a function of the random variable X, namely,
𝔼(Y|X)=310X. The expectation of this random variable is equal to the (unconditional) expectation of Y,
𝔼(𝔼(Y|X))=∑x𝔼(Y|X=x)ℙ(X=x)=𝔼(Y), namely,
∑x=010310x⋅1210(10x)=32, or simply
𝔼(310X)=310𝔼(X)=310⋅5=32, which is an instance of the law of total expectation 𝔼(𝔼(Y|X))=𝔼(Y). The random variable 𝔼(Y|X) is the best predictor of Y given X. That is, it minimizes the mean square error 𝔼(Y−f(X))2 on the class of all random variables of the form f(X). This class of random variables remains intact if X is replaced, say, with 2X. Thus, 𝔼(Y|2X)=𝔼(Y|X). It does not mean that 𝔼(Y|2X)=310×2X; rather, 𝔼(Y|2X)=320×2X=310X. In particular, 𝔼(Y|2X=2)=310. More generally, 𝔼(Y|g(X))=𝔼(Y|X) for every function g that is one-to-one on the set of all possible values of X. The values of X are irrelevant; what matters is the partition (denote it αX)
Ω={X=x1}⊎{X=x2}⊎… of the sample space Ω into disjoint sets {X = xn}. (Here x1,x2,… are all possible values of X.) Given an arbitrary partition α of Ω, one may define the random variable E ( Y | α ). Still, E ( E ( Y | α)) = E ( Y ). Conditional probability may be treated as a special case of conditional expectation. Namely, P ( A | X ) = E ( Y | X ) if Y is the indicator of A. Therefore the conditional probability also depends on the partition αX generated by X rather than on X itself; P ( A | g(X) ) = P (A | X) = P (A | α), α = αX = αg(X). On the other hand, conditioning on an event B is well-defined, provided that ℙ(B)≠0, irrespective of any partition that may contain B as one of several parts.
Conditional distribution
Given X = x, the conditional distribution of Y is
ℙ(Y=y|X=x)=(3y)(7x−y)(10x)=(xy)(10−x3−y)(103) for 0 ≤ y ≤ min ( 3, x ). It is the hypergeometric distribution H ( x; 3, 7 ), or equivalently, H ( 3; x, 10-x ). The corresponding expectation 0.3 x, obtained from the general formula
nRR+W for H ( n; R, W ), is nothing but the conditional expectation E (Y | X = x) = 0.3 x. Treating H ( X; 3, 7 ) as a random distribution (a random vector in the four-dimensional space of all measures on {0,1,2,3}), one may take its expectation, getting the unconditional distribution of Y, — the binomial distribution Bin ( 3, 0.5 ). This fact amounts to the equality
∑x=010ℙ(Y=y|X=x)ℙ(X=x)=ℙ(Y=y)=123(3y) for y = 0,1,2,3; which is an instance of the law of total probability.
Conditioning on the level of densities
Example. A point of the sphere x2 + y2 + z2 = 1 is chosen at random according to the uniform distribution on the sphere. The random variables X, Y, Z are the coordinates of the random point. The joint density of X, Y, Z does not exist (since the sphere is of zero volume), but the joint density fX,Y of X, Y exists,
fX,Y(x,y)={12π1−x2−y2if x2+y2<1,0otherwise. (The density is non-constant because of a non-constant angle between the sphere and the plane.) The density of X may be calculated by integration,
fX(x)=∫−∞+∞fX,Y(x,y)dy=∫−1−x2+1−x2dy2π1−x2−y2; surprisingly, the result does not depend on x in (−1,1),
fX(x)={0.5for −1<x<1,0otherwise, which means that X is distributed uniformly on (−1,1). The same holds for Y and Z (and in fact, for aX + bY + cZ whenever a2 + b2 + c2 = 1). Example. A different measure of calculating the marginal distribution function is provided below fX,Y,Z(x,y,z)=34π fX(x)=∫−1−y2−x2+1−y2−x2∫−1−x2+1−x23dydz4π=31−x2/4;
Conditional probability
Calculation Given that X = 0.5, the conditional probability of the event Y ≤ 0.75 is the integral of the conditional density,
fY|X=0.5(y)=fX,Y(0.5,y)fX(0.5)={1π0.75−y2for −0.75<y<0.75,0otherwise. ℙ(Y≤0.75|X=0.5)=∫−∞0.75fY|X=0.5(y)dy=∫−0.750.75dyπ0.75−y2=12+1πarcsin0.75=56. More generally,
ℙ(Y≤y|X=x)=12+1πarcsiny1−x2 for all x and y such that −1 < x < 1 (otherwise the denominator fX(x) vanishes) and −1−x2<y<1−x2 (otherwise the conditional probability degenerates to 0 or 1). One may also treat the conditional probability as a random variable, — a function of the random variable X, namely,
ℙ(Y≤y|X)={0for X2≥1−y2 and y<0,12+1πarcsiny1−X2for X2<1−y2,1for X2≥1−y2 and y>0. The expectation of this random variable is equal to the (unconditional) probability,
𝔼(ℙ(Y≤y|X))=∫−∞+∞ℙ(Y≤y|X=x)fX(x)dx=ℙ(Y≤y), which is an instance of the law of total probability E ( P ( A | X ) ) = P ( A ).
… excerpt ends here. Continue reading the full article.