Transcription of Examples: Joint Densities and Joint Mass Functions
1 AMS 311 Joe MitchellExamples: Joint Densities and Joint mass FunctionsExample 1:XandYare jointly continuous with Joint pdff(x, y) = cx2+xy3if 0 x 1, 0 y 20,otherwise.(a). Findc. (b). FindP(X+Y 1). (c). Find marginal pdf s ofXand ofY. (d). AreXandYindependent (justify!). (e). FindE(eXcosY). (f). Findcov(X, Y).We start (as always!) by drawing the support set. (See below, left.)21211y=1 xxyxysupport setBlue: subsetof support setwith y>1 x(a). We findcby setting1 =Z Z f(x, y)dydx=Z10Z20(cx2+xy3)dydx=2c3+13,soc= 1.(b). Draw a picture of the support set (a 1-by-2 rectangle), andintersect it with the set{(x, y) :x+y 1}, which is the region above the liney= 1 x. See figure above, compute the probability, we double integrate the Joint density over this subset of thesupport set:P(X+Y 1) =Z10Z21 x(x2+xy3)dydx=6572(c).
2 We compute the marginal pdfs:fX(x) =Z f(x, y)dy= R20(x2+xy3)dy= 2x2+2x3if 0 x 10otherwisefY(y) =Z f(x, y)dx= R10(x2+xy3)dx=13+y6if 0 y 20otherwise1(d). NO,XandYare NOT independent. The support set is a rectangle, so we need tocheck if it is true thatf(x, y) =fX(x)fY(y), for all (x, y). We easily find counterexamples:f( , )6=fX( )fY( ).(e).E(eXcosY) =Z10Z20(excosy)(x2+xy3)dydx(f).cov(X, Y) =E(XY) E(X)E(Y)=Z10Z20xy(x2+xy3)dydx Z10Z20x(x2+xy3)dydx Z10Z20y(x2+xy3)dydx example 2:XandYare jointly continuous with Joint pdff(x, y) = cxyif0 x,0 y,x+y 10,otherwise.(a). Findc. (b). FindP(Y > X). (c). Find marginal pdf s ofXand ofY. (d). AreXandYindependent (justify!).We start (as always!) by drawing the support set. (See below, left.)yy1y=x11xx1y=1 xof support setwith y>xBlue: subsetsupport (a).
3 We findcby setting1 =Z Z f(x, y)dydx=Z10Z1 x0cxydydx=c24,soc= 24.(b). Draw a picture of the support set (a triangle), and intersect it with the set{(x, y) :y x}, which is the region above the liney=x; this yields a triangle whose leftmostx-value is 0 and whose rightmostx-value is 1/2 (which is only seen by drawing the figure!).See figure above, right. To compute the probability, we double integrate the Joint densityover this subset of the support set:P(Y X) =Z1/20Z1 xx24xydydx2(c). We compute the marginal pdfs:fX(x) =Z f(x, y)dy= R1 x024xydy= 12x(1 x)2if 0 x 10otherwisefY(y) =Z f(x, y)dx= R1 y024xydx= 12y(1 y)2if 0 y 10otherwise(d). NO,XandYare NOT independent. The support set is not a rectangle or generalizedrectangle, so we know we can find points (x, y) where it fails to be true thatf(x, y) =fX(x)fY(y).
4 In particular,f( , ) = 06=fX( )fY( )> 3:XandYare jointly continuous with Joint pdff(x, y) = cxyif0 x 1,0 y 10,otherwise.(a). Findc. (b). FindP(|Y 2X| ). (c). Find marginal pdf s ofXand ofY. (d).AreXandYindependent (justify!).We start (as always!) by drawing the support set, which is just a unit square in this case.(See below, left.)111xx1y=2x + support setwith .1<y 2x<.1 Blue: subset(a). We findcby setting1 =Z Z f(x, y)dydx=Z10Z10cxydydx=c4,soc= 4.(b). Draw a picture of the support set (unit square), and intersect it with the set{(x, y) :|y 2x| }={(x, y) : y 2x }={(x, y) : 2x y 2x+ },which is the region above the liney= 2x and below the liney= 2x+ See figureabove, left. (You will not be able to figure out the limits of integration without it!)
5 Tocompute the probability, we double integrate the Joint density over this subset of the supportset:P(|Y 2X| ) = (y+ )/204xydxdy+ (y+ )/2(y )/24xydxdy3(c). We compute the marginal pdfs:fX(x) =Z f(x, y)dy= R104xydy= 2xif 0 x 10otherwisefY(y) =Z f(x, y)dx= R104xydx= 2yif 0 y 10otherwise(d). YES,XandYare independent, sincefX(x)fY(y) = 2x 2y= 4xyif 0 x 1 and 0 y 10otherwiseis exactly the same asf(x, y), the Joint density, for 4:XandYare independent continuous random variables, each with pdfg(w) = 2wif0 w 10,otherwise.(a). FindP(X+Y 1). (b). Find the cdf and pdf ofZ=X+ independent, we know thatf(x, y) =fX(x)fY(y) = 2x 2yif 0 x 1 and 0 y 10otherwiseWe start (as always!) by drawing the support set, which is a unit square in this case.(See below, left.)
6 4xy=1 x1y11x1y11x1y1y=z xyxz= z= xof support setwith x+y<1 Blue: subsetsupport setof support setwith x+y< : subsetof support setwith x+y< : subsetCase: 1<z<2 Case: 0<z<1(a). Draw a picture of the support set (unit square), and intersect it with the set{(x, y) :x+y 1}, which is the region below the liney= 1 x. See figure above, right. To computethe probability, we double integrate the Joint density over this subset of the support set:P(X+Y 1) =Z10Z1 x04xydydx=16(b). Refer to the figure (lower left and lower right). To compute the cdf ofZ=X+Y,we use the definition of cdf, evaluating each case by double integrating the Joint densityover the subset of the support set corresponding to{(x, y) :x+y z}, for different casesdepending on the value ofz:FZ(z) =P(Z z) =P(X+Y z) =P(Y X+z)= 0ifz 0Rz0Rz x04xydydxif 0 z 1R1 z0R104xydydx+R11 zRz x04xydydxif 1 z 21ifz 25 example 5:XandYare jointly continuous with Joint pdff(x, y) =(e (x+y)if0 x,0 y0, Find the pdf first thing we do is draw a picture of the support set (which in this case is the firstquadrant); see below, (1/z)xsupport setof support setwith (x/y)<z, for z>0 Blue: subsetTo find the density,fZ(z), we start, as always, by finding the cdf,FZ(z) =P(Z z),and then differentiating:fZ(z) =F Z(z).)
7 Thus, using the definition, and a picture of thesupport set, we start by handling the cases,FZ(z) =P(Z z) =P(X/Y z)= 0ifz <0P(Y (1/z)X) ifz >0,where we have used the fact thatXandYare both nonnegative (with probability 1), somultiplying both sides of the inequality byYdoes not flip the inequality; note, however,that when we divide both sides byz, to obtainY (1/z)X, we were making the assumptionthatz >0 (otherwise the inequality would flip).Now, we consider the picture of the support set, together with thehalfplane specifiedbyy (1/z)x; see the figure above, right. We double integrate the Joint density over theportion of the support set wherey (1/z)x, obtainingFZ(z) =P(Z z) =P(X/Y z)= 0ifz <0P(Y (1/z)X) ifz >0,=(0ifz <0R 0R (1/z)xe (x+y)dydx=zz+1ifz > , to get the pdf, we take the derivative:fZ(z) =(0ifz <0(z+1) 1 z 1(z+1)2=1(z+1)2ifz >06 example 6:XandYare independent, each with an exponential( ) distribution.))
8 Findthe density ofZ=X+Yand ofW=Y independent, we know thatf(x, y) =fX(x)fY(y), giving usf(x, y) = e x e yifx, y first thing we do is draw a picture of the support set: the first quadrant.(a). To find the density,fZ(z), we start, as always, by finding the cdf,FZ(z) =P(Z z),and then differentiating:fZ(z) =F Z(z). Thus, using the definition, and a picture of thesupport set together with the halfplaney x+z, we getFZ(z) =P(Z z) =P(X+Y z) =P(Y X+z)= 0ifz <0Rz0Rz x0 e x e ydydx= 1 e z ze zifz 0 This gives the pdf,fZ(z) = 0ifz <0 2ze zifz 0,which is the pdf of a Gamma(2, ). Thus,Zis Gamma(2, ) random variable.(b). To find the density,fW(w), we start, as always, by finding the cdf,FW(w) =P(W w), and then differentiating:fW(w) =F W(w). Thus, using the definition, and a picture ofthe support set together with the region specified byy x2+w, we getFW(w) =P(W w) =P(Y X2 w) =P(Y X2+w)=(R 0Rx2+w0 e x e ydydxifw >0R wRx2+w0 e x e ydydxifw <0 Then, we differentiate to getfW(w) =F W(w).)
9 (Go ahead and evaluate the integral, thentake the derivative.) example 7:XandYare jointly continuous with(X, Y)uniformly distributed over theunion of the two squares{(x, y) : 0 x 1,1 y 1}and{(x, y) : 0 x 1,3 y 4}.(a). FindE(Y). (b). Find the marginal Densities ofXandY. (c). AreXandYindependent? (d). Find the pdf ofZ=X+ to be provided. (possibly in class) example 8:XandYhave Joint densityf(x, y) = x+yif0 x, y 10, the Joint cdf,FX,Y(x, y), for allxandy. Compute the covariance and correlation to be provided. (possibly in class)7 example 9: Suppose thatXandYhave Joint mass function as shown in the table be-low. (Here,Xtakes on possible values in the set{ 2,2},Ytakes on values in the set{ 2,0,2, }.)-2 0 2 .08 .12 ..12 .18 .24(a). (6 points) ComputeP(|X+Y2|<1).
10 (b). (6 points) Find the marginal massfunction ofYand plot it. (be very explicit!)(c). (6 points) Computevar(X2 Y)andcov(X, Y). (d). (2 points) AreXandYindependent? (Why or why not?)Solution to be provided. (possibly in class) example 10: Two fair dice are rolled. LetXbe the larger of the two values shown onthe dice, and letYbe the absolute value of the difference of the two values thejoint pmf ofXandY. Computecov(X, Y),E(X),E(YX),P(X >2Y).The sample space is the setS={(1,1),(1,2), .. ,(6,6)}; there are 36 equally thatX {1,2, .. ,6}andY {0,1, .. ,5}.p(1,0) =P(X= 1, Y= 0) =P({(1,1)}) = 1/36, where (1,1) is the outcome in whichthe first die is a 1 and the second die is also a 1 (so that the larger die is 1 and thedifference of the two values is 0 ).