
Explanation:
To generate random variables from U(-1,5) using random variables from U(0,1), we use the inverse transform method.
For a uniform distribution U(a,b), the cumulative distribution function (CDF) is:
For X ~ U(-1,5):
So the CDF is:
To generate X from U ~ U(0,1), we solve for x in terms of u:
Now, for u = 0.10:
Therefore, the corresponding random variable from U(-1,5) is -0.40.
Verification:
Ultimate access to all questions.
No comments yet.