Predictive Analytics Practice Problem
Predictive Analytics Practice Problem
Predictive Analytics Practice Problem
1. The “Carseats” dataset available in the “ISLR” library records the sales of child car
seats at 400 different stores. The dataset provides information on the following
variables:
Following results are available for two logistic regression models fitted for predicting
“High Sales” based on the training data set.
Table 1: Logistic Regression Model (Model 1) for predicting “High Sales” using
“ShelveLoc” based on the training data set
Table 2: Logistic Regression Model (Model 2) for predicting “High Sales” using
“Price” and “ShelveLoc” based on the training data set
True “High”
Status
No Yes
Yes 9 75
a. Based on the fitted Model 1 (Table 1), find the predicted probabilities of “High
Sales” for different levels of “ShelveLoc”.
b. Write the equation of the fitted Model 2 (Table 2). Interpret the coefficients.
c. Suppose the owner of a particular store wants the predicted probability of “High
Sales” to be at least 0.8. It is also given that the store maintains a “Good” shelving
location for the car seats. Based on the fitted Model 2, what should be the price of
the car seats for having a 80% chance of getting “High Sales”?
d. Based on the classification matrix shown above, compute the sensitivity, specificity
and total error rate for the logistic regression model. Suggest a possible method
for improving its performance (No need to implement it).