Show work
Refer to the subscribers.xlsx excel file for the logistic regression problem. Predict the likelihood that individuals will subscribe to a magazine (indicated by a 1 in the Subscribe column) based on their age and annual income (in thousands of dollars). You may either use the steps to carry out logistic regression from chapter 6 of the data smart textbook or use the glm method within R/RStudio. (3 points) Note that if you are using the steps from the textbook, you must first carry out linear regression before carrying out logistic regression.
Now, based on the result of the logistic regression, calculate the probability that a 64-year-old with an annual income of $84,000 is a subscriber. (2 points) With logistic regression, the probability that a person is a subscriber is given by the following equation:
Probability of event=P= 1/ 1+e-(B0+B1X1+b2x2+...)
where ?0 is the coefficient for intercept, ?1 is the
coefficient for age and ?2 is the coefficient for income.
Or in our case:
e (coefficient of intercept + coefficient of age * age + coefficient of income * income) / (1 + e (coefficient of intercept + coefficient of age * age + coefficient of income * income) )
where age is 64 and annual income is 84.
Subscribe Age Income
0 25 132
0 64 84
0 31 100
0 66 72
0 39 78
1 53 54
1 49 102
1 63 145
0 66 130
0 72 87
0 35 89
0 42 97
1 65 90
1 48 90
0 28 67
0 46 98
0 31 55
0 41 103
0 57 128
0 70 72
0 53 81
0 49 134
1 51 142
0 47 112
0 28 65
0 54 94
0 28 112
0 42 64
0 27 150
1 72 130
0 31 69
0 48 107
0 36 69
1 68 148
0 49 57
0 63 92
0 63 143
1 31 129
0 28 131
0 71 90
0 64 56
1 57 149
0 32 111
1 52 57
0 57 117
1 52 115
1 53 125
0 33 85
1 51 104
1 68 131
0 37 65
0 30 58
1 60 131
0 51 62
0 60 61
1 40 65
0 39 82
1 49 131
0 64 52
1 44 74
0 69 115
1 66 53
1 40 99
0 36 69
1 61 148
1 60 105
1 50 133
0 44 110
0 25 146
1 54 67
1 60 84
0 31 85
0 43 77
0 67 58
0 42 109
1 39 128
0 31 144
1 69 116
0 52 85
0 36 141
0 51 103
0 37 75
1 66 135
1 67 140
1 39 69
0 55 109
0 33 103
1 70 73
1 57 147
0 25 110
0 58 78
0 43 145
1 72 67
0 63 139
0 45 140
1 28 104
1 71 141
0 52 132
0 75 54
1 50 99
0 53 130
0 26 146
0 30 62
1 50 119
0 54 97
1 65 74
1 75 92
0 34 71
0 72 61
0 58 66
1 57 145
0 59 81
0 74 73
1 49 54
1 64 72
1 54 131
0 36 76
1 51 107
1 38 61
0 43 87
0 63 115
0 36 93
0 38 146
0 40 72
0 50 58
0 45 131
1 65 146
0 44 77
1 33 147
1 71 59
0 57 108
0 54 114
0 34 97
0 42 67
1 38 123
0 66 116
1 75 111
0 27 98
1 66 84
1 70 140
0 67 149
0 66 101
0 29 78
0 72 126
0 45 60
0 72 119
1 66 107
1 55 128
0 64 95
0 51 112
0 35 93
0 62 70
0 29 117
1 33 139
0 27 62
1 61 74
1 62 50
1 36 140
1 57 80
1 69 69
0 69 124
0 30 145
1 75 62
0 73 63
0 46 139
0 32 68
0 39 112
0 35 71
0 65 78
0 63 127
0 74 94
1 46 67
0 30 144
0 66 128
0 51 135
0 49 125
0 49 57
0 30 55
0 30 99
0 50 117
0 54 85
0 67 135
1 33 137
0 41 72
1 71 139
0 44 123
0 71 96
1 73 99
0 52 76
0 74 54
0 42 117
0 63 65
1 42 56
0 71 108
0 25 62
1 55 113
1 37 79
0 41 132
0 27 50
1 51 143
1 52 87
1 51 62
0 50 65
0 50 93
0 51 111
1 64 77
1 57 136
1 70 148
1 27 90
1 63 128
1 70 142
0 33 111
0 27 101
1 73 92
0 71 100
0 73 65
0 25 92
0 50 88
0 47 76
0 71 62
0 34 106
0 66 144
0 46 83
0 63 100
0 40 53
0 57 136
0 70 107
0 31 115
0 75 69
1 61 146
0 51 94
1 64 125
1 61 148
1 67 121
1 63 53
0 61 107
0 61 85
1 71 109
0 33 55
0 30 88
1 63 130
1 53 102
1 75 110
0 38 149
1 68 106
0 33 92
1 74 133
1 26 125
1 29 138
0 49 123
0 53 104
0 29 57
0 39 124
0 70 68
1 63 118
1 38 122
0 31 92
1 41 124
1 67 103
1 74 148
1 74 109
0 40 133
0 50 124
1 37 98
1 28 89
0 66 83
0 25 59
1 51 62
1 33 89
0 67 129
0 53 65
0 45 102
1 36 116
0 31 89
0 39 78
1 72 80
1 74 149
0 72 58
0 29 75
0 42 83
1 68 77
0 58 141
0 63 106
1 25 76
1 65 58
0 66 63
0 28 77
0 33 104
1 56 111
1 61 116
0 61 119
0 71 146
1 27 135
1 62 139
1 29 134
0 45 147
1 33 63
0 69 82
0 42 55
0 25 138
1 31 126
1 70 124
0 38 86
1 70 54
1 30 88
1 25 125
1 26 75
0 72 53
1 65 114
0 74 72
0 68 89
0 49 57
1 51 64
0 54 59
0 46 91
0 40 54
0 26 126
0 49 127
1 44 134
0 49 127
1 53 146
1 42 112
0 46 145
1 70 119
0 34 141
0 72 82
0 43 54
1 43 50
0 26 53
0 68 96
0 45 120
1 57 150
0 54 62
0 37 145
1 55 53
0 49 70
0 39 63
1 51 135
0 58 116
0 58 82
0 71 83
0 49 105
0 36 122
0 33 69
1 72 147
1 42 126
0 73 56
0 75 74
0 44 79
0 61 64
1 45 146
0 70 108
1 66 127
1 58 75
1 56 79
0 70 68
1 46 138
1 26 138
1 41 119
1 50 73
0 31 126
1 26 136
1 59 97
0 42 83
0 65 143
1 35 171
1 64 189
1 37 157
0 42 184
1 64 180
1 52 187
0 47 175
1 38 171
0 71 197
1 47 151
1 46 155
1 50 173
1 56 159
1 31 172
1 61 165
0 70 186
0 41 163
1 39 181
0 33 178
0 45 159
1 34 182
0 40 160
1 57 156
0 35 155
1 72 182
1 56 193
0 28 189
1 25 166
1 44 156
1 28 196
1 53 193
0 29 151
1 58 176
1 53 160
1 51 181
1 46 191
1 43 200
1 71 200
0 37 192
0 75 162
1 32 191
1 29 172