Joint probability distributions Let X and Y be two discrete rv s defined on the sample space S. The joint probability mass function p(x, y) is p(x, y) = P(X = x, Y = y). Note p(x, y) and x y p(x, y) = 1. P[(X, Y ) A] = (x,y) A p(x, y). The marginal probability mass function of X and Y, denoted by P X (x) and P Y (y) are P X (x) = y p(x, y), P Y (y) = x p(x, y).
Example Let X = number of meals in restaurants and Y = number of movies a randomly selected JMU student has on a typical weekend. The joint pmf of X and Y is given by y p(x, y) 1 2 3 x.5.12.1.8 1.6 red.12.11.9 2.3.6.5.5 3.3.2.2.1 P(Y 2) = p(, 2) + p(1, 2) + p(2, 2) + p(3, 2) + p(, 3) + p(1, 3) + p(2, 3) + p(3, 3) =.51 The marginal distributions are: p X () =.35, p X (1) =.38, p X (2) =.19, p X (3) =.8 p Y () =.17, p Y (1) =.32, p Y (2) =.28, p Y (3) =.23.
Exercise Let X=number of heads and Y=number of heads minus the number of tails obtained in 3 flips of a balanced coin. Get the joint probability distribution of X and Y.
Joint pdf Let X and Y be continuous rv s, then f (x, y) is the joint probability density function for X and Y if for any two-dimensional set A P[(X, Y ) A] = A f (x, y)dxdy. In particular, P(a X b, c Y d) = b a d c f (x, y)dydx. The marginal probability density function of X and Y, denoted by f X (x) and f Y (y), are given by f X (x) = f (x, y)dy and f Y (y) = f (x, y)dx.
Example* Given the joint pdf f (x, y) = P( < X <.3, < Y <.5) =.3.3 ( 2 3 xy + 2 3 y 2 ) y=.5 dx =.3 f X (x) = 1 f Y (y) = 1 2 { 2 3 (x + 2y), < x < 1, < y < 1, otherwise ( 1 3 x + 1 6.5 2 3 (x + 2y)dydx = )dx = x2 6 + x 6.3 =.2 3 (x + 2y)dy = ( 2 3 xy + 2 3 y 2 ) 1 y= = 2 3 (x + 1), < x < 1 2 3 (x + 2y)dx = 1 3 (1 + 4y), < y < 1.
exercise Given the joint pdf f (x, y) = Find P( < X < 1 2, < Y < 1). Find f Y (y). { 3 5x(y + x), < x < 1, < y < 2, otherwise
1 P( < X < 1 2, < Y < 1) =.5 =.5 3 5 x( y 2 2 + xy) 1 y= dx =.5 ( 3 ( 3 2 x 2 + 1 5 x 3 ).5 = 5 8 =.625. 3 5x(y + x)dydx 1 x + 3 5 x 2 )dx = f Y (y) = 1 3 5 x(y +x)dx = ( 3 5 y x2 2 + 1 5 x 3 ) 1 x= = 3 1 y + 1 5, < y < 2. Check 2 ( 3 1 y + 1 5 )dy = ( 3 2 y 2 + 1 5 y) 2 = 1.
Example Given the joint pdf { 24xy, x 1, y 1, x + y 1 f (x, y) =, otherwise Let A = {(x, y) : x 1, y 1, x + y.5}, then P[(X, Y ) A] =.5.5 x 24xydydx =.625. f X (x) = f (x, y)dy = 1 x 24xydy = 12x(1 x) 2, x 1.
Independent rv s Two rv s X and Y are said to be independent if for every pair of (x, y), p(x, y) = P X (x)p Y (y), when X and Y are discrete or f (x, y) = f X (x)f Y (y) when X and Y are continuous. example: meals and movie example: p(, ) =.5 p X () p Y () =.35.17. example *: f X (x)f Y (y) = 2 3 (x + 1) 1 3 (1 + 4y) f (x, y), so X and Y are dependent.
Expected values, covariance and correlation Let X and Y be two rv s with joint pmf p(x, y) or f (x, y), then { E(h(X, Y )) = x y h(x, y)p(x, y), if X and Y are discrete h(x, y)f (x, y)dxdy, if X and Y are continuous The covariance between X and Y is Cov(X, Y ) = E[(X µ X )(Y µ Y )] { = x y (x µ X )(y µ Y )p(x, y), X, Y discrete (x µ X )(y µ Y )f (x, y)dxdy, X, Y continuous proposition: Cov(X, Y ) = E(XY ) µ X µ Y.
example Meals and movies example: y p(x, y) 1 2 3 p(x) x.5.12.1.8.35 1.6.12.11.9.38 2.3.6.5.5.19 3.3.2.2.1.8 p(y).17.32.28.23 Note µ X = xp(x) = 1, µ Y = yp(y) = 1.57, E(XY ) = x y xyp(x, y) = 1 1.12 + 1 2.11 + 1 3.9 + 2 1.6 + 2 2.5 + 2 3.5 + 3 1.2 + 3 2.2 + 3 3.1 = 1.5, so Cov(X, Y ) = E(XY ) µ X µ Y = 1.5 1 1.57 =.7
example Given the joint pdf { 24xy, x 1, y 1, x + y 1 f (x, y) =, otherwise f X (x) = f (x, y)dy = 1 x 24xydy = 12x(1 x 2 ), x 1. Similarly, f Y (y) = 12y(1 y 2 ), y 1, and µ X = µ Y = 2 5. E(XY ) = 1 1 x xy24xydydx = 8 Thus Cov(X, Y ) = 2 15 ( 2 5 )( 2 5 ) = 2 75. 1 x 2 (1 x) 3 dx = 2 15.
The correlation coefficient of X an Y, denoted by corr(x, Y), or ρ X,Y or just ρ, is Cov(X,Y ) ρ X,Y = σ X σ Y. Meals and movies example: E(X 2 ) = 1 2.38 + 2 2.19 + 3 2.8 = 1.86, σx 2 = 1.86 1 2 =.86, σ X =.927, and σ Y = 1.22, so ρ X,Y =.7.927 1.22 =.7 proposition: 1. If a and c are both positive or negative, Corr(aX + b, cy + d) = Corr(X, Y ). 2. 1 ρ 1. 3. If X and Y are independent, then ρ = but ρ = does not necessarily imply independence. 4. ρ = ±1 iff Y = ax + b for a.
Suppose X and Y are independent with pdf s f X (x) = 3x 2, x 1 f Y (y) = 2y, y 1. Find E( X Y ). Optional: Find P(X Y ).
The joint pdf of X and Y is f (x, y) = 6x 2 y, x 1, y 1. E( X Y ) = 1 1 ( x y )6x 2 ydxdy = 1.5. P(X Y ) = 1 x 6x 2 ydydx =.6
Suppose the joint pmf of discrete r.v.s X and Y is given by p(x, y) = kxy, x = 1, 2, y = 1, 2, 3 and k is an unknown constant. 1). Find the proper value for k. 2). Find the marginal probability distributions for X and Y.