Homework Problem Set 6, Due Wednesday September 27, 2017. -------------------------------------------------------- Assigned 9/20/2017, due 9/27: 16 points For each of the following four types of random variables or vectors, write an R function that you can use to generate (quickly!) 1000 independent copies of that kind of random object: (a) A random pair of random variables (X,Y) that is uniform on the subset of the Euclidean plane {(x,y): 0 <= x <= 2, 0 <= y <= 2 - (x-1)^2} (b) A random variable X with values in [0,2] and density f(x) = (1/6) x (1+x^2) , 0<= x <= 2 (c) A positive-valued random variable X with density f(x) proportional to exp(-x^(0.5)) on [0,\infty) (and density equal to 0 for negative x ) (d) A random pair of random variables (X,Y) with joint density f(x,y) = C exp(-x-y-2xy) for x,y>=0 (and equal to 0 for other x,y), for some constant C which you are to find. Can you write these functions so that they vectorize naturally, i.e., so that you can generate the random variable or vector pairs by evaluating the function at uvec generated as runif(1000) or array(runif(2000), c(1000,2)) without requiring a for-loop ?