13 A Mini-Exam Example

A common regret of students who failed exam PA is that they did not start doing practice exams soon enough. Here is a simple practice exam to help you to understand what concepts that you should focus on learning, to become familiar with the format, and to test your technical skills with R, RStudio, and MS Word.

13.1 Project Statement

ABC Health Insurance company is building a model to predict medical claims. Using only age and sex information from the prior year, build a model to predict claims for the next year.

13.1.1 Describe the data (1 point)

##       age            sex          claims     
##  Min.   :18.00   male  :676   Min.   : 1122  
##  1st Qu.:27.00   female:662   1st Qu.: 4740  
##  Median :39.00                Median : 9382  
##  Mean   :39.21                Mean   :13270  
##  3rd Qu.:51.00                3rd Qu.:16640  
##  Max.   :64.00                Max.   :63770
## [1] 1338    3

The data consists of 1,338 policies with age and sex information. The objective is to predict future claims.

13.1.2 Create a histogram of the claims and comment on the shape (1 point)

The distribution of claims is strictly positive and right skewed.

## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

13.1.3 Fit a linear model (1 point)

13.1.4 Describe the relationship between age, sex, and claim costs (1 point)

We fit a linear model to the claim costs using age and sex as predictor variables. The coefficient of age is 258, indicating that the claim costs increase by $258 for every one-unit increase in the policyholder’s age. The cofficient of 1538 on sexmale indicates that on average, men have $1538 higher claims than women do.

## (Intercept)         age   sexfemale 
##   3882.4563    258.8651  -1538.8314

13.1.5 Write a summary of steps 1-4 in non-technical language (1 point)

ABC Health is interested in predicting the future claims for a group of policyholders. We began by collecting data on 1,538 policy holders which recorded their age, sex, and annual claims. We then created a histogram of the claim costs. A linear model which shows that claim costs increase as age increases, and are higher for men on average.