Docsity

Joint Densities for Continuous Random Variables | MATH 180A, Study notes of Mathematics

Toggle sidebar
bg1
Math 180A, Fall 2005, Prof. Tesler – November 21, 2005
Joint Densities for continuous random variables
1. Example: continuous pdf defined in a triangular region
Let fX,Y(x, y) denote the joint pdf of continuous random variables (vs. pX,Y(x, y) for discrete). We will
work with this example:
fX,Y(x, y)=(xy/2if0<x<y<2;
0 otherwise.
x
y3
2
1
321
The marginal pdfs are defined as fX(x)=R∞
−∞ fX,Y(x, y)dy and fY(y)=R∞
−∞ fX,Y(x, y)dx.
In our example, if x≤0orx≥2 then fX,Y(x, y) = 0 for all yso fX(x)=R∞
−∞ 0dy =0.
If 0 <x<2 then fX,Y (x, y)6= 0 only for ybetween xand 2, giving
fX(x)=Zx
−∞
0dy +Z2
x
xy
2dy +Z∞
2
0dy =0+ xy2
4
2
y=x!+0= x
4(22−x2)=x−x
3
4
Likewise, if y≤0ory≥2 then fY(y) = 0, while if 0 <y<2 then
fY(y)=Z0
−∞
0dy +Zy
0
xy
2dy +Z∞
y
0dy =0+x
2
y
4
y
x=0+0 = (y
2−0
2
)y
4=y
3
4
So fX(x)=(x−x
3
/4if0<x<2;
0 otherwise fY(y)=(y
3
/4if0<y<2;
0 otherwise.
2. Independence
Continuous random variables X,Yare independent when fX,Y(x, y)=f
X
(x)f
Y
(y) for all values of xand
y. Here, when 0 <x<y<2, we have fX(x)fY(y)=(x−x
3
4)(y3
4)6=xy
2=fX,Y(x, y), so they are not
independent.
Incidentally, if 0 <y<x<2 then fX(x)fY(y)=(x−x
3
4)(y3
4) and fX,Y(x, y) = 0, which also does not
obey the factor rule so that’s another way to demonstrate it’s not independent.
1
pf3
pf4

Partial preview of the text

Download Joint Densities for Continuous Random Variables | MATH 180A and more Study notes Mathematics in PDF only on Docsity!

Math 180A, Fall 2005, Prof. Tesler – November 21, 2005 Joint Densities for continuous random variables

  1. Example: continuous pdf defined in a triangular region Let fX,Y (x, y) denote the joint pdf of continuous random variables (vs. pX,Y (x, y) for discrete). We will work with this example:

fX,Y (x, y) =

xy/ 2 if 0 < x < y < 2; 0 otherwise.

x

y 3

2

1

1 2 3

The marginal pdfs are defined as fX(x) =

−∞ fX,Y^ (x, y)^ dy^ and^ fY^ (y) =^

−∞ fX,Y^ (x, y)^ dx. In our example, if x ≤ 0 or x ≥ 2 then fX,Y (x, y) = 0 for all y so fX(x) =

−∞ 0 dy^ = 0. If 0 < x < 2 then fX,Y (x, y) 6 = 0 only for y between x and 2, giving

fX(x) =

∫ (^) x

−∞

0 dy +

x

xy 2 dy^ +

2

0 dy = 0 +

xy^2 4

2

y=x

  • 0 = x 4 (2^2 − x^2 ) = x − x

3 4 Likewise, if y ≤ 0 or y ≥ 2 then fY (y) = 0, while if 0 < y < 2 then

fY (y) =

−∞

0 dy +

∫ (^) y

0

xy 2 dy^ +

y

0 dy = 0 +

x^2 y 4

y

x=

(y^2 − 02 )y 4 =^

y^3 4

So fX(x) =

x − x^3 / 4 if 0 < x < 2; 0 otherwise

fY (y) =

y^3 / 4 if 0 < y < 2; 0 otherwise.

  1. Independence Continuous random variables X, Y are independent when fX,Y (x, y) = fX(x)fY (y) for all values of x and y. Here, when 0 < x < y < 2, we have fX(x)fY (y) = (x − x 43 )( y 43 ) 6 = xy 2 = fX,Y (x, y), so they are not independent. Incidentally, if 0 < y < x < 2 then fX(x)fY (y) = (x − x 43 )( y

3 4 ) and^ fX,Y^ (x, y) = 0, which also does not obey the factor rule so that’s another way to demonstrate it’s not independent.

1

  1. Cumulative distribution function

FX,Y (x, y) = P (X ≤ x, Y ≤ y) =

∫ (^) x

−∞

∫ (^) y

−∞

fX,Y (u, v) dv du =

∫ (^) y

−∞

∫ (^) x

−∞

fX,Y (u, v) du dv Integrate in whichever order is easiest. Since x and y are already being used as variables, the integration variables cannot also be called x and y, so instead I used u and v. There are many cases to consider in evaluating the cdf:

(^00)

0

(c) (d)

(a)

x

(b)

y 3

2

1

1 2 3 ^

























y

x

3

2

1

1 2 3

(x,y)

^







 

(y,y) (x,y)

x

y 3

2

1

1 2 3

All regions Domain when (x, y) is in region (a) Domain when (x, y) is in region (b) Region (a) 0 < x < y < 2: FX,Y (x, y) =

∫ (^) x 0

∫ (^) y u

uv 2 dv du^ (the rest of^ u^ ≤^ x,^ v^ ≤^ y^ contributes 0) The inside integral is

∫ (^) y u

uv 2 dv^ =^

uv^2 4

y v=u =^

u(y^2 −u^2 ) 4 =^

uy^2 −u^3

The outside integral is FX,Y (x, y) =

∫ (^) x 0

uy^2 −u^3 4 du^ =

( (^) u (^2) y 2 8 −^

u^4 16

x u=

= (x

(^2) − 02 )y 2 8 −^

x^4 − 04 16 =^

x^2 y^2 8 −^

x^4

Region (b) 0 < y < 2 and x > y: The part of the region u ≤ x, v ≤ y with nonzero pdf is the same as for u ≤ y, v ≤ y. So FX,Y (x, y) = FX,Y (y, y) = y

4 8 −^

y^4 16 =^

y^4

Region (c) y > 2 and 0 < x < 2: FX,Y (x, y) = FX,Y (x, 2) = x^28 ·^2 2 − x 164 = x 22 − x 164

Region (d) x > 2 and y > 2: FX,Y (x, y) = FX,Y (2, 2) = 228 ·^2 2 − 2164 = 2 − 1 = 1

Other x < 0 or y < 0: fX,Y (u, v) = 0 for all u ≤ x and v ≤ y, so FX,Y (x, y) =

∫ (^) x −∞

∫ (^) y −∞ 0 dv du^ = 0.

Summary: FX,Y (x, y) =

x^2 y^2 8 −^

x^4 16 if 0^ < x < y <^2 (region (a)); y^4 16 if 0^ < y <^ 2 and^ x > y^ (region (b)); x^2 2 −^

x^4 16 if 0^ < x <^2 < y^ (region (c)); 1 if x > 2 and y > 2 (region (d)); 0 otherwise.

FX(x) = FX(x, ∞) =

0 if x ≤ 0; x^2 / 2 − x^4 / 16 if 0 ≤ x ≤ 2 (c); 1 if x ≥ 2 (d).

fX(x) = FX^ ′(x) =

x − x^3 / 4 if 0 < x < 2; 0 if x < 0 or x > 2.

FY (y) = FY (∞, y) =

0 if y < 0; y^4 / 16 if 0 < y < 2 (b); 1 if y > 2.

fY (y) = FY^ ′(y) =

y^3 / 4 if 0 < y < 2; 0 if y < 0 or y > 2.

  1. Computing pdf from cdf fX,Y (x, y) = ∂ ∂x

∂y

FX,Y (x, y) = (^) ∂x ∂y∂^2 FX,Y (x, y)

In our example, if 0 < x < y < 2 then

∂x

∂y

( (^) x (^2) y 2 8 −^

x^4 16

∂x

( (^) x (^2) y 4

= xy 2

Indeed, this does equal fX,Y (x, y). In all other cases, ∂ ∂x

∂y

FX,Y (x, y) = 0 since it’s either a function of x alone, y alone, or a constant, and indeed fX,Y (x, y) = 0 in all other cases.

  1. Conditional expected values for discrete random variables Let A be an event. Conditional expectation is defined as E(X|A) =

x xP^ (X^ =^ x|A) E(g(X)|A) =

x g(x)P^ (X^ =^ x|A) E(g(X, Y )|A) =

x

y g(x, y)P^ (X^ =^ x, Y^ =^ y|A) The expected value of the roll of a fair die, given that it shows an even value: P (X = x|X is even) = 1/3 for x = 2, 4 , 6 and is 0 otherwise. E(X = x|X is even) = (2)(1/3) + (4)(1/3) + (6)(1/3) = 12/3 = 4.

  1. Conditional expected values for continuous random variables (i) Compute E(X|Y < 3 /2): The event Y < 3 /2 has nonzero probability, so we compute

fX,Y (x, y|Y < 32 ) =

fX,Y (x,y) P (Y < 32 ) if^ y <^

3 2 ; 0 otherwise

{ (^) xy/ 2 81 / 256 =^

128 81 xy^ if 0^ < x < y <^

3 2 ; 0 otherwise

Then E(X|Y < 3 /2) =

0

∫ (^) y 0 x^ ·^ (128/81)xy dx dy. Inside:

∫ (^) y 0 (128/81)x

(^2) y dx = (128/81)(x (^3) /3)y|yx=0 = (128/243)(y (^3) − 03 )y = (128/243)y (^4). Outside:

0 (128/243)y

(^4) dy = (128/1215)y (^5) |^3 y/=0^2 = (128/1215)((3/2) (^5) − 05 ) = 4 / 5

(ii) Compute E(X|Y = 3/2): Define E(g(X)|Y = y) =

−∞ g(x)fX(x|Y^ =^ y)^ dx. In our earlier example,

E(X|Y = 3/2) =

0

x ·

2 x (3/2)^2 dx^ =

8 x^3 27

3 / 2

x=

8((3/2)^3 − 02 )

More generally, for 0 < y < 2 we had fX(x|Y = y) = 2x/y^2 when 0 < x < y < 2, fX(x|Y = y) = 0 otherwise. This gives

E(X|Y = y) =

∫ (^) y

0

x · 2 x y^2

dx =^2 x

3 3 y^2

y

x=

= 2(y

3 y^2

=^2 y 3

This may also be written E(X|Y ) = 2Y /3. Since it’s still a function of Y , we may take the expected value of this as a function of the random variable Y whose pdf is fY (y) = y^3 /4 if 0 < y < 2, fY (y) = 0 otherwise:

E(E(X|Y )) =

0

(2y/3)(y^3 /4) dy =

0

(y^4 /6) dy = (y^5 /30)

y=0 = (

5 − 05 )/30 = 32/30 = 16/15 = E(X)

In general,

E(E(X|Y )) =

−∞

E(X|Y = y)fY (y) dy =

−∞

−∞

xfX(x|Y = y) dx

fY (y) dy

−∞

−∞

x

fX,Y (x, y) fY (y)

fY (y) dx dy =

−∞

−∞

xfX,Y (x, y) dx dy = E(X)