Math 300 , Spring 2004, Day38, W, May 5Hit reload ...After class

Continuing with Two random variables X, Y "jointly distributed".  Now Ash 8.1
 Two random variables X, Y  measured on the same experiment.
Sample space:  points in x-y space.
   Probability of a region:  sum or integrate over the region.
Continuous (p. 171 ff + Probability Handout) Joint density function f(x, y)--a surface above the base x-y space.
    Probability of a region R  in x-y space= area under f(x,y) and above the region.
The total probability (area) has to = 1.
"Marginal" probability/density function:

- - - - - -  - - - - - -
 Visualizations:  (Mac 110 4 center machines: Class Materials/Math 300/DPGraph Lab 04/For300 Class
f(x,y) = x+y, 0<x<1, 0<y<1.  Cardboard model.
     fX(x) = x + 1/2, 0<x<1
Probability Handout problem #17:  Density f(x,y) = Cx(1+y), 0<x<1, 0<y<2.
   Found C = 1/2.  Found fX(x) = 2x, 0<x<1.   fY(y) = (1+y)/4, 0<y<2.
New:  subfolder "Conditional pics"--also Ash's  2xy on y<2x,  2e-x-y on y>x.  To see conditional slices in rectangular supports, do Scrollbar --x (or y).  To see slices in nonrectangular supports, do Scrollbar --a (if needed).  Slide right scrollbar.
--- --- --- --- --- ---
Conditional distributions: Assuming a particular x value is true/known (xo),  what is the distribution of Y?
 Continuous:  same formulas as discrete, integration instead of sums.
   Think of slicing through the joint density at xo--look at f(xo,y)--the slice.
   The conditional density fY|x(y|xo) has the shape of the slice, but the slice may not have area 1.
              If we divide by  fX(xo), it will.
The conditional probability density of Y given xo:
        fY|x(y|xo) = f(xo, y)/fX(xo)
   For a single particular number x, you can plug in that number, and then everything is in y.
        Is it a density? For a particular number x, integrate (sum) over all the y's.  The integral over the y's of f(xo,y) = fX(xo).
             So the sum over all the y's of fY|x(y|xo) = fX(xo)/fX(xo) = 1.  So the conditional density is a "legal" density.

  Conditional Expectation E(Y|xo):The mean y value, when x is a particular fixed value xo.
      Treat xo as a constant and find the Integral  of  y fY|x(y|xo) dy.
    Remember "Regression problem" in statistics:  For a particular xo, predict the "best" y-value.
           ("best" in some sense or other--average, typical...)
       In probability (the abstraction from data), E(Y|xocan play that role.
             Find it for "all" xo's, and graph it on the x-y plane.
Handout: Multivariate distributions of the Continuous Type: Example 3.7-2 ff.   Uniform (flat) so intuition can check asnwers.
--Find the conditional densities and the conditional expectations for the two functions above:
   See DPGraph pictures--slicing x  will give shape of conditional density given x.  Must  divide by fX(x) to get area = 1.
f(x,y) = x(1+y)/2, 0<x<1, 0<y<2.  fX(x) = 2x, 0<x<1.   fY(y) = (1+y)/4, 0<y<2.
  (didn't look at.  X,Y indep. so conditionals = marginals.)
f(x,y) = x+y,  0<x<1, 0<y<1.  fX(x) = x + 1/2, 0<x<1  (did)
Another? f(x,y) = 2e-x-y , y>x, x>0. (looked at DPGraph. )
  FYI, fX(x) = 2e-2x, 0<x.   fY(y) =2e-y (1-e-y), 0<y
   fX|y(x|y) = e-x/(1-e-y)= , 0<x <y, for y >0 
  fY|x(y|x) =ex-y , x<y<oo, for x >0, an "exponential" (lambda=1) with starting point x.
                  (x-y = -(y-x). y-x is time after starting point x, where "real" times are x and y.)
  E(Y|x) = xSooyex-ydy  =exxSooye-ydy {integrate by parts or use ash p. 95, a = -1} =  ex[e-y(-y -1)y=x]oo
     ex[0 - (e-x(-x -1))] = 1+x.  Note this is linear in x!
            (E(Y|x) is Consistent with our interpretation of  fY|x  as exponential (lambda = 1) with starting point x.)
Caution: if support of f(x,y) isn't rectangular, you have to keep track of possible values of x and y.

Astonishing(?) fact:  IF E(Y|x) is linear in x, it will coincide with the (abstraction of) the  familiar least squares regression line formula.
--- --- --- --- --- --- --- --- ---
HW:  Ash 8.1 covers conditional for continuous only.  Does a good job.   Read it and handout. Use DPGraph to visualize examples.
Multivariate ...Continuous handout:
  problem 3.7-6 .  Flat surface so you can check your answers with your intuition.
  B. (this is checking the equation in the middle of the second page of the handout.)
  C. (I  did  this in class.  The cardboard model.  DPGraph " x+y f(y given x)" shows the density and fX. Slicing on x will show the shape of the conditional on x, and the number (fX(x)) to divide by to get area 1.  DPGraph "x+y E(y given x)"  is the same, with an added surface which draws the curve E(Y|x) in the x-y plane.  Slicing on x will show that it does look like  the mean of the y's at each x. Write it up. ALSO graph E(Y|x) for 0<x<1, plotting at least 5 points.)
Added problem:  Go through the writeup above for  f(x,y) = 2e-x-y , y>x, x>0, checking my work.  Slice the DPGraph picture and check on the plausibility of the conditional formulas.
Ash, p. 249, #2, #5a, #3.

I figured out "slicing by x".  If it loads with slicing by x chosen in the Scrollbar menu it won't slice by x.  Choose Off, close the scrollbar menu, open it again and choose slice by x.  Then it should work, on any of the pictures. (Making cutting with the parameter a redundant, where i put that in.)  Use whatever helps you with the visualization.


Sievers home
 Math300-Sp04/Day38.htm 
4pm
5/5/04
This page belongs to Sally Sievers who is solely responsible for its content. Please see our statement of responsibility.