P( Y y ) .

30
Let X be a continuous type random variable with p.d.f. f(x) where f(x) > 0 for a < x < b, where a = – and/or b = + is possible; we also let F(x) = P(X x) be the distribution function for X (i.e., F / (x) = f(x)). Suppose Y = u(X) where u is a continuous function. One method for finding the p.d.f. of the random variable Y is the distribution function method . To use this method, one first attempts to find a formula for the distribution function of Y, that is, a formula for G(y) = Then, the p.d.f. of Y is obtained by taking the derivative of the distribution function, that is, the p.d.f. of Y is g(y) = P(Y y) . G / (y) . Section 5.1

description

Section 5.1. - PowerPoint PPT Presentation

Transcript of P( Y y ) .

Page 1: P( Y  y ) .

Let X be a continuous type random variable with p.d.f. f(x) where f(x) > 0 for a < x < b, where a = – and/or b = + is possible; we also let F(x) = P(X x) be the distribution function for X (i.e., F /(x) = f(x)). Suppose Y = u(X) where u is a continuous function.

One method for finding the p.d.f. of the random variable Y is the distribution function method. To use this method, one first attempts to find a formula for the distribution function of Y, that is, a formula for G(y) = Then, the p.d.f. of Y is obtained by taking the derivative of the distribution function, that is, the p.d.f. of Y is g(y) =

P(Y y) .G /(y) .

Section 5.1

Page 2: P( Y  y ) .

1.

(a)

(i)

Suppose X is a random variable with p.d.f. f(x) = 1/x2 if 1 < x .

Find the p.d.f. of Y = ln(X) by using

the distribution function method,

X has p.d.f. f(x) = 1 / x2 if 1 < x . The space of Y = ln(X) is{y : 0 < y}.

If 0 < y, the distribution function for Y is G(y) = P(Y y) =

P(ln(X) y) =

P(X ey) =

ey

f(x) dx =

ey

1

1— dx = x2

1– — = x

x = 1

ey

1 – e–y

The distribution function of Y is G(y) =if y < 0

if 0 y

0

1 – e–y

The p.d.f. of Y is g(y) = G (y) = e–y if 0 < y

We recognize that Y has an distribution.exponential(1)

Page 3: P( Y  y ) .

Let X be a continuous type random variable with p.d.f. f(x) where f(x) > 0 for a < x < b, where a = – and/or b = + is possible; we also let F(x) = P(X x) be the distribution function for X (i.e., F /(x) = f(x)). Suppose Y = u(X) where u is a continuous function.

One method for finding the p.d.f. of the random variable Y is the distribution function method. To use this method, one first attempts to find a formula for the distribution function of Y, that is, a formula for G(y) = Then, the p.d.f. of Y is obtained by taking the derivative of the distribution function, that is, the p.d.f. of Y is g(y) =

P(Y y) .G /(y) .

Another method for finding the p.d.f. of the random variable Y is the change-of-variable method. This method can be used when u is either a strictly increasing function from a to b (i.e., u /(x) > 0 for a < x < b) or a strictly decreasing function from a to b (i.e., u /(x) < 0 for a < x < b) The two cases can be described as follows:

Section 5.1

Page 4: P( Y  y ) .

Case 1: Suppose u(x) is strictly increasing (u /(x) > 0) for a < x < b.

The space of Y = u(X) is {y | u(a) < y < u(b)} .

P(Y y) = P(u(X) y) = P[u–1(u(X)) u–1(y)] =

P[X u–1(y)] =

a

f(x) dx =

u–1(y)

F(u–1(y)) – F(a) = G(y) .

We now find the p.d.f. of Y to be g(y) = G /(y) =

F(u–1(y)) – F(a) = d—dy

d[u–1(y)]f(u–1(y)) ————

dy

Look at Class Exercise #1(a)(ii) while doing this derivation.

Page 5: P( Y  y ) .

Case 2: Suppose u(x) is strictly decreasing (u /(x) < 0) for a < x < b.

The space of Y = u(X) is {y | u(b) < y < u(a)} .

P(Y y) = P(u(X) y) = P[u–1(u(X)) u–1(y)] =

P[X u–1(y)] =

b

