contestada

1. The random variable X follows a distribution with the following probability density function
f(x) = 2x exp(-x²), x ≥ 0.
(a) Show that the cumulative distribution function for X is F(x) = 1 – exp(-x²).
(b) Calculate P(X ≤ 2). [4 marks] [1 mark]
(c) Explain how to use the inversion method to generate a random value of X. [7 marks]
(d) Write down the R commands of sampling one random value of X by using inversion method. Start with setting random seed to be 100. [6 marks]