Bivariate Distributions Wen-Guey Tzeng Computer Science Department National Chiao Tung University Bivariate distribution Motivation: multiple factors affect the result • The relation of annual incomes and years of education • The age distribution for married couples • Investment return between stocks and bonds • Life span of incomes, races, areas, smoking, … 2 Example • Xavier and Yvette are two real estate agents. Let X and Y denote the number of houses that Xavier and Yvette will sell next week, respectively. 3 0.42 p(x,y) 0.21 0 1 2 0 0.12 0.42 0.06 1 0.12 0.06 0.03 2 0.07 0.02 0.01 0.12 0.06 0.06 0.07 0.02 0.01 Y X=0 y=0 X 0.03 y=1 y=2 X=1 X=2 4 Joint probability mass function (joint pmf) • Let X and Y be discrete random variables defined on the same sample space S • X’s value set is A and Y’s value set is B • The joint pmf of X and Y is 𝑝 𝑥, 𝑦 = 𝑃 𝑋 = 𝑥, 𝑌 = 𝑦 where 𝑝 𝑥, 𝑦 = 1 𝑥∈𝐴 𝑦∈𝐵 5 6 Marginal pmf • X’s marginal probability mass function is 𝑝𝑋 𝑥 = 𝑦∈𝐵 𝑝 𝑥, 𝑦 • Y’s marginal probability mass function is 𝑝𝑌 𝑦 = 𝑥∈𝐴 𝑝 𝑥, 𝑦 7 Joint cumulative distribution function (Joint cdf) 8 • A small college has 90 male and 30 female professors. An ad-hoc committee of 5 is selected at random to write the vision and mission of the college. • Let X and Y be the number of men and women on this committee, respectively. (a) Find the joint pmf of X and Y. (b) Find pX and pY, the marginal pmf’s of X and Y. 9 Sol: 90 30 x y (a ) p ( x, y ) 120 5 0 if x, y {0, 1, 2, 3, 4, 5}, x y 5 otherwise. 90 30 x 5 x (b) p X ( x) , x {0, 1, 2, 3, 4, 5}, 120 5 90 30 5 y y pY ( y ) , y {0, 1, 2, 3, 4, 5}. 120 5 • Roll a balanced die and let the outcome be X. • Then toss a fair coin X times and let Y denote the number of tails. • What is joint probability function? • What are pX and pY? 11 Sol: y pX(x) 0 1 2 3 4 5 6 1 1/12 1/12 0 0 0 0 0 1/6 2 1/24 2/24 1/24 0 0 0 0 1/6 3 1/48 3/48 3/48 1/48 0 0 0 1/6 4 1/96 4/96 6/96 4/96 1/96 0 0 1/6 5 1/192 5/192 10/192 10/192 5/192 1/192 0 1/6 6 1/384 6/384 15/384 20/384 15/384 6/384 1/384 1/6 63/384 120/384 99/384 64/384 29/384 8/384 1/384 x pY(y) 12 Joint probability density function (joint pdf) • Continuous random variables X and Y, defined on the same sample space, have a joint pdf f(x,y) on R2, if for any region S in the xy-plane P(( X , Y ) S ) f ( x, y )dxdy. S where f ( x, y)dxdy 1 R2 Properties (a) P(X a, Y b) a a b b f ( x, y )dxdy 0 (b) P(a X b, c Y d) b a (c) P(X A, Y B) A B d c f ( x, y )dxdy f ( x, y )dxdy 16 Marginal pdf • X’s and Y’s marginal probability density functions are f X ( x) f ( x, y )dy fY ( y ) f ( x, y )dx Joint (cumulative) distribution function • X and Y’s joint distribution function is F (t , u ) P( X t , Y u ) - t, u . • X’s marginal distribution function is FX (t ) P( X t ) P( X t , Y ) F (t , ) Similarly FY (u ) P(Y u ) F (, u ) Suppose that the joint density function of X and Y is f ( x, y ) F ( x, y ) P ( X x, Y y ) y x f (t , u )dtdu. Assuming that the partial derivatives of F exist, we get 2 f ( x, y ) F ( x, y ). xy x Moreover, FX ( x) F ( x,) ( f (t, u )dt )du x x ( f (t, u )du )dt f X (t )dt , y and similarly, FY (y) fY (u )du. And FX' ( x) f X ( x), FY' ( y ) fY ( y ) • The joint density function of random variables X and Y is given by xy 2 f ( x, y ) 0 0 x y 1 otherwise. (a) Determine the value of (b) Find the marginal density function of X and Y 22 1 1 0 x (a) ( xy 2 dy ) dx 1 1 3 1 1 ( y dy )xdx [ y ] x xdx 0 x 0 3 1 1 1 3 ( x ) xdx 0 3 3 10 10 1 10 2 (b) f X ( x ) 10 xy dy x (1 x 3 ), 0 x 1 x 3 1 1 fY ( y ) 2 y 0 1 10 xy 2 dx 5 y 4 , 0 y 1 23 For 0, let 1 e ( x y ) F ( x, y ) 0 if x 0, y 0 otherwise. Determine if F is the joint distribution function of 2 random variables X and Y. 24 If F is the joint density of X and Y then 2 F ( x, y ) is the joint density function of X and Y. xy But 3 ( x y ) e F ( x, y ) xy 0 2 if x 0, y 0 otherwise. Since F ( x, y ) 0, it cannot be a joint density function. xy Therefore, F is not a joint distribution function. 2 25 • A circle of radius 1 is inscribed in a square with sides of length 2. • A point is selected at random from the square • What is the probability that the point is within the circle. y x 26 c f ( x, y ) 0 where if 0 x 2, 0 y 2 otherwise, f ( x, y )dxdy 0, implying c 1/4. Now let R be the region inside the circle. 1 dxdy . 4 4 R 27 • Let S be a subset of the plane with area A(S). • A point is randomly selected from S • For any subset R of S with area A(R), the probability that R contains the point is A(R)/A(S). 28 • A man invites his fiancee to a fine hotel for a Sunday brunch. • They decide to meet in the lobby of the hotel between 11:30 A.M. and 12 noon. • They arrive at random times during this period. • What is the probability that they will meet within 10 minutes? 29 • Sol: S {( x, y ) : 0 x 30, 0 y 30} R {( x, y ) S : | x y | 10} So the desired probability is 500/900 5/9 30 30 30 Theorem. Let f(x,y) be the density function of X and Y. If h is a function of two variables from R2 to R, then Z=h(X,Y) is a random variable with the expected value E (Z ) h( x, y ) f ( x, y )dxdy. 31 Corollary For X and Y, E(X+Y) = E(X) + E(Y) Proof: E( X Y ) ( x y ) f ( x, y )dxdy xf ( x, y )dxdy yf ( x, y )dxdy EX EY . 32 • Let X and Y have joint density function 3 2 ( x y 2 ) if 0 x 1, 0 y 1 f ( x, y ) 2 otherwise. 0 Find E(X2+Y2) 33 Sol: E( X Y ) 2 2 ( x 2 y 2 ) f ( x, y )dxdy 3 2 2 2 ( x y ) dxdy 0 0 2 3 1 1 4 14 2 2 4 ( x 2 x y y )dxdy . 2 0 0 15 1 1 34 Independent random variables Definition. Two random variables are independent if, for A, B, in R, the events {XA} and {YB} are independent P( X A, Y B) P( X A) P(Y B) • Using the axioms of probability, we can prove that X and Y are independent iff for any real numbers a and b, P( X a, Y b) P( X a ) P(Y b) Theorem. Let X and Y be two random variables defined on the same sample space. If F is the joint distribution function of X and Y, then X and Y are independent ∀ reals 𝑡, 𝑢 𝐹 𝑡, 𝑢 = 𝐹𝑋 𝑡 𝐹𝑌 (𝑢) Theorem. Let X and Y be two discrete random variables defined on the same sample space. If p(x, y) is the joint probability function of X and Y, then X and Y are independent iff ∀ reals 𝑥, 𝑦 𝑝 𝑥, 𝑦 = 𝑝𝑋 𝑥 𝑝𝑌 (𝑦) Theorem. Let X and Y be two continuous random variables defined on the same sample space. If f(x, y) is the joint density function of X and Y, then X and Y are independent iff ∀ reals 𝑥, 𝑦 𝑓 𝑥, 𝑦 = 𝑓𝑋 𝑥 𝑓𝑌 (𝑦) • Store A and B, which belong to the same owner, are located in 2 different towns. • If the density function of the weekly profit of each store, in thousands of dollars, is given by x / 4 if 1 x 3 f ( x) otherwise, 0 • The profit of one store is independent of the other. • What is the probability that next week one store makes at least $500 more than the other store? Sol: Let X and Y denote next week' s profits of A and B, respectively. The desired probability is P( X Y 1/2) P( Y X 1/2) 2P( X Y 1/2). x / 4 if 1 x 3 f X ( x) otherwise, 0 y / 4 if 1 y 3 and fY ( y ) otherwise. 0 xy / 16 if 1 x 3, 1 y 3 So f ( x, y ) otherwise. 0 2 P( X Y 1/ 2) 2 P(( X,Y ) {( x, y ) : 3 / 2 x 3, 1 y x 1 / 2}) 3 2 ( 3/ 2 x 1 / 2 1 xy 1 3 xy 2 x 1/ 2 dy )dx [ ]1 dx 16 8 3/ 2 2 1 3 x[( x 1 / 2) 2 1]dx 16 3 / 2 1 3 3 3 549 2 ( x x x)dx 0.54 16 3 / 2 4 1024 • Prove that 2 random variables X and Y with the following joint density function are not independent. 8 xy 0 x y 1 f ( x, y ) otherwise. 0 Sol: 1 f X ( x) 8 xydy 4 x(1 x 2 ), 0 x 1, x y fY ( y ) 8 xydx 4 y 3 , 0 y 1. 0 Now since f ( x, y ) f X ( x) fY ( y ), X and Y are dependent. This is expected because of the range 0 x y 1, which is not a Cartesian product of 1 - dim regions. • Theorem. Let X and Y be independent random variables and g: RR and h: RR be real-valued functions; then g(X) and h(Y) are also independent random variables. • Theorem. Let X and Y be independent random variables and g: RR and h: RR be real-valued functions; then E[g(X)h(Y)]=E[g(X)]E[h(Y)] By the above theorem, if X and Y are independent, then E(XY)=E(X)E(Y) But, the converse is not necessarily true. • Let X be a r. v. with p(-1)=p(0)=p(1) =1/3. • Letting Y=X2, we have • • • • E(X)=(-1+0+1)/3=0, E(Y)=E(X2)=((-1)2+02+(1)2)/3=2/3, E(XY)=E(X3)=((-1)3+03+(1)3)/3=0. Thus E(XY)=E(X)E(Y) • Clearly, X and Y are dependent. Conditional distributions • Definition. Let X and Y be two discrete random variables. The conditional probability function of X given that Y=y is p X |Y ( x | y ) P( X x | Y y ) P ( X x, Y y ) P(Y y ) p ( x, y ) , pY ( y ) where x A, y B, and p Y ( y ) 0. Note that p xA X |Y ( x | y) xA p ( x, y ) 1. pY ( y ) Hence for any fixed y B, p X |Y ( x | y ) is itself a probability function with the set of possibe values A. Similar to p X |Y ( x | y ), the conditional distribution function of X, given that Y y is defined as follows : FX |Y ( x | y ) P( X x | Y y ) P( X t | Y y ) p X |Y (t | y ). tx tx • Definition. Let X and Y be two continuous random variables with joint density f(x, y). The conditional density function of X given that Y=y is: f ( x, y ) f X |Y ( x | y ) , fY ( y ) provided that f Y ( y ) 0. The conditional distribution function of X, given that Y y is defined as follows : x FX |Y ( x | y ) P( X x | Y y ) f X |Y (t | y )dt. d Therefore, FX |Y ( x | y ) f X |Y ( x | y ) dt • Let X and Y be continuous random variables with joint density function 3 2 2 ( x y ) if 0 x 1, 0 y 1 f ( x, y ) 2 0 otherwise. Find f X |Y ( x | y ) Sol : fY ( y ) 3 2 3 2 1 2 f ( x, y )dx ( x y )dx y . 0 2 2 2 1 Thus 3 / 2( x y ) 3( x y ) f X |Y ( x | y ) 2 (3 / 2) y 1 / 2 3y2 1 for 0 x 1 and 0 y 1. Everywhere else, f X |Y ( x | y ) 0. 2 2 2 2 • Definition. The conditional expectation of the random variable X given that Y=y is (discrete) E ( X | Y y ) xpX |Y ( x | y ), where pY ( y ) 0. xA (continuous) E ( X | Y y ) x f X |Y ( x | y )dx, where fY ( y ) 0. • Calculate the expected number of aces in a randomly selected poker hand that is found to have exactly 2 jacks. Sol: Let X be the number Aces in a hand. Let Y be the number of Jacks in a hand. 3 p ( x,2) E ( X | Y 2) xp X |Y ( x | 2) x pY ( 2) x A x 0 4 4 44 2 x 3 x 52 4 44 3 5 x 3 x x x 0.25. 4 48 48 x 0 2 3 3 52 5 • Let X and Y be continuous random variables with joint density function e y f ( x, y ) 0 Find E(X | Y 2). if y 0, 0 x 1 elsewhere. Sol : 1 f ( x ,2 ) e 2 E ( X | Y 2) x f X |Y ( x | 2)dx x dx x dx. 0 0 fY ( 2) fY ( 2) 1 1 1 0 0 But fY (2) f ( x,2)dx e 2dx e 2 ; therefore, e 2 1 E ( X | Y 2) x 2 dx . 0 e 2 1
© Copyright 2025 ExpyDoc