Homework Problem Set 7, Due Wednesday October 4, 2017. ----------------------------------------------------- Assigned 9/25/2017, due 10/4: 12 points Write a function to generate [as quickly and efficiently as possible] each of the following two types of random variables or vectors. IN BOTH PARTS, GENERATE THE RANDOM VARIABLES WITH EXACTLY CORRECT DENSITY, BY AN ACCEPT-REJECT METHOD. Generate 1000 iid copies of each type of variable or vector, and present some kinds of test or graphical confirmation that your variables have the right density or distribution function. (a) A random vector (X_i,Y_i) with joint density f(x,y) on the positive quadrant equal to K xy/(1+x^2+y^2)^5 for x,y>0 and equal to 0 for other x,y. Here K is a constant > 0 for you to determine. [HINT: you may find that the random variables are easier to generate after transforming them to polar coordinates and then transforming them back to x,y coordinates.] (b) A random variable X_i with density f(x) = C*(1+abs(x))*exp(-x^2) for -1 < x < 1 and equal to 0 elsewhere, where C is a constant for you to determine. NEXT HOMEWORK WILL BE POSTED BY FRIDAY AND WILL BE DUE MONDAY 10/9.