Question: For the data listed in problems 5, 10, 16 and 19 use Python to do the following: plot the data and the best fitting regression


For the data listed in problems 5, 10, 16 and 19 use Python to do the following: plot the data and the best fitting regression line y = a + b x, state the optimal values of a and b, compute the correlation coefficient r (or the coefficient of determination r2), test the null hypothesis H0:r = 0, and assess the significance ((1 - p(H0 correct))100%) of the regression line.




5. The proportion of the population made up of elderly persons in the United States is rapidly increasing. The implications for health care expenditures are profound because elderly persons use the health care system more frequently than younger persons. In one study the mean cumulative expenditures per person for acute and long-term care from the age of 65 years until death and the corresponding age at death were recorded. Expenditures are given in 1996 dollars. (Source: Spillman, B. and J. Lubitz. 2000. The effect of longevity on spending for acute and long-term care. The New England Journal of Medicine, 342: 1409-1415.) Age at death Mean expenditure 65 31,181 70 87,116 75 123,823 80 157,903 85 193,727 90 235,369 95 287,980 100 358,174 (a) Construct a scatterplot of these data. Does there appear to be a linear rela- tionship between age at death and mean cumulative health care expenditure? (b) Compute the linear regression equation so that Y may be predicted from X. Calculate b to 1 decimal place. Interpret b. (c) Test the significance of this regression equation via ANOVA with Ho: 3 = 0. (d) Calculate the 95% confidence interval for B. (e) Find the predicted mean expenditure for a person age 77 at death, My177, and the 95% confidence interval for this prediction. (f) Find the predicted mean expenditure for a person age 97 at death, jy197, and the 95% confidence interval for this prediction. (g) Why are the two confidence intervals in (e) and ( f) different widths?10. A breeder of golden retriever dogs has kept records on litter size for several years. She wishes to predict the litter size from the age of the breeding bitch at conception. From the following data would you say that this is a legitimate goal? Support your explanation with statistical analysis. Age of bitch Litter size 2.0 11 2.5 10 4.0 9' 3.3 12 6.0 5 5.0 9 4.5 9' 4.1 8 8.2 7' 2.4 10 2.9 12 3.7 10 4.0 9 16. To control Eurasian milfoil and other invasive aquatic weeds, the chemical herbicide 2,4Dichlorophenoxyasetic acid (2,4D), which is a synthetic auxin, is often applied to lakes in the midwest. A housing development is being built around a recently treated lake. The homes have individual wells tapping into the local aquifer. One week after the 2,4D treatment, samples of water from 12 wells were analyzed for the presence of 2,4D. Below are the data in micrograms of 2,4D per liter of well water and the distances in meters of the wells from the edge of the lake. Distance 2,4D level (m) (pg/L) 20 490 SD 455 90 445 IUD 420 120 400 160 300 170 285 180 260 220 220 230 205 290 90 340 50 (a) Is there a linear relationship between 2,4D level and the distance of the well from the lake's edge? (3;) What would you predict for the 2,4D level of a well 250 meters from the lake's edge? Find the 95% condence interval for this predicted value. 19. Hobart and William Smith Colleges participates in the nationwide survey of first- year students sponsored by the Cooperative Institutional Research Program. Data presented here are based on the survey conducted each year among all entering HWS students. One question asks whether students are cigarette smokers or not. Year (0 = 1998) Percent Nonsmokers 59.1 58.0 67.3 67.4 73.0 75.9 78.7 72.2 75.4 81.9 82.6 78.0 80.7 84.3 14 80.8 15 87.6 For these data compute the least squares regression equation (calculate b to three decimal places). Test the equation's significance with ANOVA. Also calculate the 95% confidence interval for the slope, B. Interpret what the slope means
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
