You are on page 1of 2
Answer the following questions: 1. Consider a discrete random variable X with the following probability function eey-uisn (4) (2) ESB RCA) where 2 =0,1,2,.. (a) Develop an efficient algorithm for generating random numbers from the above prob- ability function, (b) Implement the algorithm in R. () Validate the algorithm implementation by comparing the empirical and theoretical probability function. Apply the Pearson chi-square test. 2 Consider a random variable X with the following distribution function R@apig (een, 250 Discuss in detail two ways to generate the random variable X, and implement both ap- proaches in R. Validate your programs with quantile plots. ‘Assignments: 1. Consider a random variable ¥ which is, conditional on A, Weibull distributed: Y¥|A~ Wei(A,0.5), and where A~T(2,2). ‘We want to use simulation to efficiently estimate @ = P(Y > 5). Note: parameterizations to be used: © X ~Weil,7): x(a) dra te™" a 0; AT > 0. © X~T(,a): BY pepo t Ix(2) Te >0; Baro. Answer the following problems: (a) Explain the raw simulation estimator. (b) Show how conditional expectation can be used to obtain an improved estimator. (c) Show how the estimator of (b) ean be further improved by using antithetic variables, (a) Show how the estimator of (b) can be further improved by using & control variable. (@) Discuss how importance sampling can be used to reduce the variance. Write a simulation program and use it to find the variances of (a) The raw simulation estimator. (b) The conditional expectation estimator. (€) The estimator using conditional expectation along with antithetic variables. (4) Tho estimator using conditional expectation along with a control variable. (€) The importance sampling estimator. ‘What is the exact value of @? (analytical dorivation required) 2. Simulate the following model of auto insurance claims: + Claims arise according to a Poisson process with rate 100 per year. Esch claim size is random and follows a Gamma distribution with =a = 2, and the claim sizes are independent of the oceurrenee of the secidents. Claims must be ‘paid by the insurance campany as soon as they arise. + The insurance company earns premiums at a rate of 105 per year, spread evenly over the your (ie. at time ¢ measured in years the total premium received is 1051). ‘Write a R program that does the following: (a) Simulate the times and amounts of all the claims that would occur in one year. Draw a graph of the total amount of money that the insurance company would have throughout the year, starting from zero. (b)_ Use simulation to estimate the following quantities: '» The expected final amount of money (after 1 year) that the Insurance company ‘would have. © The expected minimum amount of money that the insurance company would hhave over the considered time span of 1 year. Also discuss and implement variance reduction method

You might also like