Tutorial 10 Erindale: Thu@3pm 970327 =========== St George: Thu@6pm CSC354, Spring 1997 Tutorial notes, T10 ========================================================================= Announce: - ps3 due next week (Apr 3) - next week is the last tutorial Topics: - Take up questions about ps3 - Problems from L&K Ch. 11 (Problems 11.1 and 11.2) [This is related to Ch. 13 in BCN] ========================================================================= The problems for this week's tutorial are from Law and Kelton Chapter 11. These questions are related to Chapter 13 in BCN (actually just the part on independent sampling and correlated sampling for variance reduction). 11.1 Some VRTs are nearly costless (e.g., CRN), but others could entail considerable extra cost (e.g., external CV), and this must be taken into account when deciding whether a particular VRT is worth it. Let V0 be the appropriate variance measure with a straightforward simulation (without using a VRT) and let V1 be the corresponding variance measure using a particular VRT. Also, let C0 and C1 be the costs of making a particular number of runs of a particular length with the straightforward and VRT approaches, respectively. Find conditions on V0, V1, C0, and C1 for which the VRT would be advisable. 11.2 In Section 11.2 in L&K, and specifically in Figure 11.1 (this figure was shown in tutorial), we considered the question of whether CRN would induce the desired positive correlation for a given pair of alternative configurations, or whether it might backfire. Consider the following simple Monte Caro examples, where U represents a random number: (1) X1j = U^2 and X2j = U^3 (2) X1j = U^2 and X2j = (1-U)^3 (a) Sketch the graphs of the responses in both examples. (b) For each example, analytically find Cov(X1j,X2j). (c) For each example, analytically find calculate Var(X1j,X2j) under both independent sampling and CRN. 11.2 SOLUTION ------------- (b) First note that for any positive integer k, E(U^k) = integral from 0 to 1 of u^k du = 1 / (k+1), since U ~ U(0,1), and recall that for any two random variables A and B, COV(A,B) = E(AB) - E(A)E(B). Example (1) E(X1j) = E(U^2) = 1/3 E(X2j) = E(U^3) = 1/4 Cov(X1j,X2j) = E(X1j X2j) - E(X1j)E(X2j) = E(U^5) - (1/3)(1/4) = 1/6 - 1/12 = 1/12 ~= .0833 Since this covariance is positive, CRN should lead to a variance reduction. This is consistent with the graph for Example(1), which we make for part (a), showing that the two curves are monotone in the same direction. Example (2) E(X1j) = E(U^2) = 1/3 E(X2j) = E((1-U)^3) = E(U^3) = 1/4 (Since 1-U ~ U(0,1) as well) Cov(X1j,X2j) = E(X1j X2j) - E(X1j)E(X2j) = E(U^2 (1-U)^3) - (1/3)(1/4) = E(-U^5+3U^4-3U^3+U^2) - 1/12 = -E(U^5)+3E(U^4)-3E(U^3)+E(U^2) - 1/12 = -1/6 + 3(1/5) - 3(1/4) + 1/3 - 1/12 = -1/15 ~= - .0667 Since this covariance is negative, CRN will backfire (i.e., variance will be increased instead of decreased). This might have been anticipated by looking at the graph for Example (2) in part (a), where the curves are monotone in opposite directions. reduction. This is consistent with the graph for Example(1), which we make for part (a), showing that the two curves are monotone in the same direction. (c) Recall that for any two random numbers A and B, Var(A-B)=Var(A)+Var(B)-2Cov(A,B), and that Var(A) = E(A^2) - [E(A)]^2. Example (1) Var(X1j) = Var(U^2) = E(U^4) - [E^(U^2)]^2 = 1/5 - (1/3)^2 = 4/45 Var(X2j) = Var(U^3) = E(U^6) - [E^(U^3)]^2 = 1/7 - (1/4)^2 = 9/112 (i) independent sampling Var(X1j-X2j) = Var(X1j) + Var(X2j) = 4/45 + 9/112 = 853/5040 ~= .1692 (ii) CRN Var(X1j-X2j) = Var(X1j) + Var(X2j) - 2Cov(X1j,X2j) = 4/45 + 9/112 - 2(1/12) = 13/5040 ~= .0026 So we would expect a variance reduction of some 98% from CRN. Intuitively this strong variance reduction is due to the fact that the relationship between X1j and X2j is nearly linear, as can be seen from the plot in part (a). Example (2) Var(X1j) = Var(U^2) = E(U^4) - [E^(U^2)]^2 = 1/5 - (1/3)^2 = 4/45 Var(X2j) = Var((1-U)^3) = Var(U^3) = E(U^6) - [E^(U^3)]^2 = 1/7 - (1/4)^2 = 9/112 (Since 1-U ~ U(0,1)) (i) independent sampling Var(X1j-X2j) = Var(X1j) + Var(X2j) = 4/45 + 9/112 = 853/5040 ~= .1692 (ii) CRN Var(X1j-X2j) = Var(X1j) + Var(X2j) - 2Cov(X1j,X2j) = 4/45 + 9/112 - 2(-1/15) = 1525/5040 ~= .3026 Thus CRN increases the variance by some 79% due to the negative covariance, so it backfires (i.e., variance is not reduced).