9. Simulation To avoid such waste of effort and time, we could have used the following scheme:
10. Simulation (Continuous case) To simulate the observation of continuous random variables we usually start with uniform random numbers and relate these to the distribution function of interest. Let X is a continuous random variable with cumulative distribution function F(x), then U = F(X) is uniformly distributed on [0, 1]. So to find a random observation x of X, we select u an n-digit uniform random number and solve equation u = F(x) for x as x = F -1(u).
11. Further, to generate a random sample of size r from X, we take a sequence of r independent n-digit uniform random numbers say u1, u2, âŠ., ur, and then generate x1, x2, âŠ., xrwhere xi = F -1(ui); i = 1, 2, âŠ..,r.
12. Uniform Random Numbers Uniform random numbers:A uniform random number u is a random observation from the uniform distribution on [0,1]. This can be done as under: Let u = .d1d2âŠâŠ. where the digits d1, d2, âŠâŠ are independent and each diis chosen giving equal chance to the 10 digits 0, 1, 2, âŠ, 9. We call u a uniform random number.
13. Box-Mullar Method Box-Mullar Method Consider two independent standard normal random variables whose joint density is given by
14. Box-Mullar Method Under a change to polar coordinates, z1 = r cosï±, z2 = r sinï±, find the joint density of r and ï± and further show that (i) r and ï± are independent and r and ï± has uniform distribution on the interval from 0 to 2ï°; (ii) u1 = ï± / 2 ï° and u2 = 1 â have independent uniform distributions; (iii) The following relations between (u1, u2) and (z1, z2) hold.