Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use the data below and R studio to answer the questions: The dependent variable is coded as y=1 if the customer used a coupon and
Use the data below and R studio to answer the questions:
- The dependent variable is coded as y=1 if the customer used a coupon and 0 if not. Suppose that the only information available to help predict whether the customer will use the coupon is the credit card status, coded as x=1, if the customer has the store's credit card and x=0 if not. a.Is the use of a coupon independent of the card status?
- Fit the logistic regression model to predict the chances of a customer to use the coupon using as independent variable the card status. Paste the summary of the model in your report.
- Use the estimated logistic regression to calculate the probability that a customer who does not have the stores credit card uses the coupon.
- Use the estimated logistic regression to calculate the probability that a customer who has the store's credit card uses the coupon.
- Compare the estimated probabilities in question 2 and 3. What can you conclude about the effect of credit card status on the chances of a customer to use the coupon.
- Fit a logistic regression to predict the chances of a customer to use a coupon using as independent variables their annual spending and the credit card status. a.State the estimated logistic regression
- Use the estimated logistic regression to estimate the probability that a customer with an annual spending of $4000 who has the store's credit uses the coupon.
- Use the estimated logistic regression to estimate the probability that a customer with an annual spending of $5000 who has the store's credit uses the coupon.
- Compare the estimated probability calculated in questions b and c. What can you conclude about the effect of the annual spending on the chances of a customer to use the coupon?
- Use the estimated equation and a threshold of 50% to calculate the true positive rate and the false positive rate. Comment on the performance of the model at this threshold.
- Calculate the AUC and comment on the general performance of this model.
Customer | Spending | Card | Coupon |
1 | 2.291 | 1 | 0 |
2 | 3.215 | 1 | 0 |
3 | 2.135 | 1 | 0 |
4 | 3.924 | 0 | 0 |
5 | 2.528 | 1 | 0 |
6 | 2.473 | 0 | 1 |
7 | 2.384 | 0 | 0 |
8 | 7.076 | 0 | 0 |
9 | 1.182 | 1 | 1 |
10 | 3.345 | 0 | 0 |
11 | 2.14 | 1 | 0 |
12 | 3.255 | 0 | 1 |
13 | 1.512 | 0 | 0 |
14 | 2.148 | 0 | 1 |
15 | 6.737 | 0 | 0 |
16 | 6.486 | 0 | 0 |
17 | 1.307 | 0 | 0 |
18 | 3.47 | 1 | 0 |
19 | 2.936 | 0 | 0 |
20 | 6.404 | 0 | 1 |
21 | 2.229 | 0 | 0 |
22 | 2.933 | 0 | 0 |
23 | 2.118 | 0 | 0 |
24 | 2.05 | 0 | 0 |
25 | 4.998 | 0 | 1 |
26 | 1.394 | 0 | 0 |
27 | 3.993 | 1 | 1 |
28 | 2.059 | 0 | 1 |
29 | 1.677 | 0 | 0 |
30 | 2.229 | 0 | 1 |
31 | 1.138 | 0 | 0 |
32 | 2.933 | 1 | 0 |
33 | 5.365 | 1 | 1 |
34 | 5.365 | 0 | 0 |
35 | 6.179 | 0 | 0 |
36 | 1.98 | 1 | 0 |
37 | 1.058 | 1 | 0 |
38 | 6.851 | 1 | 1 |
39 | 1.124 | 0 | 0 |
40 | 1.911 | 0 | 0 |
41 | 3.253 | 0 | 0 |
42 | 1.839 | 0 | 0 |
43 | 1.657 | 1 | 0 |
44 | 1.075 | 0 | 0 |
45 | 3.566 | 0 | 0 |
46 | 2.118 | 0 | 0 |
47 | 1.554 | 1 | 0 |
48 | 4.631 | 0 | 0 |
49 | 4.345 | 1 | 1 |
50 | 4.004 | 1 | 1 |
51 | 1.068 | 1 | 1 |
52 | 2.421 | 0 | 0 |
53 | 4.414 | 0 | 0 |
54 | 3.386 | 1 | 1 |
55 | 1.677 | 1 | 0 |
56 | 2.05 | 1 | 1 |
57 | 2.323 | 1 | 1 |
58 | 5.501 | 0 | 0 |
59 | 3.345 | 0 | 1 |
60 | 3.318 | 1 | 1 |
61 | 4.721 | 0 | 1 |
62 | 1.662 | 0 | 1 |
63 | 2.936 | 1 | 0 |
64 | 2.049 | 0 | 0 |
65 | 2.313 | 0 | 1 |
66 | 6.851 | 0 | 0 |
67 | 2.291 | 0 | 0 |
68 | 3.47 | 1 | 1 |
69 | 3.253 | 0 | 0 |
70 | 2.059 | 0 | 0 |
71 | 2.678 | 1 | 1 |
72 | 2.323 | 1 | 0 |
73 | 1.878 | 1 | 0 |
74 | 2.678 | 1 | 1 |
75 | 6.179 | 1 | 1 |
76 | 3.411 | 1 | 1 |
77 | 5.991 | 0 | 1 |
78 | 7.076 | 1 | 1 |
79 | 3.255 | 1 | 1 |
80 | 2.148 | 1 | 0 |
81 | 5.501 | 1 | 1 |
82 | 5.991 | 1 | 1 |
83 | 2.372 | 1 | 0 |
84 | 3.995 | 1 | 0 |
85 | 2.135 | 0 | 1 |
86 | 6.737 | 1 | 1 |
87 | 6.486 | 1 | 1 |
88 | 2.429 | 1 | 0 |
89 | 4.701 | 1 | 1 |
90 | 6.404 | 1 | 0 |
91 | 1.13 | 1 | 0 |
92 | 1.911 | 1 | 1 |
93 | 4.959 | 1 | 1 |
94 | 6.073 | 1 | 1 |
95 | 1.403 | 1 | 0 |
96 | 3.318 | 0 | 0 |
97 | 2.421 | 1 | 0 |
98 | 6.073 | 0 | 0 |
99 | 2.63 | 1 | 0 |
100 | 3.411 | 0 | 1 |
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started