f(x) dx =

u–1(y)

F(b) – F(u–1(y)) = G(y) .

We now find the p.d.f. of Y to be g(y) = G /(y) =

d—dy

d[u–1(y)]– f(u–1(y)) ————

dyF(b) – F(u–1(y)) =

This must be negative since u and u–1 are both decreasing functions.

Look at Class Exercise #1(b)(ii) while doing this derivation.

Page 6: P( Y  y ) .

In either case, we find that the p.d.f of Y is

g(y) = d[u–1(y)]f(u–1(y)) ————

dy u(a) < y < u(b) (in Case 1)if u(b) < y < u(a) (in Case 2)

Return to Class Exercise #1(a)

Page 7: P( Y  y ) .

(ii) the change-of-variable method.X has p.d.f. f(x) = 1 / x2 if 1 < x .

Y = ln(X) u(x) = ln(x) is for 1 < x .increasing

The space of Y is {y : u(1) < y} = {y : 0 < y}.

y = u(x) = ln(x) x = u–1(y) = ey

d— u–1(y) =dy

ey

The p.d.f. of Y is g(y) = d

f(u–1(y)) — u–1(y) = dy

1—— | ey | = (ey)2

e–y if 0 < y

Return to Class Exercise #1(a)

Page 8: P( Y  y ) .

(b)

(i)

Find the p.d.f. of Y = 1 / X by using

the distribution function method,

X has p.d.f. f(x) = 1 / x2 if 1 < x. The space of Y = 1 / X is {y : 0 < y < 1}.

If 0 < y < 1, the distribution function for Y is G(y) = P(Y y) =

P(1 / X y) =

P(X 1 / y) =

1 / y

f(x) dx =

1 / y

1— dx = x2

1– — = x

x = 1 / y

y

The distribution function of Y is G(y) =

if y < 0

if 0 y < 1

if 1 y

0y

1

The p.d.f. of Y is g(y) = G (y) = 1 if 0 < y < 1

We recognize that Y has a distribution.U(0,1)

Page 9: P( Y  y ) .

(ii) the change-of-variable method.

X has p.d.f. f(x) = 1 / x2 if 1 < x .Y = 1 / X u(x) = 1 / x is for 1 < x .decreasingThe space of Y is {y : 0 < y < u(1)} = {y : 0 < y < 1}.

y = u(x) = 1 / x x = u–1(y) = 1 / y

d— u–1(y) =dy

– 1 / y2

The p.d.f. of Y is g(y) = d

f(u–1(y)) — u–1(y) = dy

1 —— | – 1 / y2 | =(1 / y)2

1 if 0 < y < 1

Page 10: P( Y  y ) .

(c)

(i)

Find the p.d.f. of Y = X2 by using

the distribution function method,X has p.d.f. f(x) = 1 / x2 if 1 < x . The space of Y = X2 is {y : 1 < y}.

If 1 < y, the distribution function for Y is G(y) = P(Y y) =

P(X2 y) =

P(X y) =

y

f(x) dx =

y

1

1— dx = x2

1– — = x

x = 1

y 11 – — y

The distribution function of Y is G(y) =if y < 1

if 1 y

0 11 – — y

The p.d.f. of Y is g(y) = G (y) = 1— if 1 < y2y3/2

We find that Y has a distribution not in one of the families we studied.

Do part (c) for homework!

Page 11: P( Y  y ) .

(ii) the change-of-variable method.

X has p.d.f. f(x) = 1 / x2 if 1 < x .Y = X2 u(x) = x2 is for 1 < x .increasing

The space of Y is {y : u(1) < y} = {y : 1 < y}.

y = u(x) = x2 x = u–1(y) = y

d— u–1(y) =dy

1——2y

The p.d.f. of Y is g(y) = d

f(u–1(y)) — u–1(y) = dy

1 1—— —— =(y)2 2y

1— if 1 < y2y3/2

Page 12: P( Y  y ) .

Important Theorems in the Text:

Suppose F(x) is the distribution function of a continuous type random variable whose space is a < x < b, where a = – and/or b = + is possible (i.e., F(x) is strictly increasing on a < x < b). Then if Y is U(0, 1), the random variable X = F–1(Y) is a continuous type random variable with distribution function F(x).

