1. Let X be a random variable with a distribution function:
si means when
a) derivate F (by hand) in order to calculate the density of X
) Calculate E(X) and Var(X) (by hand) and provide details of your calculation
c) For all y ∈ (0, 1), calculate F −1 (y)
d) Use your answer in c) to write a code on MATLAB that simulates XXXXXXXXXXrandom variables for which the distribution function is given by F
e) Estimate E(X) and Var(X) on MATLAB and compare to answers found in b)
2. Let X be a random variable with a density :
si means when ;
Sinon means otherwise
a) Find the density g of the uniform law [−1, 1] and a constant c* > 0 optimal (smallest value possible) that satisfies f(x) ≤ c*g(x) for all x ∈ [−1, 1]. In other words find :
Provide details and demonstrate that the critical point found is in fact a point that maximizes
) Using the reject algorithm and the constant c* found in a), write a MATLAB code that simulates a vector of XXXXXXXXXXrandom variables that have F as density
c) Estimate E(X) and Var(X) using MATLAB
3. a) Explain (by hand) how to use Monte Carlo simulation to estimate the following integral :
) Taking n = XXXXXXXXXX, write a MATLAB code that estimates the integral and give a confidence interval with a confidence level of 95%
c) Find the ‘’real value’’ of the integral using the integral function on MATLAB and compare it with the answer found in b