Stat 100a: Introduction To Probability
Stat 100a: Introduction To Probability
We are skipping 6.7 and the bulk of 6.3 about optimal play with
uniform hands.
1. HW3. Due Tue Dec 5 in the beginning of class. 6.14, 7.2, 7.8. On 6.14,
assume t < l.
6
5
0.2
4
3
eps
y
y
2
-0.2
2
1
0
-0.6
0
-1
-3 -2 -1 0 1 2 3
4. Bivariate normal.
X ~ N(0,1) means X is normal with mean 0 and variance 1.
If X ~ N(0,1) and Y = a + bX, then Y is normal with mean a and variance b2.
Suppose X is normal, and Y|X is normal. Then (X,Y) are bivariate normal.
-3 -2 -1 0 1 2 3
x
4. Bivariate normal.
For example, let X = N(0,1). Let e = N(0, 0.22) and independent of X. Let Y = 3 + 0.5 X + e.
E(X) = 0.
E(Y) = E(3 + 0.5X + e) = 3 + 0.5 E(X) + E(e) = 3.
Given X, E(Y|X) = E(3 + 0.5X + e | X) = 3 + 0.5 X. We will discuss this more later.
var(X) = 1.
var(Y) = var(3 + 0.5 X + e) = var(0.5X + e) = 0.52 var(X) + var(e) = 0.52 + 0.22 = 0.29.
cov(X,Y) = cov(X, 3 + 0.5X + e) = 0.5 var(X) + cov(X, e) = 0.5 + 0 = 0.5.
r = cov(X,Y)/(sd(X) sd(Y)) = 0.5 / (1 x .29) = 0.928.
In general, if (X,Y) are bivariate normal, can write Y = b1 + b2X + e, where E(e) = 0, and e
is ind. of X. Following the same logic, r = cov(X,Y)/(sxsy) = b2 var(X)/(sxsy) = b2 sx/sy,
so r = b s /s , and b = r s /s .
4. Bivariate normal.
For example, let X = N(0,1). Let e = N(0, 0.22) and independent of X. Let Y = 3 + 0.5 X + e.
In R,
4.5
4.0
x = rnorm(1000,mean=0,sd=1)
3.5
eps = rnorm(1000,mean=0,sd=.2)
3.0
y
y = 3 + .5*x+eps
2.5
plot(x,y)
2.0
cor(x,y) # 0.9282692.
1.5 -3 -2 -1 0 1 2 3
x
0.3
Density
0.2
95%
0.1
2.5% 2.5%
0.0
-4 -2 0 2 4
x
4. Bivariate normal.
If (X,Y) are bivariate normal with E(X) = 100, var(X) = 25, E(Y) = 200, var(Y) = 49, r = 0.8,
What is the distribution of Y given X = 105? What is P(Y > 213.83 | X = 105)?
Given X = 105, Y is normal. Write Y = b1 + b2X + e where e is normal with mean 0, ind. of X.
Recall b2 = r sy/sx = 0.8 x 7/5 = 1.12.
So Y = b1 + 1.12 X + e .
To get b1, note 200 = E(Y) = b1 + 1.12 E(X) + E(e) = b1 + 1.12 (100). So 200 = b1 + 112. b1 = 88.
So Y = 88 + 1.12 X + e , where e is normal with mean 0 and ind. of X.
What is var(e)?
49 = var(Y) = var(88 + 1.12 X + e) = 1.122 var(X) + var(e) + 2(1.12) cov(X,e)
= 1.122 (25) + var(e) + 0. So var(e) = 49 - 1.122 (25) = 17.64 and sd(e) = 17.64 = 4.2.
So Y = 88 + 1.12 X + e , where e is N(0, 4.22) and ind. of X.
Given X = 105, Y = 88 + 1.12(105) + e = 205.6 + e , so Y|X=105 ~ N(205.6, 4.22).
Now how many sds above the mean is 213.83? (213.83 205.6)/4.2 = 1.96,
so P(Y>213.83 | X=105) = P(normal is > 1.96 sds above its mean) = 2.5%.
5. Conditional expectation, E(Y | X), ch. 7.2.
Suppose X and Y are discrete.
Then E(Y | X=j) is defined as k k P(Y = k | X = j), just as youd think.
E(Y | X) is a random variable such that E(Y | X) = E(Y | X=j) whenever X = j.
For example, let X = the # of spades in your hand, and Y = the # of clubs in your hand.
a) Whats E(Y)? b) Whats E(Y|X)? c) Whats P(E(Y|X) = 1/3)?