Question

In: Statistics and Probability

Purchase Income ($ '000) Age Gender 0 71.9 42 2 0 100.4 42 1 0 105.6...

Purchase

Income ($ '000)

Age

Gender

0

71.9

42

2

0

100.4

42

1

0

105.6

44

1

1

83.1

39

2

0

114.2

43

1

1

113.5

44

1

0

115.2

42

1

0

100.4

35

2

0

92.6

43

2

0

123.8

42

1

0

122.8

45

1

1

98.6

46

2

0

107.6

41

2

0

108.4

42

2

1

138.8

41

1

1

109.9

44

2

1

136.2

47

1

1

117.6

38

2

1

122.8

43

2

0

121.8

45

2

1

126.6

41

2

1

125.8

46

2

1

138.8

42

2

0

149.6

37

1

1

159.5

33

2

Code definitions: Purchase 0 – Not purchased and 1 – Purchased;   Gender 1 – Male and 2 – Female

Fit a logistic regression model to predict purchase decision. Identify significant predictors and comment on classification accuracy.

Submit a word doc including key results and their interpretation for both parts A and B. Attach Excel files to support your results which is a must to get credit for the assignment.

Solutions

Expert Solution

Data:

Purchase Income Age Gender
0 71.9 42 2
0 100.4 42 1
0 105.6 44 1
1 83.1 39 2
0 114.2 43 1
1 113.5 44 1
0 115.2 42 1
0 100.4 35 2
0 92.6 43 2
0 123.8 42 1
0 122.8 45 1
1 98.6 46 2
0 107.6 41 2
0 108.4 42 2
1 138.8 41 1
1 109.9 44 2
1 136.2 47 1
1 117.6 38 2
1 122.8 43 2
0 121.8 45 2
1 126.6 41 2
1 125.8 46 2
1 138.8 42 2
0 149.6 37 1
1 159.5 33 2

> model = glm(Purchase~Income+Age+Gender,data=data,family = "binomial")
> summary(model)

Call:
glm(formula = Purchase ~ Income + Age + Gender, family = "binomial",
data = data)

Deviance Residuals:
Min 1Q Median 3Q Max
-1.9208 -0.7992 -0.4139 0.8686 1.9216

Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -17.66520 9.26768 -1.906 0.0566 .
Income 0.06139 0.03015 2.036 0.0417 * (significant)
Age 0.16189 0.15741 1.028 0.3037
Gender 2.28756 1.11809 2.046 0.0408 *(significant)

---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

(Dispersion parameter for binomial family taken to be 1)

Null deviance: 34.617 on 24 degrees of freedom
Residual deviance: 26.600 on 21 degrees of freedom
AIC: 34.6

Number of Fisher Scoring iterations: 4

Here,

  • Income is significant to purchase as p-value < 0.05
  • Gender is also significant to purchase as p-value < 0.05
  • Intercept and Age are not significant as p-value > 0.05.
  • AIC = 34.6 is a low value meaning that model is good fit
  • This model fit is appropriate and we can predict purchase with help of Age and Gender

Please rate my answer and comment for doubt.


Related Solutions

Purchase Income ($ '000) Age Gender 0 71.9 42 2 0 100.4 42 1 0 105.6...
Purchase Income ($ '000) Age Gender 0 71.9 42 2 0 100.4 42 1 0 105.6 44 1 1 83.1 39 2 0 114.2 43 1 1 113.5 44 1 0 115.2 42 1 0 100.4 35 2 0 92.6 43 2 0 123.8 42 1 0 122.8 45 1 1 98.6 46 2 0 107.6 41 2 0 108.4 42 2 1 138.8 41 1 1 109.9 44 2 1 136.2 47 1 1 117.6 38 2 1 122.8...
Case Study: Jan (4-2-1-0-2), age 42 is 18 weeks pregnant. Her primary health care provider has...
Case Study: Jan (4-2-1-0-2), age 42 is 18 weeks pregnant. Her primary health care provider has suggested an amniocentesis because of her age and a family history of a genetic disorder, both of which place Jan’s fetus at risk for genetic anomalies. Jan’s blood type is A negative and her partner’s, the father of her baby, is B positive. Describe the nurse’s role in terms of each of the following. 1. How will you prepare Jan for the amniocentesis? 2....
Finance Charges.  Bill wants to purchase a new car for ​$42 comma 000. Bill has no​...
Finance Charges.  Bill wants to purchase a new car for ​$42 comma 000. Bill has no​ savings, so he needs to finance the entire purchase amount. With no down​ payment, the interest rate on the loan is 17​% and the maturity of the loan is six years. His monthly payments will be ​$934.34. ​Bill's monthly net cash flows are ​$667. Bill also has a credit card with a ​$12 comma 055 limit and an interest rate of 22​%. If Bill...
Customer Age Female Income Married Children Loan Mortgage A 29 0 12623.4 1 1 1 0...
Customer Age Female Income Married Children Loan Mortgage A 29 0 12623.4 1 1 1 0 B 25 0 23818.6 1 0 0 0 C 40 1 31473.9 0 2 0 1 D 48 0 20268 1 0 0 0 E 65 0 51417 1 2 0 0 F 59 1 30971.8 1 3 1 1 G 61 1 47025 0 2 1 1 H 30 1 9672.25 1 0 1 0 I 31 1 15976.3 1 0 1 0...
Bought Income Children ViewedAd 0 37.00 2 2 1 47.00 1 1 0 47.00 1 2...
Bought Income Children ViewedAd 0 37.00 2 2 1 47.00 1 1 0 47.00 1 2 0 49.00 2 2 1 59.00 1 1 0 13.00 2 1 0 51.00 1 2 0 38.00 1 2 0 60.00 1 1 1 48.00 1 1 0 17.00 1 2 0 60.00 2 2 0 38.00 1 1 0 24.00 1 2 0 15.00 1 2 1 59.00 1 2 0 28.00 1 2 0 36.00 1 2 0 10.00 2 1...
Please refer to usa tax laws 1)F, a single taxpayer, age 42, had income and expenses...
Please refer to usa tax laws 1)F, a single taxpayer, age 42, had income and expenses as follows for 2020: Total income $33,000 Exclusions (municipal bond interest) 2,000 Deductions for A.G.I. 1,200 Total itemized deductions 18,020 Standard deduction 12,400 What are F's adjusted gross income and her taxable income, respectively? a. $29,800; $11,780 b. $29,800; $17,400 c. $29,800; $620 d. $33,000; $14,980 2) G is an eleven-year-old heiress whose share of income from various sources is as follows for the...
1.Create a fictitious child with a name, an age during early childhood, and a gender. 2.Describe...
1.Create a fictitious child with a name, an age during early childhood, and a gender. 2.Describe one component of the fictional child’s physical development. 3.Explain one component of the fictitious child’s cognitive development using Piaget’s theory of cognitive development. 4.Explain one component of the fictitious child’s cognitive development using the information-processing approach to cognitive development. 5.Describe one environmental factor that affects the fictitious child’s physical development or cognitive development.
1.Create a fictitious child with a name, an age during early childhood, and a gender. 2.Describe...
1.Create a fictitious child with a name, an age during early childhood, and a gender. 2.Describe one component of the fictional child’s physical development. 3.Explain one component of the fictitious child’s cognitive development using Piaget’s theory of cognitive development. 4.Explain one component of the fictitious child’s cognitive development using the information-processing approach to cognitive development. 5.Describe one environmental factor that affects the fictitious child’s physical development or cognitive development.
Year 0 1 2 3 4 Project 1 −$152 $19 $42 $58 $82 Project 2                            &nb
Year 0 1 2 3 4 Project 1 −$152 $19 $42 $58 $82 Project 2                                                −827 0 0 6,992 −6,490 Project 3 20 38 62 82                                                −246 a. For which of these projects is the IRR rule​ reliable? The IRR rule is reliable for (project 2 /project 3 /project 1) Unless all of the (positive/negative) cash flows of the project precede the (positive/negative) ones, the IRR rule may give the wrong answer and should not be used.​ Furthermore, there may...
0. 0. 0. 0.0. 0. 0. 0. 0. 1. 1. 1. 1. 1. 1. 2. 2. 2. 3. 4.
0. 0. 0. 0.0. 0. 0. 0. 0.   1. 1. 1. 1. 1. 1. 2. 2. 2. 3.   4. A.)MEAN – B.)MEDIAN - C.)MODE - D.)STANDARD DEVIATION – E.)5 NUMBER SUMMARY – F.)BOX AND WHISKERS PLOT – G.) OUTLIERS-
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT