Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

We used R to fit a logistic regression model to predict the probability of default from balance and student status (Yes, No). > attach(Default) >

image text in transcribedimage text in transcribed
image text in transcribedimage text in transcribed
We used R to fit a logistic regression model to predict the probability of default from "balance" and student status (Yes, No). > attach(Default) > fit=glm(default ~ balance + student, family=binomial) > summary(fit) Call: glm(formula = default ~ balance + student, family = binomial) Deviance Residuals: Min 1Q Median 3Q Max -2.4578 -0.1422 -0.0559 -0.0203 3.7435 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -10.7500 3.692e-01 -29.116 contrasts(default) Yes No 0 Yes 1 > probs=predict(fit,type="response") > probs[1:7] 2 3 4 5 6 7 1.409096e-03 1.140318e-03 1.005719e-02 4.469571e-04 1.943498e-03 2.050378e-03 2.441704e-03 > pred=rep("No", nrow(Default)) > pred[probs>.5]="Yes" > table(pred, default) default pred No Yes No 9628 228 Yes 39 105 Calculate the probability of default for a student who has a credit card balance of $2000. Please round to 3 decimal place. Do not enter in percentage

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Mathematical Analysis I

Authors: Claudio Canuto, Anita Tabacco

2nd Edition

3319127721, 9783319127729

More Books

Students also viewed these Mathematics questions

Question

Of what significance is inventory turnover to a retail store?

Answered: 1 week ago

Question

What factors contribute most to the comprehension of read text?

Answered: 1 week ago

Question

6. How can a message directly influence the interpreter?

Answered: 1 week ago