Question: (d) (4 marks] Consider the Default dataset from the ISLR package in R. The data was collected with the aim to predict which customers will

(d) (4 marks] Consider the Default dataset from(d) (4 marks] Consider the Default dataset from

(d) (4 marks] Consider the Default dataset from the ISLR package in R. The data was collected with the aim to predict which customers will default on their credit card debt. The data is loaded into R using the following commands library (ISLR) library(tidyverse) data("Default") df % mutate(y = ifelse (default == "Yes", 1, 0)) n = nrow(df) n [1] 10000 We will consider two variables from this dataset default which takes two values "Yes" if the customer defaulted on their loan, and "No" otherwise. balance the average balance that the customer has remaining on their credit card after making their monthly payment. A logistic regression model will be used to fit a model where default is the response variable and balance is the predictor. Using the code on the next page answer the following questions. i. Write a formula for the fitted model. ii. Using the fitted model what is the value of balance such that the probability that a customer defaults on their loan is 50%? Consider the R code: res 21) (Intercept) -1.065e+01 3.612e-01 -29.49 % mutate(y = ifelse (default == "Yes", 1, 0)) n = nrow(df) n [1] 10000 We will consider two variables from this dataset default which takes two values "Yes" if the customer defaulted on their loan, and "No" otherwise. balance the average balance that the customer has remaining on their credit card after making their monthly payment. A logistic regression model will be used to fit a model where default is the response variable and balance is the predictor. Using the code on the next page answer the following questions. i. Write a formula for the fitted model. ii. Using the fitted model what is the value of balance such that the probability that a customer defaults on their loan is 50%? Consider the R code: res 21) (Intercept) -1.065e+01 3.612e-01 -29.49

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related General Management Questions!