Statistical Methods in Insurance
Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: THEend8_
STAT3010/6075 Statistical Methods in Insurance
Assignment 2
This assignment is worth 10% of the overall mark for STAT3010/6075.
Standard University policies and procedures will be followed for late submission, extensions and
academic integrity (see the Module Outline for details).
Submission is via Blackboard. You must submit a report of at most six pages (in pdf format),
containing your answers, and a separate R script, containing the code that you used to obtain
your results.
– Your should submit your report via TurnitinUK on Blackboard (see Module Outline for
details) in a file called report-ID.pdf, where ID is your student ID number, for example
report-12345678.pdf. In the Assignments folder, click on Assignment 2 report submission
to submit your report. Please enter this file name as the Submission Title.
– You should not include R code used in your analysis in your report, but you must submit
a separate R script via Blackboard containing your code called code-ID.R, for example
code-12345678.R. Please rename and use the R template code-yyy.R provided. In the
Assignments folder, click on Assignment 2 code submission to submit your code.
? The page limit is strict and is easily sufficient to receive full credit. If your report is more than
six pages of A4, only the first six pages will be marked.
Recall from Assignment 1 that a health insurance company is developing a model to assess the risk of
its policy holders having diabetes based on the following data from the file diabetes.csv:
Diabetes Binary variable indicating diabetes diagnosis, either positive (pos) or negative (neg)
Age Age of individual, recorded in years
BMI Body mass index (weight in kg/(height in m)2)
Glucose Plasma glucose concentration
Pressure Diastolic blood pressure (mm Hg)
Pregnant Number of times pregnant
Use the code in the R template to:
(a) Set the seed to be your student ID number with the command set.seed(ID ), for example
set.seed(12345678).
(b) Select a random training data set (train=1) of size 450 and test data set (train=0) of size 274
with the command train <- sample(c(rep(0,274), rep(1,450))).