Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

WARNING: DO NOT RE-RUN THIS CODE. THE DATA HAS BEEN MODIFIED FOR THIS EXAM. > attach( Default ) > fit=glm( default ~ balance + student,

WARNING: DO NOT RE-RUN THIS CODE. THE DATA HAS BEEN MODIFIED FOR THIS EXAM. > 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) -9.9500 3.692e-01 -29.116 < 2e-16 *** balance 0.008738 2.318e-04 24.750 < 2e-16 *** studentYes -0.6149 1.475e-01 -4.846 1.26e-06 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1)  Null deviance: 2920.6 on 9999 degrees of freedom Residual deviance: 1571.7 on 9997 degrees of freedom AIC: 1577.7 Number of Fisher Scoring iterations: 8 > contrasts(default)  Yes No 0 Yes 1 > probs=predict(fit,type="response") > probs[1:7]  1 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 

1 .Write the model in an equation form. Please substitute all.parameters with the values from. the above code.

2 .Calculate the probability. of default for a student .who has a credit .card balance of $2200. Please show .your calculation.

3 .Suppose that an .individual has a 25% chance of defaulting on her .credit card payment. What are the odds that. she will default? Please show your calculation.

4 .Calculate the error rate .based on the given confusion. table in the last part of the .above code. Please show .your calculation.

5 .If the accuracy. is not as important as the .sensitivity, how can you improve .the sensitivity of this .model?

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

Linear Algebra

Authors: Jim Hefferon

1st Edition

978-0982406212, 0982406215

More Books

Students also viewed these Mathematics questions

Question

Explain the difference between a discrete and a continuous metric.

Answered: 1 week ago