Hello, dear friend, you can consult us at any time if you have any questions, add WeChat: daixieit


MTH238: Assignment for Loss Models in R

Assignment Instructions
• Answer both tasks.
• Show clear reasoning.
• Include your R code where required.
• For all simulation tasks in this assignment, please use set.seed(123).
• Total marks: 100.
Deadline: March 29, 11:59 PM.

Late submission policy: Late submission is allowed until April 3rd, with a penalty of up to 20%.

Use of AI tools

AI tools are permitted with restrictions. Students may use AI tools for interactive learning (e.g., asking for explanations of concepts, requesting hints). However, AI tools must not be used to draft, write, or complete any assessed work.

In particular, AI tools must not be used to generate or substantially produce code, data analysis, statistical modelling outputs, figures/tables, or interpretations that are submitted for assessment. Any submitted work must reflect the student’s independent work and understanding.

Where AI tools are used, students must provide a brief acknowledgement stating the tool name and version (or model) and the purpose of use (e.g., “Deepseek (model/version) for concept clarification” / “Grammarly v3.2 for proofreading”). Students remain fully responsible for the accuracy, originality, and academic integrity of all submitted work.MTH238 Assignment Loss Models in R

Task 1: Collective Risk Model for Home Insurance [56 marks]

An insurer models the annual aggregate loss for a portfolio of home insurance policies by

where
N ∼ Poisson(950).

The actuarial team is considering two candidate severity models:

Xi ∼ Gamma(shape = 3,rate = 0.0012),
or
Xi ∼ Lognormal(µ = 7.65, σ = 0.75).

The insurer receives total annual premium income

P = 2,750,000

and incurs total annual expenses
E = 220,000.

Required work

Using R, complete the following analysis.

1. Generate 6,000 samples from each of the two candidate severity distributions and produce suitable plots to compare them. Based on your plots, briefly comment on the shape and tail behaviour of the two severity models.

Your answer should include the R code, the generated plot(s), and a brief comment. [10 marks]

2. For the Gamma severity model, calculate the theoretical values of E(S), Var(S) and SD(S). You should use R to complete the calculations. Your answer should include the R code and the resulting numerical output. [6 marks]

3. Simulate 8,000 values of the aggregate annual loss S under the Gamma severity model.
Report:
• the estimated probability P(S > 2,600,000);
• the estimated 95th percentile of S;
• the estimated 99th percentile of S.
Your answer should include the R code and the reported numerical results. [12 marks]
4. Simulate 8,000 values of the aggregate annual loss S under the Lognormal severity model.
Report:
• the estimated probability P(S > 2,600,000);
• the estimated 95th percentile of S;
• the estimated 99th percentile of S.
Your answer should include the R code and the reported numerical results. [12 marks]
5. Produce suitable plots to compare the aggregate loss distributions under the two severity models, and briefly comment on the main differences you observe.

Your answer should include the R code, plot(s) and a brief comment. [8 marks]

6. Using a normal approximation based on the Gamma model, calculate the reserve capital R required so that the one-year ruin probability is at most 1%, where ruin occurs when S > P − E + R.
Your answer should include the R code and the final reserve value. [8 marks]
Task 2: Individual Risk Model for Dental Insurance [44 marks]
An insurer covers 4000 dental insurance policyholders divided into three risk groups:

Group Number of policyholders Claim probability Severity model

Low risk 1800 0.06 Gamma(2, 0.003)
Medium risk 1400 0.11 Gamma(2, 0.0022)
High risk 800 0.20 Gamma(2, 0.0016)
The aggregate annual loss is modelled by

where
Ii ∼ Bernoulli(qi),
and, conditional on a claim,
Xi ∼ the severity distribution for policyholder i.
Required work
Using R, complete the following analysis.
1. Calculate the expected aggregate annual loss for the heterogeneous portfolio.

Your answer should include the R code and the resulting numerical value. [6 marks]

2. Calculate the weighted average claim probability q¯ and the weighted average severity mean
µ¯X. Then construct a homogeneous benchmark portfolio with
where the mean severity matches µ¯X. Find the value of β¯.

Your answer should include the R code and the resulting numerical values. [8 marks]

3. Write R code to simulate the aggregate annual loss distribution for the heterogeneous port folio and the homogeneous benchmark portfolio, using 5000 simulations in each case. Your answer should include the R code used for both simulations. [12 marks]
4. Based on your simulation results, produce a comparison table showing the mean, standard deviation, 95th percentile and 99th percentile for both portfolios.
Your answer should include the table and the R code used to produce it. [10 marks]
5. Briefly comment on whether heterogeneity changes the overall risk profile of the portfolio.
Your answer should refer to your simulation results and comparison table. [8 marks]
Submission Template
Student Information
Student ID:
AI acknowledgement (if any):
Reminder: Please use set.seed(123) for all simulation tasks.
Task 1: Collective Risk Model for Home Insurance
1. Severity distribution comparison
R code
% Insert your R code here
Plots
Comments on shape and tail behaviour
2. Theoretical values under the Gamma severity model
R code
% Insert your R code here
Results
E(S) = Var(S) = SD(S) =
A screenshot on R results clearly showing E(S), Var(S) and SD(S) = is also acceptable.
. . .