Questions

Data analysis and correlation

Say which correlation you use and why: Pearson for a straight-line link, Spearman or Kendall for ranks or a curved but steady one.

Lesson: Exploring data and correlation

Aims and stages of an analysis

Paper A style · Data analysis · Straightforward · 9 marks

A general insurer's analytics team has been asked to carry out three pieces of work using its motor portfolio data:

(a) summarising the average claim cost in each region last year for the annual report;

(b) using a random sample of 2,000 policies to assess whether the claim frequency of drivers aged under 25 differs from that of older drivers across the whole portfolio, with a measure of the uncertainty;

(c) forecasting the number of claims the insurer will receive next quarter.

  1. (i)

    State, with a reason, whether each of (a), (b) and (c) has a descriptive, an inferential or a predictive aim.

    3 marks
  2. (ii)

    Describe the main stages the team should follow to carry out piece of work (c), from defining the problem to reporting the results.

    4 marks
  3. (iii)

    Suggest two tools or techniques the team could use in the exploratory stage of piece of work (a), and say what each would show.

    2 marks

Summary statistics for ten claims

Paper A style · Data analysis · Straightforward · 8 marks

The amounts (£) of ten claims settled last month on a small commercial property account were:

420, 380, 1250, 510, 460, 390, 2900, 610, 450, 530

You may use  and  .

  1. (i)

    Calculate the sample mean claim amount.

    1 mark
  2. (ii)

    Calculate the sample median.

    1 mark
  3. (iii)

    Calculate the sample standard deviation, using divisor n−1n-1. Give your answer to 1 decimal place.

    2 marks
  4. (iv)

    Comment on the shape of the distribution of these claim amounts, and state which measures of location and spread you would prefer to report.

    2 marks
  5. (v)

    It is found that the claim recorded as 2,900 should have been 290. Recalculate the sample mean, and state the effect of the correction on the median and on the standard deviation.

    2 marks

Telematics data as a big data source

Paper A style · Data analysis · Standard · 10 marks

A motor insurer plans to offer a policy that uses a 'black box' to record each insured vehicle's position, speed and acceleration once every second while the vehicle is moving. It expects 50,000 policyholders to take up the policy in the first year.

  1. (i)

    Assuming each vehicle is driven for an average of 1.5 hours a day on every day of a 365-day year, calculate the number of records collected in the first year. Give your answer in standard form to 4 significant figures.

    1 mark
  2. (ii)

    Describe four characteristics of this data set that make it an example of 'big data', and the difficulty each creates for the analysis.

    4 marks
  3. (iii)

    State whether the telematics data are primary or secondary data for the insurer, and give one example of secondary data the insurer might combine with them.

    2 marks
  4. (iv)

    Explain three issues, other than the size of the data set, that the insurer should consider before using the data to set premiums.

    3 marks

Making an analysis reproducible

Paper A style · Data analysis · Standard · 9 marks

Last year a pricing actuary produced a home insurer's rating factors using an R script, a spreadsheet in which several adjustments were typed by hand, and an extract of claims data taken from the live claims system on one particular day. This year a colleague tries to reproduce last year's results and cannot.

  1. (i)

    Explain what is meant by reproducible research, and how it differs from replication of a study.

    2 marks
  2. (ii)

    Describe four elements that would have made last year's analysis reproducible.

    4 marks
  3. (iii)

    Explain two benefits to the insurer of reproducible analysis.

    2 marks
  4. (iv)

    Part of the script draws bootstrap samples with R's sample function, and gives slightly different results every time it is run. Explain how this should be dealt with.

    1 mark

Premium level and claim frequency

Paper A style · Data analysis · Standard · 10 marks

For 12 sales regions, an insurer records the average annual premium xx (£00) and the claim frequency yy (claims per 100 policies). The summary statistics are:

, , , , , .

  1. (i)

    Calculate the sample (Pearson) correlation coefficient between xx and yy. Give your answer to 4 decimal places.

    3 marks
  2. (ii)

    Test, at the 5% significance level, the null hypothesis that the population correlation coefficient ρ\rho is zero against the alternative that ρ>0\rho > 0. You are given that the upper 5% point of the t10t_{10} distribution is 1.812. Give the value of your test statistic to 3 decimal places.

    4 marks
  3. (iii)

    State the assumptions needed for the test in (ii) to be valid.

    2 marks
  4. (iv)

    A manager concludes that higher premiums cause higher claim frequencies. Comment on this conclusion.

    1 mark

