# Monte Carlo simulation for generating random numbers from a distribution [closed]

Describe Monte Carlo simulation technique and mention its different steps. Also describe how would you generate random numbers from Weibull distribution with parameters (θ, β) .

In this question, I know what the Monte Carlo simulation technique is and the procedure to take random numbers out from a random number table to perform the experiment.
But I have come across many questions which say to generate random number from a certain distribution (here it is Weibull, and sometimes it is exponential); how can I write it in my answer sheet, because I know the command for this in Excel.

• Taking random (Uniform?) numbers out of a table has not been seen for many years! Commented Jun 14, 2021 at 6:19
• The Weibull distribution has a simple and invertible CDF (as does the exponential distribution), so just take random numbers uniform on $[0,1)$ and apply the inverse of the CDF Commented Jun 14, 2021 at 10:44
• @Xi'an actually I am preparing for a govt exam , and the pattern has been the same for more than 30 years , that's the reason Commented Jun 15, 2021 at 5:41

Taking as definition of the Weibull distribution that $$X\sim \mathfrak W(k,\lambda)$$ iff $$(X/\lambda)^k\sim\mathfrak E\text{xp}(1)$$, the generation of a Weibull realisation can proceed by
1. generating a Uniform $$\mathcal U(0,1)$$ realisation $$u$$ (or selecting one from a table)
2. turning it into an exponential realisation as $$y=-\log u$$
3. turning this exponential realisation into a Weibull realisation as$$x=\lambda y^{1/k}$$