Solutions to Eercise Sheet 5 jacques@ucsd.edu. Let X and Y be random variables with joint pdf f(, y) = 3y( + y) where and y. Determine each of the following probabilities. Solutions. a. P (X ). b. P (X + Y ). c. P (X Y ). (a) P (X ) =. (b) where A is the region P (X + Y ) = f(, y)ddy A A = {(, y) :, y, + y } = {(, y) :, y }. P (X + Y ) = 3y( + y)dyd =. For (c) the answer is 2, since f is symmetric in and y so P (X Y ) = P (X Y ) = 2. To do it directly, we have P (X Y ) = f(, y)ddy where B is the region B = {(, y) :, y, y} = {(, y) :, y }. B P (X Y ) = 3y( + y)dyd = 2. 4. Two points (X, Y ) and (U, V ) are chosen uniformly from the unit disc in R 2. Prove that the epectation of the square of the distance between the points is. What is the epected square of the distance between two points chosen uniformly and independently in the unit ball {(, y, z) : 2 + y 2 + z 2 }? Joint pdf of X and Y is h(, y) = π as π is the area of the disc D, and similarly the joint pdf of U and V is h(u, v) = π. So joint pdf of X, Y, U and V by independence is f(, y, u, v) = h(, y)h(u, v) = π 2 (, y), (u, v) D. The epectation E is the integral over D D of (( u) 2 + (y v) 2 )f(, y, u, v). We convert to polar coordinates: (, y) becomes (r, θ) and (u, v) becomes (s, φ). Then E = π 2 2π 2π rs[(r cos θ s cos φ) 2 + (r cos sin s sin φ) 2 ]dθdrdφds.
Note the appearance of rs for change of variable from (, y) to (r, θ) and from (u, v) to (s, φ). Now the integrand simplifies to rs(r 2 + s 2 2rs cos θ cos φ 2rs sin θ sin φ). The integral of cos θ and sin θ is zero over θ 2π so we are left with E = π 2 2π as required. 2π rs(r 2 + s 2 )dθdrdφds = π 2 4π2 (r 3 s + s 3 r) = 5. Let X be a random variable with pdf f() = 3 2 for < < and f() = otherwise. Find the pdf g(y) of the following functions Y = h(x). a. Y = X 2. b. Y = X/(X + ). c. Y = e X. d. Y > such that X 2 + Y 2 =. Solution to 5b. The formula for the pdf of g(y) is g(y) = f(h(y)) h (y) where h is the inverse of the function /( + ). The range of this function is [, 2 ] since. h(y) h(y) + = y h(y) = y y for y 2. This gives h (y) = for y 2. g(y) = 3h(y) 2 ( y) 2. ( y) 2 = 3y2 ( y) 4 7. Determine () the marginal pdfs f X and f Y, as well as (2) the conditional pdfs f Y X= and f X Y =y for the random variables X and Y with the joint pdf f(, y) given below. (3) State in each case whether X and Y are independent random variables and (4) determine E(X) and E(Y ) and E(X Y = y) and E(Y X = ). a. f(, y) = 2( + y), y. b. f(, y) = 4( y), < <, < y <. c. f(, y) = 2y( y), < <, < y <, < + y <. d. 4 f(, y) = π π(+y 2 ) e 2,, y. 2
Solution to 7c. The formulas are f X () = f(, y)dy f Y X= (y) = f(, y) f X () and similarly for f Y (y), f X Y =y () and E(X Y = y). formulas, f X () = f Y X= (y) = E(Y X = ) = E(Y X = ) = yf Y X= (y)dy The above quantities are, using the 2y( y)dy = 2( ) 3 for 6y( y) ( ) 3 for y 6y 2 ( y) ( ) 3 dy = ( ). 2 Since everything is symmetric in and y, the same formulas hold when X and Y are interchanged, so f Y (y) = 2( y) 3 y for y, f X Y =y () = 6( y)/( y) 3 for y and E(Y X = ) = 2 ( y). 8. Let Y U[, ] and let X Ep(Y ). Determine the joint pdf of X and Y and find E(X) and E(X Y 2 ). We have f(, y) = f Y (y)f X Y =y () and since f Y (y) = for y and f X Y =y () = ye y for, f(, y) = ye y for, y. Then by definition E(X) = Integrating by parts with respect to y, we get So ye y dyd. ye y dy = e ( + ). E(X) = e ( + ) d. If, then e ( + ) e ( + ) = 2/e. E(X) 2/e d = ( 2/e) d. This integral diverges, and so E(X) does not eist. Net we want to find E(X Y 2 ). Doing the inner integral as before, E(X Y 2 ) = E(X Y 2 ) = /2 ye y dyd. e /2 ( + /2) d. For 2, the numerator is at least 2/e as before, so again E(X Y 2 ) does not eist. 3
. Define a random parabola to be the graph of y = a 2 + b + c where a, b, c U[, ] are independent random variables. What is the probability that a random parabola does not intersect the -ais? The quadratic equation a 2 + b + c = has two solutions if b 2 > 4ac. If ac <, this is guaranteed to occur. The probability we want is P (ac < ) + P (b 2 > 4ac, ac > ). We know P (ac < ) = 2 since a and c are independent uniform [, ] random variables: P (ac < ) = P (a <, c > )+P (a >, c < ) = P (a < )P (c > )+P (a > )P (c < ) = 2 2 + 2 2 = 2. For the second probability, we have P (b 2 > 4ac, ac > ) = P (b 2 > 4ac, a >, c > ) + P (b 2 > 4ac, a <, c < ) = 2P (b 2 > 4ac, a >, c > ) = 4P (b > 2 ac, a >, c > ). Here we used the fact that b > 2 ac and b < 2 ac are events with the same probability. The joint pdf of a, b and c is f(a, b, c) = 8 by independence, since each has pdf 2 on [, ]. P (b > 2 ac, a >, c > ) = 8 dbdadc where Rewriting the inequalities, A = {(a, b, c) : a >, c >, b > 2 ac, a, c, b }. A = {(a, b, c) : < a, < c, 2 ac < b }. The third inequality says ac 4 or c 4a. So the region splits into two pieces: A = {(a, b, c) : < a /4, < c, 2 ac < b < } A and A 2 = {(a, b, c) : /4 < a, < c /4a, 2 ac < b < }. P (b > 2 ac, a >, c > ) = /4 2 ac 8 dbdcda+ /4 So finally, the probability of cutting the -ais in two points is /4a 2 + 4 5 + 6 ln 2 4 + 6 ln 2 =.627. 288 72 2 ac 5 + 6 ln 2 dbdcda =. 8 288 4
Solution to question 4: The unit ball (not required). For the unit ball B, the distance is (X U) 2 + (Y V ) 2 + (Z W ) 2 between the uniformly chosen points (X, Y, Z) and (U, V, W ). So the epectation is ( u) 2 + (y v) 2 + (z w) 2 f(, y, z, u, v, w)dwdvdudzdyd. (,y,z) B (u,v,w) B Here the joint pdf is f(, y, z, u, v, w) = (4π/3) 2 = 9 6π 2 for (, y, z), (u, v, w) B since the volume of the ball is 4 3π. The integral is best done in spherical co-ordinates. Recall in spherical = r cos θ sin φ, y = r sin θ sin φ, z = r cos φ. Using (r, θ, φ) for (, y, z) and (s, δ, ψ) for (u, v, w), the distance simplifies to r 2 +s 2 2rs cos φ cos ψ 2rs cos θ cos δ sin φ sin ψ 2rs sin θ sin δ sin φ sin ψ = r 2 +s 2 α β γ. For the change of variables (, y, z) to (r, θ, φ), we incur r 2 sin φ and for the change of variables (u, v, w) to (s, δ, ψ) we incur s 2 sin ψ. Integrating over θ, the terms βr 2 s 2 sin φ sin ψ and γr 2 s 2 sin φ sin ψ disappear. Integrating over φ, the term αr 2 s 2 sin φ sin ψ disappears too. The integral is 9 6π 2 2π π 2π π [r 2 + s 2 ]r 2 s 2 sin φ sin ψdθdφdrdδdψds = 6 5. So the epected distance between two uniform points in B is 6/5. 5