Fund manager returns in consecutive years

Paper A style · Data analysis · Standard · 9 marks

An investment consultant compares the returns (%) achieved by eight fund managers in two consecutive years:

ManagerABCDEFGH
Year 14.27.93.16.59.45.02.68.3
Year 25.16.02.27.48.83.94.46.9

Under the hypothesis of no association between the years, the exact distribution of Spearman's rank correlation coefficient rsr_s for  gives  and  .

  1. (i)

    Calculate Spearman's rank correlation coefficient between the two years' returns. Give your answer to 4 decimal places.

    4 marks
  2. (ii)

    Test, at the 5% significance level, whether there is positive association between managers' returns in the two years. State your hypotheses and conclusion.

    3 marks
  3. (iii)

    Give two reasons why the consultant might prefer Spearman's coefficient to Pearson's coefficient for these data.

    2 marks

Marketing spend and new policies

Paper A style · Data analysis · Standard · 10 marks

A life insurer records its monthly marketing spend xx (£000) and the number yy of new protection policies sold in the same month, for ten months:

Month12345678910
xx1215920171124141922
yy310335290360320305395340330380

Under the hypothesis of no association, Kendall's τ\tau for a sample of size nn may be taken as approximately normal with mean 0 and variance 2(2n+5)9n(n−1)\dfrac{2(2n+5)}{9n(n-1)}. You are given that the upper 2.5% point of the standard normal distribution is 1.9600.

  1. (i)

    Calculate Kendall's rank correlation coefficient τ\tau for these data. Give your answer to 4 decimal places.

    4 marks
  2. (ii)

    Using the normal approximation, test at the 5% significance level whether there is any association between marketing spend and new policies sold, against a two-sided alternative. Give your test statistic to 3 decimal places.

    3 marks
  3. (iii)

    Kendall's τ\tau can be read as  for two months chosen at random. Use this to estimate the probability that, of two months chosen at random, the month with the higher marketing spend also sold more policies.

    1 mark
  4. (iv)

    Give two advantages of Kendall's τ\tau over Pearson's correlation coefficient for data of this kind.

    2 marks

Fisher's transformation for pension scheme data

Paper A style · Data analysis · Hard · 13 marks

For a random sample of 40 occupational pension schemes, the sample correlation coefficient between the average age of active members and the scheme's annual ill-health retirement rate is  . Assume that the pairs are independent observations from a bivariate normal distribution.

You are given that the upper 2.5% and 5% points of the standard normal distribution are 1.9600 and 1.6449 respectively.

  1. (i)

    State the approximate distribution of  for a sample of size nn from a bivariate normal population with correlation ρ\rho.

    1 mark
  2. (ii)

    Calculate an approximate 95% confidence interval for ρ\rho. Give the lower limit to 4 decimal places as your answer.

    3 marks
  3. (iii)

    State the upper limit of your interval in (ii) to 4 decimal places, and comment on the shape of the interval.

    1 mark
  4. (iv)

    Test, at the 5% level,  against  . Give your test statistic to 3 decimal places.

    3 marks
  5. (v)

    An independent random sample of 35 schemes in another country gives a sample correlation of 0.55 between the same two variables. Test, at the 5% level, whether the two population correlation coefficients are equal, against a two-sided alternative. Give your test statistic to 3 decimal places.

    3 marks
  6. (vi)

    Explain why the inference above is based on tanh⁡−1r\tanh^{-1} r rather than on rr itself.

    2 marks

Two risk indicators reduced to one

Paper A style · Data analysis · Hard · 13 marks

For each of 50 postcode sectors an insurer records X1X_1, the number of burglaries per 1,000 households, and X2X_2, the number of theft claims per 1,000 home policies. The sample means are  and  , and the sample covariance matrix is

S=(9443).S = \begin{pmatrix} 9 & 4 \\ 4 & 3 \end{pmatrix}.

  1. (i)

    Show that the eigenvalues of SS are 11 and 1.

    3 marks
  2. (ii)

    Find the unit-length vector of loadings for the first principal component, taking the loading on X1X_1 to be positive. Give the loading on X2X_2 to 4 decimal places.

    2 marks
  3. (iii)

    Calculate the proportion of the total variance explained by the first principal component.

    1 mark
  4. (iv)

    A sector has  and  . Calculate its score on the first principal component, using mean-centred data. Give your answer to 4 decimal places.

    2 marks
  5. (v)

    An analyst repeats the analysis using the sample correlation matrix instead of SS. Calculate the proportion of total variance explained by the first principal component in that case. Give your answer to 4 decimal places.

    3 marks
  6. (vi)

    Explain why the two analyses give different answers, and state which you would recommend here.

    2 marks

Broker complaints and satisfaction scores

Paper A style · Data analysis · Hard · 12 marks

A general insurer distributes its policies through twelve brokers. For each broker it records xx, the number of complaints about the broker received last year, and yy, the broker's average customer satisfaction score (out of 10) from a survey this year:

BrokerABCDEFGHIJKL
xx372571493628
yy7.26.88.16.07.47.96.55.97.07.46.66.2

Tied values are given the average of the ranks they occupy. Under the hypothesis of no association, the statistic  may be taken to have approximately a tn−2t_{n-2} distribution, where rsr_s is Spearman's rank correlation coefficient. You are given that the upper 5% and 1% points of t10t_{10} are 1.812 and 2.764.

  1. (i)

    Calculate Spearman's rank correlation coefficient rsr_s between xx and yy, as the Pearson correlation coefficient of the ranks. Give your answer to 4 decimal places.

    5 marks
  2. (ii)

    Calculate the value given by the formula , where dd is the difference between a broker's two ranks, to 4 decimal places. Explain why it differs from your answer to (i).

    2 marks
  3. (iii)

    Test the hypothesis of no association between complaints and satisfaction against the alternative of negative association, at the 5% level and at the 1% level. State your hypotheses, give the test statistic to 3 decimal places and state your conclusions.

    3 marks
  4. (iv)

    An analyst suggests repeating the calculation with the logarithm of each satisfaction score. State, with a reason, the effect this would have on rsr_s, and give one reason why a rank-based coefficient is more suitable than Pearson's coefficient for these data.

    2 marks

Exploring motor claims by region

Paper B style · Data analysis · Straightforward · 14 marks

The data set da-p10.csv gives, for a random sample of 60 motor claims settled last year, the policy number (policy), the policyholder's region (region: North, Midlands or South, to be treated as a factor), the age of the main driver in years (age) and the claim amount in pounds (claim). Load it with df <- read.csv("da-p10.csv").

da-p10.csv: 60 rows, 4 columns

Show the data
policyregionageclaim
1North321064
2Midlands431016
3North611110
4South282207
5Midlands562362
6North181864
7South44740
8Midlands26933
9South642096
10North57616
11South69901
12South512631
13Midlands234659
14North76647
15Midlands481273
16South2010731
17North591356
18North731169
19North59942
20South212342
21North461711
22Midlands48874
23South411391
24Midlands76860
25Midlands79404
26Midlands74566
27Midlands65233
28North491491
29South301604
30South741313
31North48611
32Midlands56807
33North731588
34North74828
35North29624
36Midlands62873
37South54869
38North73530
39North511895
40South652349
41Midlands402863
42Midlands292280
43South442707
44North311177
45South232042
46South431623
47North25774
48Midlands591358
49South711135
50Midlands48634
51Midlands403663
52Midlands531488
53South57786
54Midlands331645
55North762139
56Midlands242234
57North31618
58South563308
59South282213
60South322282
  1. (i)

    Use R to produce summary statistics of the claim amounts, including the standard deviation. Give the standard deviation to 1 decimal place.

    3 marks
  2. (ii)

    Comment on what the output in (i) suggests about the shape of the distribution of claim amounts.

    2 marks
  3. (iii)

    Calculate the mean and standard deviation of the claim amounts in each region, and draw side-by-side boxplots of claim amount by region. Give the mean for the South region to 2 decimal places.

    3 marks
  4. (iv)

    The boxplot rule flags as outliers any values more than 1.5 times the interquartile range beyond the hinges. Use boxplot.stats to find how many claim amounts (all regions together) are flagged, and state their values.

    2 marks
  5. (v)

    Calculate Pearson's and Spearman's correlation coefficients between driver age and claim amount. Give Spearman's coefficient to 4 decimal places.

    2 marks
  6. (vi)

    Comment on the results of (iii) to (v), including whether you would prefer Pearson's or Spearman's coefficient here and what you would do next.

    2 marks

Correlation between two fund returns

Paper B style · Data analysis · Standard · 17 marks

The data set da-p11.csv gives the monthly returns (%) over 30 consecutive months of a UK equity fund (equity) and a commercial property fund (property), with the month number (month). Month 18 was a month of severe market stress. Load the data with df <- read.csv("da-p11.csv"). Use a 5% significance level and two-sided alternatives throughout, and assume the months are independent.

