Assignment tasks
(1) The size of claims, Y (in units 10, 000), in a particular insurance portfolio follows a
distribution with probability density function
fY (y) = 2�y exp(��y2) for y > 0,
where � > 0 is a parameter of the distribution. A sample of 200 independent claims
is available.
You will use simulated data for this task. You must run the following R code to
produce your sample, which is stored in object y.
set.seed(xxxx)
y = sqrt(-log(runif(200,0,1))/0.1)
#y
Important: you must use the command set.seed(xxxx), where xxxx are
the four last digits of your HWU registration number (Person ID). This
will ensure that your results are unique and also that the data are the same if you
need to run the simulation again.
(a) Obtain suitable numerical and graphical summaries of the data and comment.
[4 marks]
(b) Determine and compute the maximum likelihood estimate of parameter � using
your sample data.
[4 marks]
(c) Compute an approximate equal-tailed 99% confidence interval for the true value
of parameter � using your sample data.
[4 marks]
(d) You are interested in the proportion of claims that are greater than 60, 000.
Using your sample data, estimate the probability that a claim in this insurance
portfolio is greater than 60, 000 and compute an approximate equal-tailed 99%
confidence interval for this probability based on your estimate for parameter �.
[6 marks]
CONTINUED/
7
nnrttoorooooortttnosesenornrsetoosrgnoosegggegnsesroegrsesopgestotspg
(2) You want to investigate the proportion of electric cars among all registered cars in two
large populations (denoted as populations A and B). Two samples are available, one
from each population. The first sample consists of nA = 900 registered cars, while the
second sample consists of nB = 1, 200 registered cars. The type of each car (electric
or not) is assumed to be independent of the type of other cars in the samples.
Again, you will use simulated data for this task. You must run the following R code
to produce your samples, which are stored in objects data.A and data.B.
set.seed(xxxx)
data.A = rbinom(900,1,0.010)
data.B = rbinom(1200,1,0.015)
#data.A; data.B
Important: see note in Task 1 regarding the use of the set.seed(xxxx)
command.
(a) Compute an equal-tailed 99% confidence interval for the di↵erence of the true
proportions of electric cars in the two populations A and B, using your sample
data.
[4 marks]
(b) Based on previous knowledge, it is believed that the proportion of electric cars in
population A is lower than the proportion of electric cars in population B.
Perform a hypothesis test to investigate this belief, using your sample data. In
doing so, you should include the following steps, in addition to any other steps
you find necessary for a complete test:
compute the value of a suitable test statistic under an appropriate normal
approximation;
compute the p-value of the test;
give your conclusion based on the calculated p-value.
[8 marks]
[Assignment total: 30 marks]
END OF ASSIGNMENT
8a