45
Stat 310 Bivariate Transformations Garrett Grolemund

14 Bivariate Transformations

Embed Size (px)

Citation preview

Page 1: 14 Bivariate Transformations

Stat 310Bivariate Transformations

Garrett Grolemund

Page 2: 14 Bivariate Transformations

Pick up handout

Page 3: 14 Bivariate Transformations

1. Example

2. Bivariate transformations

3. Calculating probabilities

4. Distribution function technique

Page 4: 14 Bivariate Transformations
Page 5: 14 Bivariate Transformations
Page 6: 14 Bivariate Transformations
Page 7: 14 Bivariate Transformations
Page 8: 14 Bivariate Transformations
Page 9: 14 Bivariate Transformations
Page 10: 14 Bivariate Transformations
Page 11: 14 Bivariate Transformations

Suppose the basket is at (25, 0). Devise a

way to calculate each shot’s distance from

the basket using X and Y.

Question

Page 12: 14 Bivariate Transformations

Polar Coordinates

r = √((x - 25)2 + y2 )

Ө = tan-1 (y/x)

Page 13: 14 Bivariate Transformations

Polar Coordinates

r = √((x - 25)2 + y2 )

Ө = tan-1 (y/(x – 25))

Page 14: 14 Bivariate Transformations

(Transformations that involve two

random variables at a time)

Bivariate Transformations

Page 15: 14 Bivariate Transformations

Transformed Data

Page 16: 14 Bivariate Transformations
Page 17: 14 Bivariate Transformations
Page 18: 14 Bivariate Transformations
Page 19: 14 Bivariate Transformations

Your Turn

Suppose you own a portfolio of stocks. Let X1 be the amount of money your portfolio earns today, X2 be the amount of money it earns tomorrow, and so on…

How would you calculate U and V, where U is the amount of money you’ll make on your best day during the next week, and V is the amount you’ll make on your worst day?

Page 20: 14 Bivariate Transformations

Calculating Probabilities

Page 21: 14 Bivariate Transformations

What is the probability that

max(X1, X2 , X3 , X4 , X5 , X6 , X7) ≤ $100 ?

min(X1, X2 , X3 , X4 , X5 , X6 , X7) ≤ $ -100 ?

Page 22: 14 Bivariate Transformations

Recall from the univariate case, we have

two methods of calculating probabilities of

transformed variables

Distribution

function

technique

Change of

variable

technique

Page 23: 14 Bivariate Transformations

Distribution function technique

Page 24: 14 Bivariate Transformations

Suppose the Xi are iid. Is this a reasonable assumption?

Then, we can calculate Fv(a) by

P(V ≤ a) = P(min(Xi) ≤ a)

Page 25: 14 Bivariate Transformations

Suppose the Xi are iid. Is this a reasonable assumption?

Then, we can calculate Fv(a) by

P(V ≤ a) = P(min(Xi) ≤ a)

= 1 – P(min(Xi) > a)

Page 26: 14 Bivariate Transformations

Suppose the Xi are iid. Is this a reasonable assumption?

Then, we can calculate Fv(a) by

P(V ≤ a) = P(min(Xi) ≤ a)

= 1 – P(min(Xi) > a)

= 1 – P(all Xi > a)

Page 27: 14 Bivariate Transformations

= 1 – [P(X1 > a, X2 > a, … X7 > a)]

Page 28: 14 Bivariate Transformations

= 1 – [P(X1 > a, X2 > a, … X7 > a)]

= 1 – [P(X1 > a) P(X2 > a) … P(X7 > a) ]

Page 29: 14 Bivariate Transformations

= 1 – [P(X1 > a, X2 > a, … X7 > a)]

= 1 – [P(X1 > a) P(X2 > a) … P(X7 > a) ]

(Because the Xi are independent)

Page 30: 14 Bivariate Transformations

= 1 – [P(X1 > a, X2 > a, … X7 > a)]

= 1 – [P(X1 > a) P(X2 > a) … P(X7 > a) ]

(Because the Xi are independent)

= 1 – [P(X1 > a) P(X1 > a) … P(X1 > a) ]

Page 31: 14 Bivariate Transformations

