p.313, #7

Consider a sequence of independent Bernoulli trials, each with success probability p. Let X1 be the number of failures preceding the first success, and let X2 be the number of failures between the first two successes. Find the joint density of <X1, X2>. (Note: X1 and X2 are called "waiting times")

P.315, #21

Let f(x,y) = 24xy on for (x,y) in the set

S = {(x,y)| 0<=x<=1, 0<=y<=1, 0<= x+y<=1},

and f(x,y)=0 otherwise.

1) Find the marginal density fy(y).

I was thinking integral(f(x,y),dx,0,1-y)) bt doesn't seem right. (12y^3-24y^2+12y) The answer should satisfy that integral of f from -inf to inf should be 1. Right?

2) Find E[Y]