Problem 1 Suppose X ∼ U nif (0, 1), Y ∼ U nif (0, 1) are independent Z = X − Y . Be sure to density function for the dierence, uniform random variables in (0, 1). Find the probability clearly explain ALL your work, in particular the domain for all functions. Solution: First start with the cumulative distribution function: F (z) = P (Z ≤ z) = P (X − Y ≤ z) X −Y ≤ z . The region of integration is either z < 0. (We also notice that the probability is P (X − Y ≤ z) = 0 and P (Z − Y ≤ z) = 1 if z > 1 since the entire square is covered) You can think of this probability as the area of the square which has a triangle or a pentagon depending on if is z < −1, z>0 since none of the square is covered or See the diagram: X-Y < z when z > 0 X-Y < z when z < 0 From the diagram one can compute the areas above by using the formula should check that the width and height of the triangle are both z+1 when 1 2 × Base × Height for a triangle. You −1 < z < 0. The area of the pentagon region is found by subtracting the area of the triangle from the area of the square. 1 − z when 0 < z < 1. Putting this all 0 z ≤ −1 1 (z + 1)(z + 1) −1 ≤ z ≤ 0 2 P (X − Y ≤ z) = 1 1 − 2 (1 − z) (1 − z) 0 ≤ z ≤ 1 1 z≥1 0 z ≤ −1 1 (z + 1)2 −1 ≤ z ≤ 0 2 = 2 1 (1 − z) 0≤z≤1 1 − 2 1 z≥1 triangular region missing from the pentagon is The probability density function is the derivative of this: 0 z ≤ −1 (z + 1) −1 ≤ z ≤ 0 d f (z) = F (z) = dz (1 − z) 0 ≤ z ≤ 1 0 z≥1 This is a tent shaped function. 1 The base and height of the together gives: Problem 2 Suppose that W ∼ Exp(λ) is an U is chosen the random variable exponential random variable with parameter to be uniform in the range a) What is the joint density function b) Find f (w, u) for W and (0, W ) U ? Be sure λ. Conditionally on the value of W, to clearly indicate the domain. E[U ]. Solution: We interpret the following information from the problem statement (you needed to know the density function for a uniform and an expoential random variable) i) the density function for W is (this is because fW (w) ii) the conditional density of U given W W ∼ Exp(λ)) ( 0 w≤0 = −λw λe w≥0 is (this is because ( fU |W (u |w ) = 1 w 0 U is uniform in [0, W ]) 0<u<w u ≥ w or u ≤ 0 The solution to part a) follows by the formula that the joint density function is the product of these fW,U (w, u) = fU |W (u |w ) fW (w) fU |W (u |w ) = fW,U (w, u)/fW (w)...these are just ( λ −λw e w ≥ 0 and 0 < u < w fW,U (w, u) = w 0 otherwise (sometimes this is presented as Thus we have: rearrangements of each other) To do part b) directly we can just integrate against the pdf: ˆ ˆ E [U ] u · fW,U (w, u)dwdu = ˆ∞ ˆw u· = 0 λ −λw e dudw w 0 ˆ∞ = 1 2 λ −λw u e 2 w 0 w dw 0 ˆ∞ = = = λ −λw we dw 2 0 ∞ λ 1 −λw e 2 λ2 0 1 2λ Here is another sneaky way to do this problem using the fact that E [U ] = E [E [U |W ]] 1 = E W 2 1 1 = E [W ] = 2 2λ 2 E [U |W ] = 12 W :