Hello,

I was wondering if someone could help me with a question given in the tutorial at uni.

The probability density function is

f(x) = (1/2)(x+1) 1 < x <= 2

= (1/2) 2 < x <= 3

= 0 elsewhere

Now to generate values of the random variable, we have to use the inverse transform method and the rejection method.

If anyone, could show me how to solve this equations or equations like the one above, that would be appreciated.

Thanks in advance