10.07.2015 Views

Statistics I Exercises

Statistics I Exercises

Statistics I Exercises

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

43. Compute a Monto Carlo estimate ˆθ ofθ =∫ 0.50e −x dxby sampling from Uniform(0, 0.5), and estimate the variance of ˆθ. Find another Monte Carloestimator θ ∗ by sampling from the exponential distribution. Which of the variances (of ˆθand θ ∗ ) is smaller, and why?44. Suppose a bank has a credit portfolio with 10 obligors with rating grade AA, 25 with A,and 96 rated BBB, respectively, with corresponding one-year probabilities of default (PDs)0.0001, 0.0005, and 0.0025, respectively. Simulate default scenarios, assuming that the defaultoccur independently.π 45. The following model has been used for the study of contagion. Suppose that there are Npersons some of whom are sick with influenza. The following assumptions are made:• when a sick person meets a healthy one, the chance is α that the latter will be infected• all encounters are between two persons• all possible encounters in pairs are equally likely• one such encounter occurs in every unit of time.(a) Write a function which simulates this model for various values of N (say, 10 000) andα (say, between 0.001 and 0.1). Monitor the history of this process, assuming that oneindividual is infected at the beginning.(b) Suppose that initially only one individual is infected. What is the expected length oftime until 1000 people are infected?(c) Now add the assumption that each infected person has chance β, say 0.01, of recoveringat each time unit. Monitor several histories of this new process, and compare themwith the histories of the old process.(d) Re-do with the assumption that the time between encounters is an exponential randomvariable with a mean of 5 minutes.(e) Re-do assuming that the time between encounters is the absolute value of a normalrandom variable with a mean of 5 minutes and a standard deviation of 1 minute.π 46. Simulate the following simple model of auto insurance claims:• Claims arise according to a Poisson process at a rate of 100 per year.• Each claim is random in size following a Gamma distribution with shape and rateparameters both equal to 2. This distribution has a mean of 1 and a variance of 1/2.Claims must be paid by the insurance company as soon as they arise.• The insurance company earns premiums at a rate of 105 per year, spread evenly overythe year (i.e., at time t measured in years, the total premium received is 105t).Write R code to do the following:(a) Simulate the times and amounts of all the claims that would occur in one year. Drawthe graph of the total number of money that the insurance company would have throughthe year, starting from zero: it should increase smoothly with the premiums, and dropat each claim time.(b) Repeat the simulation 1000 times, and estimate the following quantities:i. The expected minimum amount of money that the insurance company would have.ii. The expected final amount of money that the insurance company would have.8

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!