Question 3 (50%).
Assume that a source of U(0, 1) random numbers U1, U2, ... is readily available. Consider the following probability density function (PDF) of the continuous random variable X:
f(x) = {
(3/4)x(2 - x)^2, if 0 <= x <= 2
0, otherwise
(a) A majorizing function of f(x) is given by:
t(x) = {
3x, if 0 <= x < 1/3
1, if 1/3 <= x < 4/3
(3/4)(2 - x), if 4/3 <= x <= 2
0, otherwise
Using the majorizing function t(x), construct an algorithm for generating independent and identically distributed (IID) random variates for X by the acceptance-rejection method. Show all steps explicitly and clearly.
(b) Assume that the following uniform random numbers are available:
0.6, 0.8, 0.5, 0.1, 0.3, 0.7.
Generate the first X by your algorithm in (a).