Theorem 5.1-1

Since Y is U(0, 1), then if 0 < y < 1, the distribution function for Y is P(Y y) = y . We need to show that P(X x) = F(x) .The distribution function for X is P(X x) = P[F–1(Y) x]

=P[F(F–1(Y)) F(x)] =

P[Y F(x)] =

F(x) .

Go to Class Exercise #2(a).

Page 13: P( Y  y ) .

2.

(a)

Suppose values of a U(0,1) random variable U are read with four decimal place accuracy from a random number table. Indicate how

we can simulate 4 independent observations of a random variable X with p.d.f. f(x) = 1 / x2 if 1 < x ;

For 1 < x , we have F(x) = P(X x)

=

x

f(t) dt =

x

1

1— dt = t2

1– — = t

t = 1

x 1

1 – — x

The distribution function for X is F(x) =if x < 1

if 1 x

0 11 – — x

Let u = F(x) = 1 – 1/x . Then, x = F –1(u) = 1 / (1 – u)

To simulate 4 values of X, we first obtain 4 values of U, say u1 , u2 , u3 , u4 , from the random number table, and then we calculatex1 = 1 / (1 – u1) , x2 = 1 / (1 – u2) , x3 = 1 / (1 – u3) , x4 = 1 / (1 – u4) .

Compare this exercise with the proof of Theorem 5.1-1

Page 14: P( Y  y ) .

Suppose X is a continuous type random variable whose space is a < x < b, where a = – and/or b = + is possible , and whose distribution function is F(x) (i.e., F(x) is strictly increasing on a < x < b). Then the random variable Y = F(X) is U(0, 1).

Theorem 5.1-2

To show that Y is U(0, 1), we must show that if 0 < y < 1, the distribution function for Y is P(Y y) =y .P(Y y) =

P(F(X) y) =

P[F–1(F(X)) F–1(y)] =P[X F–1(y)] =F (F–1(y)) = y .

Compare Class Exercise #1(b) with the proof of this theorem.

Page 15: P( Y  y ) .

(b) we can simulate 4 independent observations of a random variable Y with p.d.f g(y) = 2 / y3 if 1 < y ;

For 1 < y , we have P(Y y) =

y

g(t) dt =

y

1

2— dt = t3

1– — = t2

t = 1

y 1

1 – — y2

The distribution function for Y is G(y) =if y < 1

if 1 y

0 11 – — y2

Let u = G(y) = 1 – 1/y2 . Then, y = G –1(u) = (1 – u)–1/2

To simulate 4 values of Y, we first obtain 4 values of U, say u1 , u2 , u3 , u4 from the random number table, and then we calculatey1 = (1 – u1)–1/2 , y2 = (1 – u2)–1/2 , y3 = (1 – u3)–1/2 , y4 = (1 – u4)–1/2 .

Skip to part (c), and do part (b) for homework!

Page 16: P( Y  y ) .

(c) we can simulate 4 independent observations of a random variable W having a Weibull distribution with = 5/3 and = 1/27.

The distribution function for W is G(w) =if w 0

if 0 < w

01 – e–243w5/3

Let u = G(w) = 1 – e . Then, w = G –1(u) =–243w5/3[–ln(1 – u)]3/5 / 27

To simulate 4 values of W, we first obtain 4 values of U, say u1 , u2 , u3 , u4 , from the random number table, and then we calculatew1 = [–ln(1 – u1)]3/5 / 27 , … , w4 = [–ln(1 – u4)]3/5 / 27.

The random variable W has p.d.f. g(w) = H /(w)e–H(w) if w > 0 , where H(w) = 243w5/3.

Page 17: P( Y  y ) .

3.

(a)

(b)

Suppose X is a random variable with p.m.f. f(x) = (4x + 3) / 80 if x = 2, 3, 5, 7 ,

and Y is a random variable with p.m.f. g(y) = 1 / 2y if y = any positive integer .

Find the p.m.f. for each of V = X2 and W = Y2.

The space of V is {4, 9, 25, 49}.

The p.m.f. of V is h1(v) = (4v + 3) / 80 if v = 4, 9, 25, 49 .

