sample The values 1(U1), 1(U2), 1(U3), accomplish the U1, U2, U3, F F F ….. … job. The Cauchy random variable has distribution function = . To set up the inverse, F(x) use = and solve for This will lead to . Generate independent uniform random u x. variables and then use U1, U2, U3,… for the Cauchy sample. The exponential random variable has distribution function = 1 for 0. F(x) – e – x x ≥ The solution to = is = - log(1 Generate independent uniform random u F(x) x u). – variables and then use log(1 log(1 log(1 as the U1, U2, U3,… U1), U2), U3), – – – … exponential sample. In practice, this gets made even simpler. Just observe that and 1 U U – have the same distribution. The exponential sample can be made as log(U1), log(U2), log(U3), This is a saving, of course; it just … saves one subtraction for each generated number. Suppose that you want to simulate a sample from the density = . The cumulative distribution function is = . The solution to = is = . Generate F(x) u F(x) x independent uniform random variables and then use for the desired U1, U2, U3,… sample. You’ll probably invoke the simpler” remark just above to create the “even sample as This is a wonderful idea, but it doesn’t solve all your problems. This does not help you with simulating discrete random variables. Sometimes you will not be able to find 1 in a closed from. The normal cumulative F distribution function, for example, cannot be inverted.
sample U1, U2, U3, ….. The values F 1(U1), F 1(U2), F 1(U3), … accomplish the job. The Cauchy random variable has distribution function F(x) = . To set up the inverse, use u = and solve for x. This will lead to . Generate independent uniform random variables U1, U2, U3,… and then use for the Cauchy sample. The exponential random variable has distribution function F(x) = 1 – e – x for x ≥ 0. The solution to u = F(x) is x = - log(1 – u). Generate independent uniform random variables U1, U2, U3,… and then use log(1 – U1), log(1 – U2), log(1 – U3), … as the exponential sample. In practice, this gets made even simpler. Just observe that U and 1 – U have the same distribution. The exponential sample can be made as log(U1), log(U2), log(U3), … This is a saving, of course; it just saves one subtraction for each generated number. Suppose that you want to simulate a sample from the density = . The cumulative distribution function is F(x) = . The solution to u = F(x) is x = . Generate independent uniform random variables U1, U2, U3,… and then use for the desired sample. You’ll probably invoke the “even simpler” remark just above to create the sample as This is a wonderful idea, but it doesn’t solve all your problems. This does not help you with simulating discrete random variables. Sometimes you will not be able to find F 1 in a closed from. The normal cumulative distribution function, for example, cannot be inverted.
SimulationTheorem.docx