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.