The space of W is {1, 4, 9, … }.

The p.m.f. of W is h2(w) = 1 / 2w if w = 1, 4, 9, … .

Suppose values of a U(0,1) random variable U are read with four decimal place accuracy from a random number table. Indicate how we can

Page 18: P( Y  y ) .

simulate 3 independent observations of X,

simulate 3 independent observations of Y.

X =

2 if

3 if

5 if

7 if

0.0000 U 0.1374

0.1375 U 0.3249

0.3250 U 0.6124

0.6125 U 0.9999

Y =

1 if2 if3 if4 if...

0.0000 U 0.49990.5000 U 0.74990.7500 U 0.87490.8750 U 0.9374

.

.

.

To simulate 3 values of X, we first obtain 3 values of U, say u1 , u2 , u3 , from the random number table, and then we obtain the corresponding values of X from letting

To simulate 3 values of Y, we first obtain 3 values of U, say u1 , u2 , u3 , from the random number table, and then we obtain the corresponding values of Y from letting

Go to Class Exercise #2(d)

Page 19: P( Y  y ) .

(d) we can simulate 3 independent observations of a random variable W with p.m.f h(w) = 1 / w if w = 2, 3, 6 ;

To simulate 3 values of W, we first obtain 3 values of U, say u1 , u2 , u3 , from the random number table, and then we obtain the corresponding values of W from letting

W =

2 if

3 if

6 if

0.0000 U 0.4999

0.5000 U 0.8332

0.8333 U 0.9999

Go to Class Exercise #2(d)

Do #2(d) for homework!

Page 20: P( Y  y ) .

1 if

0 if0.0000 U 0.6999

0.7000 U 0.9999

An easy way to do this is to first simulate 5 independent Bernoulli trials with the probability of a one (1) being equal to 0.7, say x1 , x2 , x3 , x4 , x5 , and then calculate

y = 5

xkk = 1

(e) we can simulate 5 independent Bernoulli trials with the probability of a one (1) being equal to 0.7 ;

First obtain 5 values of U, say u1 , u2 , u3 , u4 , u5 , from the random number table, and then we determine the corresponding values of the 5 independent Bernoulli trials to be

(f) we can simulate one observation of a random variable with a b(5,0.7) distribution.

Page 21: P( Y  y ) .

4.

(a)

(b)

(c)

Suppose X is a random variable with p.d.f. f(x) = 1/10 if –5 < x < 5, and let Y = X2.

What type of distribution does X have?

Explain why the change-of-variable method cannot be used to find the p.d.f. of Y.

Use the distribution function method to find the p.d.f. of Y.

X has a distribution.U(–5 , 5)

The function u(x) = x2 needs to be either always increasing or always decreasing for –5 < x < 5 in order to use the change-of-variables method, and neither of these is true.

The space of Y = X2 is {y : 0 < y < 25}.

If 0 < y < 25, the distribution function for Y is

G(y) = P(Y y) =

P(X2 y) =

P(– y X y) =

y

–y

f(x) dx =

Skip to #5, and do #4 for homework!

Page 22: P( Y  y ) .

y

– y

f(x) dx =

y

–y

1— dx =10

x— =10

x = –y

yy— 5

The distribution function of Y is G(y) =

if y < 0

if 0 y < 25

if 25 y

0

y— 5

1

The p.d.f. of Y is g(y) = G (y) = 1—— if 0 < y < 2510y1/2

We find that Y has a distribution not in one of the families we studied.

Page 23: P( Y  y ) .

5.

(a)

(b)

Suppose X is a random variable with p.d.f. f(x) = x–1/2/4 if 0 < x < 4, and let Y = (X – 1)2.

Explain why the change-of-variable method cannot be used to find the p.d.f. of Y.

Use the distribution function method to find the p.d.f. of Y.

The function u(x) = (x – 1)2 needs to be either always increasing or always decreasing for 0 < x < 4 in order to use the change-of-variables method, and neither of these is true.

The space of Y = (X – 1)2 is {y : 0 < y < 9}.

If 0 < y < 9, the distribution function for Y is

G(y) = P(Y y) =

P((X – 1)2 y) =

P(–y X – 1 y) if 0 < y < 1

