The book I am following has a problem that states:
Let $U$ be a Standard Uniform random variable. Show all the steps required to generate
Then proceeds to list off questions on generating other random variables. In the solution I am following, it states "Given, $U\sim(0,1)$ and $U=0.3972$".
Where are they getting these "givens" from?
Edit, the full question is:
Let U be a Standard Uniform random variable. Show all the steps required to generate a) an Exponential random variable with the probability λ = 3.0;
Many statistical software programs use the 'Mersenne Twister' pseudorandom number generator. See this link for some information on this generator (the default in R) and other well vetted generators. More particularly, see Wikipedia on the Mersenne-Twister.
(There are no set rules for making a pseudorandom number generator, using congruential generators or otherwise. We know lots of things not to do, but no sure rules for success. Thus generators are tested using 'batteries' of problems that have proved difficult to simulate. A well-vetted generator is one that has passed many such tests.)
In R statistical software, the function
runifsamples the indicated number of observations from a uniform distribution. Thus the following R code samples $m = 10,000$ observations from $\mathsf{Exp}(\lambda = 3)$ according to the inverse CDF transformation shown by @peter 5 (+1).Histograms of the vectors
uandx, each containing $m$ elements, are shown below, along with the respective density functions.Notice that the plots show good agreement of the histograms of samples with the density functions of the respective distributions.
More formally, here are results of Kolmogorov-Smirnov goodness-of-fit tests based on the first 5000 observations in each sample (the samplie-size limit allowed by the implementation of this test in R). P-values far above 5% indicate that samples are consistent with the claimed distributions.