Homework Problem 9, Due Monday Oct 12. -------------------------------------- (a) Generate 1000 independent batches of 20 i.i.d. random 2-vectors (X_i,Y_i), i=1,..,20 for which X has a standard logistic distribution, and conditionally given X Y/X ~ Unif(3/4, 5/4) --------------------------------------------- NOTE: this means that Y = XU where U ~ Unif(3/4, 5/4) and X is independent of U. --------------------------------------------- Give some distributional checks or graphical evidence to show persuasively that you have simulated the joint (X,Y) distribution correctly. (b) The objective of this simulation is to evaluate E( (Y_(10) - X_(10))^2 ) (*) where the subscript _(10) refers to the 10th order statistic (ie the 10th smallest observation) within the batch. One method of evaluating the expectation (*) is by a direct simulation: perform (and time!) a simulation of 10000 batches and find (*) as a direct empirical average of 10000 quantities (Y_(10) - X_(10))^2 that you simulate. Explore whether you can speed up the simulation, while obtaining accuracy at least as good as with your first method, by using fewer simulation replications and applying the "method of control variates" with control variate (X_(10))^2 . RECALL: THE METHOD OF CONTROL VARIATES IS ESSENTIALLY A REGRESSION METHOD. This order statistic distribution (the 10th order statistic from a Unif[0,1] sample of size 20) is known by a standard exercise to be Beta(10,11). The desired expectation cannot easily be evaluated using a numerical integral. But since each Y is proportional to X, we might expect Y_(10) to be roughly proportional to X_(10), so that (Y_(10) - X_(10))^2 will be roughly proportional to (X_(10))^2. So the method [see Sec 4.2 of Sec3NotF09.pdf] involves simulating pairs (V,W) = (X_(10))^2, (Y_(10)-X_(10))^2) for each batch of 20 pairs (X_i,Y_i), noting that we can calculate E(X_(10)^2) = c quickly and to high precision by a numerical integral, and then fitting a regression model W_r = a + b*(V_r-c) + e_r , r=1,...,R via least squares (where e_r) is independent of V_r and has mean 0, with the idea that the desired expectation (*) is the estimated value of a. The variance of the estimate should be approximately (1/R) times the estimated variance of the errors e_r , and use the confidence interval based on this variance in assessing the precision of your Method 2 simulation.