Question: HW 5 Using python codes answer the bellow questions with the data is attached Use d3.csv data to fit a simple regression model by selecting

HW 5

Using python codes answer the bellow questions with the data is attached

  1. Use d3.csv data to fit a simple regression model by selecting dependent and an independent variable.
  2. Give the rationale for the selection of your independent and dependent variable.
  3. Report whether your intercept and slope coefficients are significant or not.
  4. Report the estimates of the regression coefficients (intercept and slope).
  5. Report the confidence interval of the estimate of regression coefficients
  6. What percentage of the dependent variable is explained by the independent variable?
  7. Show scatter plot together with fitted line.
  8. Produce confidence interval for your fitted regression line.
  9. Produce prediction interval for your fitted regression line.
  10. How can you explain changes in dependent variable in terms of changes in independent variable?
  11. Side by side show the Boxplot and Histogram of the Residuals. Put Smooth Curve over the histogram.

There is t

RACE INCOME AGE SMOKE SBP DBP HT WT WM BMI VISIT SUGAR BREAST HIPS ARMS TC TG LDL HDL PULSE WAIST NLOG TIME EVENT NEW_ID NMISS ABP ABP1 BPC
1 6 11.28268 2 113.7319 72.77565 162.4962 49.66358 63.45 17.86842 3 122.3033 1 1 1 134 116 74 42 40 1 4 21.51 0 1 0 93.25378 93.25378 2
1 7 11.04723 2 119.6317 69.18881 154.6292 63.14547 70.15 23.60648 3 77.14997 3 2 2 166 67 112 44 37 2 7 28.03 0 5 0 94.41027 94.41027 2
2 8 14.54894 2 117.8707 62.07572 173.0474 65.8049 66.05 22.27837 5 219.2633 2 2 2 166 56 94 63 39 2 16 14.46 0 8 0 89.97322 89.97322 2
2 8 12.13142 2 126.9646 86.06537 163.359 50.59645 63.4 17.37852 3 120.7533 2 2 2 137 58 74 54 40 2 12 7.6 0 11 0 106.515 106.515 1
1 9 11.43053 2 114.0518 82.53601 146.9832 39.42586 62.4 18.5975 3 112.51 2 2 2 159 49 60 91 36 1 16 14.72 1 12 0 98.29391 98.29391 2
1 1 12.15058 2 115.891 79.08044 164.1626 75.97466 78.95 27.04138 3 85.88997 2 3 2 191 43 124 60 31 2 10 3.21 1 13 0 97.48573 97.48573 2
1 1 14.09172 2 125.1131 79.10622 171.0826 87.71831 84.95 27.57319 5 54.59332 1 1 3 193 46 119 67 32 1 14 53.17 1 13 0 102.1096 102.1096 1
2 8 12.66256 1 120.0584 91.21075 165.5502 70.38033 78.25 25.09361 3 140.9299 2 3 2 140 39 77 57 31 2 11 101.98 1 15 0 105.6346 105.6346 1
2 8 13.65366 2 106.1304 80.68833 166.4743 53.49081 59.6 17.72854 5 136.8033 2 2 2 138 48 64 67 43 2 18 24.23 1 16 0 93.40936 93.40936 2
2 8 14.84736 2 117.7196 80.78517 164.3169 72.50763 75.7 23.05683 5 146.54 2 3 2 145 145 82 41 44 2 3 23.11 1 17 0 99.25241 99.25241 2
2 5 11.64408 2 123.9537 88.64835 161.402 66.08015 81.35 24.96699 3 98.28662 2 3 2 168 69 111 46 33 3 5 49.01 1 18 0 106.301 106.301 1
2 7 10.987 2 106.3242 61.50002 147.6201 32.21915 52.05 13.68768 3 129.4733 2 1 1 146 64 74 62 39 1 17 49.79 1 20 0 83.91211 83.91211 3
2 7 13.08966 2 113.4575 66.03899 163.1996 50.76468 59.85 16.3033 5 135.8633 2 2 2 144 55 78 58 38 2 18 18.54 1 20 0 89.74824 89.74824 2
2 8 11.34018 1 112.305 88.65555 149.8627 51.25738 64.9 17.13415 3 123.485 2 2 2 137 54 76 53 34 3 1 84.42 0 23 0 100.4803 100.4803 1
2 7 11.26352 2 95.65974 67.92748 165.6781 64.80407 74.8 21.70718 3 92.74996 2 2 2 153 82 83 57 38 2 11 158.88 1 24 0 81.79361 81.79361 3
2 7 13.25394 2 120.9531 75.53426 175.8512 79.96419 82.2 23.98916 5 127.9799 2 2 2 144 100 73 56 35 2 12 37.46 1 24 0 98.24367 98.24367 2
2 8 12.88433 2 101.0006 74.95652 154.943 50.48965 68.35 18.95665 3 76.88331 3 2 2 170 83 107 50 40 2 14 9.56 1 27 0 87.97854 87.97854 2
1 8 14.09446 2 101.157 59.86124 171.1706 65.94297 65.1 20.67772 5 88.22662 2 2 2 153 43 93 53 38 1 4 0.55 1 28 0 80.50911 80.50911 3
2 6 11.6961 2 114.5337 82.0215 169.2737 86.99751 77.75 28.93131 3 110.5133 2 3 3 144 56 97 38 29 3 14 24.97 1 30 0 98.27759 98.27759 2
2 7 13.73306 2 115.5746 78.89005 153.608 39.58497 57.95 18.35389 5 140.1533 2 2 1 210 94 124 72 44 2 9 88.96 0 32 0 97.23233 97.23233 2
2 9 13.92745 2 106.5863 67.02523 172.4712 66.53329 66.1 20.76811 5 125.7766 2 1 2 137 57 78 50 34 1 19 13.65 0 34 0 86.80575 86.80575 2
1 8 11.59754 2 129.2816 71.59151 166.422 69.28145 72.6 24.63304 3 124.4966 3 2 2 202 72 109 82 35 3 15 27.39 0 36 0 100.4365 100.4365 1
1 8 13.63723 2 107.3942 88.21026 168.7359 82.19693 77.4 29.38325 5 74.71997 2 4 3 214 46 125 82 38 3 4 26.13 1 36 0 97.80223 97.80223 2
2 4 14.39014 2 117.9862 68.84469 170.6802 70.0621 72.9 22.01023 5 86.78664 2 3 2 128 58 55 64 40 2 7 22.99 1 37 0 93.41546 93.41546 2
2 9 13.48665 2 115.8089 78.08692 175.4728 83.1346 75.1 25.61255 5 107.2433 3 3 2 149 45 67 75 33 3 7 17.54 1 39 0 96.94791 96.94791 2
2 5 11.22793 2 116.3035 78.46944 163.367 53.58432 67.05 20.4895 3 48.14998 2 2 2 177 209 88 57 45 2 17 16.72 1 45 0 97.38647 97.38647 2
2 5 13.31691 2 133.3832 89.3615 170.0081 80.32134 80.15 25.29164 5 149.0733 2 3 1 191 58 116 66 40 3 0 31.33 1 45 0 111.3724 111.3724 1
1 9 12.65161 2 106.9176 80.35139 169.362 53.93752 61.9 16.90404 3 247.1233 4 2 2 187 94 87 86 44 2 8 44.63 0 50 0 93.63449 93.63449 2
1 9 13.26489 2 111.2239 86.61871 164.3119 82.75117 77.5 26.92132 5 118.3266 2 4 2 199 49 127 64 41 3 9 31.67 1 51 0 98.9213 98.9213 2
2 9 12.00821 2 107.6591 62.72355 150.3425 49.80443 64.5 20.13472 3 158.6633 2 3 2 140 83 78 49 32 3 15 10.79 0 53 0 85.19134 85.19134 2
2 9 14.06708 2 111.071 62.60898 159.3711 62.51302 70.45 22.50365 5 69.91996 3 3 2 162 124 85 58 33 4 15 33.05 0 53 0 86.83997 86.83997 2
1 7 14.88569 2 116.318 75.72048 169.3442 85.07737 83.75 28.21686 5 100.7966 1 1 1 155 121 82 54 38 1 9 20.89 0 55 0 96.01926 96.01926 2
2 6 13.45106 2 103.3437 67.80637 171.0276 52.39116 61.45 15.08567 5 22.19999 3 2 2 145 58 68 68 42 2 12 14.05 1 57 0 85.57503 85.57503 2

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Mathematics Questions!