Survey
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project
• If Cov(X, Y) > 0, then X and Y are positively linearly related.
• If Cov(X, Y) < 0, then X and Y are negatively linearly related.
• If Cov(X, Y) = 0, then X and Y are not linearly related.
This does not necessarily mean that X and Y are independent!
Suppose that X is uniformly distributed on ( −1, 1) .
Let Y = X 2 . Clearly, Y is related to X !
E ( X ) = 0. E ( XY ) = E ( X 3 ) = 0. And so,
Cov ( X,Y ) = E ( XY ) − E ( X ) E (Y ) = 0.
Note: This would also work if X is a unit normal.
If X and Y are independent, then Cov ( X,Y ) = 0.
The converse does not hold!
Cov ( X,Y ) = 0 does not guarantee X and Y are independent.
1
Example
Suppose that X, Y have the joint pdf
y = 1− x
f ( x, y ) = 24xy 0 < x + y < 1, x > 0, y > 0
f X (x) = 12x (1− x ) , 0 < x < 1
2
1
What is the covariance of X, Y ?
2
2
⎡
⎤
E ( X ) = ∫ xf X (x)dx = ∫ x ⎣12x (1− x ) ⎦ dx =12 ∫ x (1− x ) dx = 0.4
0
0
0
1
E(X
2
1
1
2
2
2
⎡
⎤
=
x
f
(x)dx
=
x
12x
1−
x
dx
=
0.2
(
)
) ∫0 X
∫0 ⎣
⎦
1
1
2
Var ( X ) = E ( X
2
)− E(X)
2
= 0.2 − 0.16 = 0.04
E ( XY ) = ∫ xyf (x, y)dx dy = 24 ∫
1
1
0
0
∫
1−x
0
2
x y dy dx = .
15
2 2
2
Cov ( XY ) = E ( XY ) − E ( X ) E (Y ) = − 0.4 × 0.4 ≈ 0.027
15
Example
Suppose that X, Y have the joint pdf
1
y = 1− x
f ( x, y ) = 24xy 0 < x + y < 1, x > 0, y > 0
f X (x) = 12x (1− x ) , 0 < x < 1
2
Var ( X ) = E ( X
2
)− E(X)
2
= 0.2 − 0.16 = 0.04
2
Cov ( X,Y ) = E ( XY ) − E ( X ) E (Y ) = − 0.4 × 0.4 ≈ − 0.027
15
Var ( X + Y ) = Var ( X ) + Var (Y ) + 2Cov ( X,Y )
= .04 + 0.04 − 2 ( 0.027 ) = .027
1
Cov ( X, k ) = 0, for any constant k.
Cov ( X, k ) = E ( kX ) − E ( k ) E ( X ) = E ( k ) E ( X ) − E ( k ) E ( X ) = 0
(e). Cov ( X,Y ) = Cov (Y , X))
Suppose that X and Y are independent continuous random variables
with pdf's f X ( x ) = 1, 0 < x < 1, and fY ( y ) = 2y, 0 < y < 1.
What is the value of P (Y < X ) ?
Since X and Y are independent, f ( x, y ) = 2y, 0 < x < 1, 0 < y < 1.
1
P (Y < X ) = ∫ ∫ 2y dy dx = ∫ x dx =
0 0
0
3
1
x
1
2
Suppose that we choose three numbers at random from the ten digits
in {0, 1, 2, …, 9} without replacement. Let X denote the minimum and
Y the maximum of the numbers drawn.
Write an expression (a computable sum) for the expected value of XY.
E ( XY ) =
∑
x+1<y
0≤x,y≤9
xy ( y − x − 1)
xyP ( X = x,Y = y ) = ∑
.
120
x<y
Suppose that X and Y are continuous random variables with
joint pdf given by f ( x, y ) = x 2 + 13 xy, 0 < x < 1, 0 < y < 2
Find the value of P ( X > 12 | Y > 12 ) .
1, Y >
P
X
>
(
2
P ( X > 12 | Y > 12 ) =
P (Y > 12 )
P( X >
1 ,Y
2
>
1
2
1
2
)
) = ∫ ∫ f ( x, y ) dydx = ∫ ∫
1
2
1
2
1
2
1
2
1
2
1
2
x 2 + 13 xy dydx
1
43
= ∫ 1 23 x 2 + 58 x dx = 64
2
y+2
2
1
fY ( y ) = ∫ x + 3 xydx =
.
0
6
1
43
43
64
P ( X > |Y > ) =
= .
13
52
16
1
2
1
2
(
P Y>
1
2
)
y+2
13
⌠
=⎮
dy = .
⌡21 6
16
2
Suppose that X and Y are jointly distributed continuous
random variables with
2x + 1
f X (x) =
, 0 < x <1
2
fY |X ( y | x ) =
2x + 2y
, 0 < y < 1.
2x + 1
Find fY ( y ) .
2x + 1 2x + 2y
f ( x, y ) = f X ( x ) ⋅ fY |X ( y | x ) =
×
= x + y, 0 < x < 1, 0 < y < 1.
2
2x + 1
fY ( y ) = ∫ x + y dx = x + xy
1
0
1
2
2
x=1
x=0
= y + 12 , 0 < y < 1.
1
Problem 5.79
y = x +1
y = 1− x
f ( x, y ) = 1
-1
E ( XY ) = ∫
1
0
∫
1−y
y−1
xyf (x, y)dx dy = ∫
1
0
∫
1−y
y−1
xy dx dy = 0
1
Problem 5.92
1
f (x, y) = 6 (1− y ) , 0 ≤ x ≤ y ≤ 1
f X (x) = 3(1− x ) , 0 ≤ x ≤ 1
2
fY (y) = 6y (1− y ) , 0 ≤ y ≤ 1
E ( XY ) = 6 ∫
1
0
∫
y
0
6
xy(1− y)dx dy =
40
1
E ( X ) = ∫ xf X ( x ) dx = 3∫ x (1− x ) dx = .
0
0
4
1
1
2
1
E (Y ) = ∫ yfY ( y ) dx = 6 ∫ y (1− y ) dx =
0
0
2
1
1
6 1 1 1
Cov ( X,Y ) = E ( XY ) − E ( X ) E (Y ) =
− × = .
40 2 4 40
1
Problem 5.95
Y
0
f ( x, y ) = 1 3 , for ( x, y ) ∈{( −1, 0 ) , ( 0, 1) , (1, 0 )}
X
E ( XY ) = 0,
1
1
1
E(X) = × ( −1) + ( 0 ) + (1) = 0,
3
3
3
2
1
1
E(Y ) = × ( 0 ) + (1) =
3
3
3
1
Cov ( X,Y ) = E ( XY ) − E ( X ) E (Y ) = 0 − 0 × = 0.
3
–1
0
1
1
3
0
1
3
1
0
1
3
0
Correlation Coefficient
Cov ( X,Y )
The correlation coefficient ρ of X and Y is defined by ρ =
.
σ Xσ Y
It can be shown that − 1 ≤ ρ ≤ 1.
ρ gives a measure of how close Y is to being a linear function of X.
If ρ = 1, then Y = aX + b for some a,b with a > 0.
If ρ = −1, then Y = aX + b for some a,b with a < 0.
If ρ = 0, then there is no correlation between X and Y .
What is a simple strategy for getting the high card with probability at
least 0.25 in the stopping rule problem?
Skip the first half of the cards and then choose the next ‘high’ card.
What’s the optimal strategy?
Skip the first n e cards and then take the next 'high' card.
The probability of winning with the optimal strategy is 1 e ≈ 0.37
So for 100 cards you should skip the first 37 and then take the next option.
So for 10 cards you should skip the first 4 and then take the next option.
Suppose that X and Y are independent random variables.
Let Z = max{X, Y}. max{X,Y } ≤ t ⇔ X ≤ t and Y ≤ t.
FZ ( t ) = P ( Z ≤ t ) = P ( X ≤ t,Y ≤ t ) = FX ( t ) FY ( t ) .
This holds for any number of independent random variables,
Let Z = max{X1 , X2 ,…, Xn }, n ≥ 2.
FZ ( t ) = P ( Z ≤ t ) = FX1 ( t ) FX2 ( t )FXn ( t ) .
Let Z = min{X, Y} Now what? min{X,Y } ≥ t ⇔ X ≥ t and Y ≥ t.
(
)
FZ ( t ) = 1− ⎡⎣1− FX ( t ) ⎤⎦ ⎡⎣1− FY ( t ) ⎤⎦ = FX ( t ) + FY ( t ) − FX ( t ) FY ( t )