P(–1 X – 1 y) if 1 < y < 9

Page 24: P( Y  y ) .

If 0 < y < 1, P(–y X – 1 y) = P(1–y X 1+y) =

1+y

1–y

f(x) dx =

1+y

1–y

1—— dx =4x

x— = 2

x = 1–y

1+y

(1+y)1/2 – (1 –y)1/2

———————— 2

If 1 < y < 9, P(–1 X – 1 y) = P(0 X 1+y) =1+y

0

f(x) dx =

1+y

0

1—— dx =4x

x— = 2

x = 0

1+y

(1+y)1/2

————2

Page 25: P( Y  y ) .

if 0 < y 1

g(y) =

if 1 < y < 9

The distribution function of Y is if y < 0

if 0 y < 1

if 1 y < 9

if 9 y

0

(1+y)1/2 – (1 –y)1/2

———————— 2

1

G(y) =

(1+y)1/2

———— 2

1 1—————— + ——————8 (1+y)1/2 y 8 (1–y)1/2 y

1——————8 (1+y)1/2 y

The p.d.f. of Y is G (y) =

Page 26: P( Y  y ) .

6.

(a)

(i)

Suppose X is a random variable with p.d.f. f(x) = x–1/2/4 if 0 < x < 4, and let Y = 1 / X .

Find the p.d.f. of Y = 1 / X by using

the distribution function method,X has p.d.f. f(x) = x–1/2/4 if 0 < x < 4 .

The space of Y = 1 / X is {y : 1/4 < y }.If 1/4 < y , the distribution function for Y is G(y) = P(Y y)

=P(1 / X y) =

P(X 1 / y) =

1 / y

f(x) dx =

4

1 / y

1—— dx =4x

x— = 2x = 1 / y

4 1

1 – —— 2y

The distribution function of Y is G(y) =if y < 1/4

if 1/4 y

0 11 – —— 2y

The p.d.f. of Y is g(y) = G (y) = 1— if 1/4 < y4y3/2

Do #6 and #7 for homework!

Page 27: P( Y  y ) .

(ii) the change-of-variable method.

X has p.d.f. f(x) = x–1/2/4 if 0 < x < 4 .

Y = 1 / X u(x) = 1 / x is for 0 < x < 4 .decreasing

The space of Y is {y : u(4) < y < u(0)} = {y : 1/4 < y}.

y = u(x) = 1 / x x = u–1(y) = 1 / y

d— u–1(y) =dy

– 1 / y2

The p.d.f. of Y is g(y) = d

f(u–1(y)) — u–1(y) = dy

1 —— | – 1 / y2 | =41/y

1— if 1/4 < y4y3/2

Page 28: P( Y  y ) .

(b)

(i)

Find the p.d.f. of Y = X by using

the distribution function method,X has p.d.f. f(x) = x–1/2/4 if 0 < x < 4 .

The space of Y = X is {y : 0 < y < 2}.

If 0 < y < 2, the distribution function for Y is G(y) = P(Y y) =

P(X y) =

P(X y2) =

y2

f(x) dx =

y2

0

1—— dx =4x

x— = 2x = 0

y2

y— 2

The distribution function of Y is

if y < 0

if 0 y < 2

if 2 y

0 y— 2

1

G(y) =

The p.d.f. of Y is g(y) = G (y) = 1— if 0 < y < 2 2

We recognize that Y has a distribution.U(0,2)

Page 29: P( Y  y ) .

(ii) the change-of-variable method.

X has p.d.f. f(x) = x–1/2/4 if 0 < x < 4 .

The space of Y is {y : u(0) < y < u(4)} = {y : 0 < y < 2}.

y = u(x) = x x = u–1(y) = y2

d— u–1(y) =dy

2y

The p.d.f. of Y is g(y) = d

f(u–1(y)) — u–1(y) = dy

1 —— | 2y | =4y2

1— if 0 < y < 2 2

Page 30: P( Y  y ) .

7. Suppose X is a random variable with p.d.f. f(x) = x–1/2/4 if 0 < x < 4. Find the p.d.f. of Y = X – 2 .

The p.d.f. of Y is g(y) = 1———— if – 2 < y < 24 y + 2