da-p11.csv: 30 rows, 3 columns

Show the data
monthequityproperty
1-1.261.9
2-6.650.53
34.244.88
43.170.86
54.61-1.22
62.74-0.47
7-0.59-1.91
8-2.11-3.78
91.550.71
100.642.43
11-0.7-0.89
12-2.060.81
131.41-0.46
14-3.870.88
15-1.245.05
16-1.140.42
17-2.672.08
18-11.8-9.6
193.354.09
201.161.58
21-2.73-1.92
220.02-0.61
23-0.520.55
242.595.89
25-1.55-1.47
262.525.51
270.45-2.09
28-0.91-5.06
29-0.830.59
30-1.60.74
  1. (i)

    Use cor.test to test whether the Pearson correlation between the two funds' returns is zero. Give the sample correlation to 4 decimal places.

    3 marks
  2. (ii)

    State the conclusion of the test in (i), and the assumption on which the test and the confidence interval rely.

    2 marks
  3. (iii)

    Repeat the test using Spearman's rank correlation, with exact = FALSE. Give the sample value of Spearman's coefficient to 4 decimal places.

    2 marks
  4. (iv)

    Repeat the test using Kendall's τ\tau, with exact = FALSE. Give the sample value of τ\tau to 4 decimal places.

    2 marks
  5. (v)

    Remove month 18 and repeat the Pearson test. Give the new sample correlation to 4 decimal places.

    3 marks
  6. (vi)

    Comment on the results of (i) to (v). What should an investor seeking diversification between the two funds conclude?

    3 marks
  7. (vii)

    Show, using R, that the 95% confidence interval in (i) is obtained from Fisher's transformation  .

    2 marks

Principal components of branch performance

Paper B style · Data analysis · Hard · 18 marks

The data set da-p12.csv gives five performance measures for each of 40 branches of a general insurer: claim frequency per 100 policies (freq), average claim severity in £00 (severity), annual lapse rate in % (lapse), expense ratio in % (expense) and growth in the number of policies in % (growth). Load it with df <- read.csv("da-p12.csv").

da-p12.csv: 40 rows, 5 columns

Show the data
freqseveritylapseexpensegrowth
10.7347.726.95.5
3.523.61327.15.2
6.830.712.329.74.4
6.834.117.829.81.4
5.527.29.728.84.4
5.925.515.129.90
13.445.814.9253.9
10.831.56.323.26.1
6.429.114.529.62.8
3.923.39.828.34.6
4.92513.630.53.5
5.52813.4293.2
5.630.912.830.33.6
7.533.117.431.3-0.1
8.737.112.9282
7.533.213.429.54.7
6.731.39.726.74.9
6.330.612.928.83.3
6.42710.5265.2
8.535.312.526.64.2
10.131.98.726.34.4
7.121.41129.23.1
8.230.17.726.53.3
927.912.6303.7
7.935.71530.90.7
9.939.411.629.72.7
4.829.710.830.35.1
629.810.927.75.2
9.235.511.228.50.3
8.431.712.228.13.2
6.625.38.226.46.8
933.211.926.54.7
7.427.214.528.53
9.135.712.325.23.5
10.836.412.828.11.5
8.634.612.327.84.7
5.830.211.630.13.2
7.230.913.5282.3
7.628.59.527.76.6
5.725.37.725.47.4
  1. (i)

    Calculate the sample variance of each of the five variables. Give the variance of severity to 3 decimal places.

    2 marks
  2. (ii)

    Explain why the principal component analysis should be carried out on the standardised variables (the correlation matrix) here.

    2 marks
  3. (iii)

    Carry out a principal component analysis on the standardised data using prcomp, and print its summary. Give the cumulative proportion of variance explained by the first two components to 4 decimal places.

    3 marks
  4. (iv)

    Calculate the eigenvalues of the correlation matrix from the prcomp output, and state how many components the Kaiser criterion (retain components whose eigenvalue exceeds 1) would keep.

    2 marks
  5. (v)

    Print the loadings of the first two components, rounded to 3 decimal places, and interpret each component.

    4 marks
  6. (vi)

    Give the size of branch 1's score on the first principal component, to 4 decimal places. (The sign of a component is arbitrary: software may reverse every loading and score.)

    2 marks
  7. (vii)

    Comment on how useful the principal component analysis is for summarising branch performance, and give one limitation.

    3 marks