Question: 1. For an actuarial task you need to produce samples from a random variable X with the following pdf: 2 f (I) = Ta2 a2

1. For an actuarial task you need to produce samples from a random variable X with the following pdf: 2 f (I) = Ta2 a2 if I E (-a, a) if x & (-a, a), where a > 0 is some constant. (a) Work out and write down the acceptance-rejection algorithm for this task, where you give the extra auxiliary random variable that you need a Unif(-a, a) distribution. [4 marks] (b) Fix a = 1. Implement your algorithm from part (a) in R, and use it to approximate the variance of X using 10 samples. [4 marks]
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