= 1 – [P(X1 > a, X2 > a, … X7 > a)]

= 1 – [P(X1 > a) P(X2 > a) … P(X7 > a) ]

(Because the Xi are independent)

= 1 – [P(X1 > a) P(X1 > a) … P(X1 > a) ]

(because the Xi are identically distributed)

Page 32: 14 Bivariate Transformations

= 1 – [P(X1 > a, X2 > a, … X7 > a)]

= 1 – [P(X1 > a) P(X2 > a) … P(X7 > a) ]

(Because the Xi are independent)

= 1 – [P(X1 > a) P(X1 > a) … P(X1 > a) ]

(because the Xi are identically distributed)

= 1 – [P(X1 > a) 7 ]

Page 33: 14 Bivariate Transformations

= 1 – [P(X1 > a, X2 > a, … X7 > a)]

= 1 – [P(X1 > a) P(X2 > a) … P(X7 > a) ]

(Because the Xi are independent)

= 1 – [P(X1 > a) P(X1 > a) … P(X1 > a) ]

(because the Xi are identically distributed)

= 1 – [P(X1 > a) 7 ]

= 1 – [ (1 – P(X1 ≤ a) )7 ]

Page 34: 14 Bivariate Transformations

= 1 – [P(X1 > a, X2 > a, … X7 > a)]

= 1 – [P(X1 > a) P(X2 > a) … P(X7 > a) ]

(Because the Xi are independent)

= 1 – [P(X1 > a) P(X1 > a) … P(X1 > a) ]

(because the Xi are identically distributed)

= 1 – [P(X1 > a) 7 ]

= 1 – [ (1 – P(X1 ≤ a) )7 ]

= 1 – [ (1 – Fx(a) ) 7 ]

Page 35: 14 Bivariate Transformations

So P(V ≤ -100) = Fv(-100) = 1 – [ (1 – Fx(-100) ) 7 ]

We can find the density of V by differentiating:

fv(a) = Fv(a)

Page 36: 14 Bivariate Transformations

So P(V ≤ -100) = Fv(-100) = 1 – [ (1 – Fx(-100) ) 7 ]

We can find the density of V by differentiating:

fv(a) = Fv(a)

= {1 – [ (1 – Fx(a) ) 7 ]}

Page 37: 14 Bivariate Transformations

So P(V ≤ -100) = Fv(-100) = 1 – [ (1 – Fx(-100) ) 7 ]

We can find the density of V by differentiating:

fv(a) = Fv(a)

= {1 – [ (1 – Fx(a) ) 7 ]}

= -7(1 – Fx(a) ) 6 (1 - Fx(a))

Page 38: 14 Bivariate Transformations

So P(V ≤ -100) = Fv(-100) = 1 – [ (1 – Fx(-100) ) 7 ]

We can find the density of V by differentiating:

fv(a) = Fv(a)

= {1 – [ (1 – Fx(a) ) 7 ]}

= -7(1 – Fx(a) ) 6 (1 - Fx(a))

= 7(1 – Fx(a) ) 6 fx(a)

Page 39: 14 Bivariate Transformations

Your Turn

Work through the handout to find FU(a) and

fU(a).

Page 40: 14 Bivariate Transformations

What if we wish to find the joint distribution

FU,V(a,b)?

U = max(X, Y)

V = min(X, Y)

P(U < 2, V < 5) = ?

Page 41: 14 Bivariate Transformations

Probability as volume under a surface

X

Y

f(x,y)

Set A

P(Set A)

Page 42: 14 Bivariate Transformations

X

Y

f(x,y)

Set A

P(Set A)

P(U < 2, V < 5) = P( max(X, Y) < 5 min(X, Y) > 2)

P(U < 2, V < 5) = ∫5

2∫5

2fx,y (x,y) dx dy

Page 43: 14 Bivariate Transformations

But…

•Computing double integrals can

be hard

•Finding correct bounds can be

hard

r = √((x - 25)2 + y2 )

Ө = tan-1 (y/(x – 25))

Page 44: 14 Bivariate Transformations

Next time: Change of Variables

Page 45: 14 Bivariate Transformations

Read Section 3.4