Discrete Probability Conditional expectation of a random variable R

Discrete Probability
Conditional expectation of a random variable
R. Inkulu
http://www.iitg.ac.in/rinkulu/
(Conditional Expectation)
1/9
Definition
• If X and Y are two random variables with the joint distribution, the
conditional expectation
of Y for a given X = xj , denoted with
P
E(Y|X = xj ), is yk ∈range(Y) yk p(Y = yk |X = xj ).
• Essentially, the expression E(Y|X) is a random variable f (X) that takes
on the value E(Y|X = xj ) when X = xj .
(Conditional Expectation)
2/9
Example
The conditional expectation of rolling a fair die given that the number rolled
is ≤ 3: letting X denotes the number rolled,
(Conditional Expectation)
3/9
Example
The conditional expectation of rolling a fair die given that the number rolled
is ≤ 3: letting XPdenotes the number rolled,
E(X|X ≤ 3) = 3i=1 ip(X = i|X ≤ 3) = 2.
(Conditional Expectation)
3/9
Example
Suppose that we independently roll two fair dice. Let X1 be the number that
that shows on the first die, X2 the number on the second die, and X the sum of
the numbers on the two dice. Then
• E(X|X1 ) =
(Conditional Expectation)
4/9
Example
Suppose that we independently roll two fair dice. Let X1 be the number that
that shows on the first die, X2 the number on the second die, and X the sum of
the numbers on the two dice. Then
PX1 +6
P
7
1
• E(X|X1 ) =
i ip(X = i|X1 ) =
i=X1 +1 (i)( 6 ) = X1 + 2 — hence, E(X|X1 )
is a function with X1 as its domain
(Conditional Expectation)
4/9
Example
Suppose that we independently roll two fair dice. Let X1 be the number that
that shows on the first die, X2 the number on the second die, and X the sum of
the numbers on the two dice. Then
PX1 +6
P
7
1
• E(X|X1 ) =
i ip(X = i|X1 ) =
i=X1 +1 (i)( 6 ) = X1 + 2 — hence, E(X|X1 )
is a function with X1 as its domain
E(X|X1 = 2) =
(Conditional Expectation)
4/9
Example
Suppose that we independently roll two fair dice. Let X1 be the number that
that shows on the first die, X2 the number on the second die, and X the sum of
the numbers on the two dice. Then
PX1 +6
P
7
1
• E(X|X1 ) =
i ip(X = i|X1 ) =
i=X1 +1 (i)( 6 ) = X1 + 2 — hence, E(X|X1 )
is a function with X1 as its domain
E(X|X1 = 2) =
(Conditional Expectation)
11
2
4/9
Example
Suppose that we independently roll two fair dice. Let X1 be the number that
that shows on the first die, X2 the number on the second die, and X the sum of
the numbers on the two dice. Then
PX1 +6
P
7
1
• E(X|X1 ) =
i ip(X = i|X1 ) =
i=X1 +1 (i)( 6 ) = X1 + 2 — hence, E(X|X1 )
is a function with X1 as its domain
E(X|X1 = 2) =
11
2
• E(X1 |X = 5) =
(Conditional Expectation)
4/9
Example
Suppose that we independently roll two fair dice. Let X1 be the number that
that shows on the first die, X2 the number on the second die, and X the sum of
the numbers on the two dice. Then
PX1 +6
P
7
1
• E(X|X1 ) =
i ip(X = i|X1 ) =
i=X1 +1 (i)( 6 ) = X1 + 2 — hence, E(X|X1 )
is a function with X1 as its domain
E(X|X1 = 2) =
• E(X1 |X = 5) =
(Conditional Expectation)
11
2
P4
i=1 ip(X1
= i|X = 5) =
5
2
4/9
Law of total expectations
For any random variables X and Y, E(X) =
P
y∈range(Y) p(Y
= y)E(X|Y = y).
- conditional expectations are quite useful in dividing the expectation
calculation into simpler cases
Ex: Supoose that there are m percent of the people are male and the rest are
female. Also, suppose that the expected height of male is hm and the expected
height of women is hw . Then the expected height of a randomly chosen
person is
(Conditional Expectation)
5/9
Law of total expectations
For any random variables X and Y, E(X) =
P
y∈range(Y) p(Y
= y)E(X|Y = y).
- conditional expectations are quite useful in dividing the expectation
calculation into simpler cases
Ex: Supoose that there are m percent of the people are male and the rest are
female. Also, suppose that the expected height of male is hm and the expected
height of women is hw . Then the expected height of a randomly chosen
m
m
person is hm 100
+ hw (1 − 100
).
(Conditional Expectation)
5/9
Extending linearity of expectations
For any finite collection of discrete random variables X1 , X2 , . . . , Xn with
finite
P expectations andPfor any random variable Y,
E[ ni=1 Xi |Y = y] = ni=1 E[Xi |Y = y].
— homework
(Conditional Expectation)
6/9
Expectation of E[Y|Z]
For random variables Y and Z,
E[Y] = E[E[Y|Z]].
Ex. Suppose that we independently roll two fair dice. Let X1 be the number
that that shows on the first die, X2 the number on the second die, and X the
sum of the numbers on the two dice. We have seen that E(X|X1 ) = X1 + 72 .
Thus E(E(X|X1 )) = E(X1 + 27 ) = E(X1 ) + 72 = 7 = E(X).
(Conditional Expectation)
7/9
Example: expectation of a sum of a random number of
random variables
Suppose the number of customers entering the store on a given day is a
random variable with mean µ′ . Also, suppose that the amounts of money
spent by these customers are independent random variables having a common
mean of µ′′ . Assume that the amount of money spent by a customer is also
independent of the total number of customers to enter the store. Then the
expected amount of money spent in the store on a given day is
(Conditional Expectation)
8/9
Example: expectation of a sum of a random number of
random variables
Suppose the number of customers entering the store on a given day is a
random variable with mean µ′ . Also, suppose that the amounts of money
spent by these customers are independent random variables having a common
mean of µ′′ . Assume that the amount of money spent by a customer is also
independent of the total number of customers to enter the store. Then the
expected amount of money spent in the store on a given day is µ′ µ′′ .
(Conditional Expectation)
8/9
Example: branching process
Consider a program that includes one call to a proces S. Assume that each call
to process S recursively spawns new copies of the process S, where the
number of new copies is a random variable whose expected value is np.
Further, assuming that these random variables are independent for each call to
S, the expected number of copies of the process S generated by program are
(Conditional Expectation)
9/9
Example: branching process
Consider a program that includes one call to a proces S. Assume that each call
to process S recursively spawns new copies of the process S, where the
number of new copies is a random variable whose expected value is np.
Further, assuming that these random variables are independent for each call to
S,
number of copies of the process S generated by program are
Pthe expected
i.
(np)
i≥0
(Conditional Expectation)
9/9