R^2: The regression output indicates that 0.2577 of variation in life expectancy is explained by the total expenditure.
Standard Error: The error is approximately 8x smaller then the corresponding coefficient.
P-value: 7.714e-14, which is very small in this model which indicates that the total expenditure is a significant variable and that it is likely to impact life expectancy. We reject the null hypothesis.
F-Statistic: 65.26, which is large, usually indicating a stronger relationship between the independent and dependent variables.
The residual plot shows there is no constant variability and that the residuals are not normally distributed.
R^2: The regression output indicates that 0.7298 of variation in life expectancy is explained by the total expenditure. This is better than the first model.
Standard Error: The error is approximately 22x smaller then the corresponding coefficient.
P-value: it’s lower than 2.2e-16 and is very small in this model, which indicates that the total expenditure is a significant variable and that it is likely to impact life expectancy.
F-Statistic: it’s 507.7 and is large, which usually indicating a stronger relationship between the independent and dependent variables.
The residual plot shows that the variability is more constant (compared to the previous model) and it looks that the residuals are nearly normal.
3, Using the results from 3, forecast life expectancy when TotExp^.06 =1.5. Then forecast life expectancy when TotExp^.06=2.5.
result_3 <- data.frame(TotExp_06=c(1.5,2.5))
predict(life2,result_3,interval="predict")^(1/4.6)
## fit lwr upr
## 1 63.31153 35.93545 73.00793
## 2 86.50645 81.80643 90.43414
4, Build the following multiple regression model and interpret the F Statistics, R^2, standard error, and p-values. How good is the model?
LifeExp = b0+b1 x PropMd + b2 x TotExp +b3 x PropMD x TotExp
result_4 <- lm(LifeExp ~ PropMD + TotExp + TotExp:PropMD, who)
summary(result_4)
##
## Call:
## lm(formula = LifeExp ~ PropMD + TotExp + TotExp:PropMD, data = who)
##
## Residuals:
## Min 1Q Median 3Q Max
## -27.320 -4.132 2.098 6.540 13.074
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.277e+01 7.956e-01 78.899 < 2e-16 ***
## PropMD 1.497e+03 2.788e+02 5.371 2.32e-07 ***
## TotExp 7.233e-05 8.982e-06 8.053 9.39e-14 ***
## PropMD:TotExp -6.026e-03 1.472e-03 -4.093 6.35e-05 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 8.765 on 186 degrees of freedom
## Multiple R-squared: 0.3574, Adjusted R-squared: 0.3471
## F-statistic: 34.49 on 3 and 186 DF, p-value: < 2.2e-16
plot(result_4$fitted.values, result_4$residuals, xlab="Fitted Values", ylab="Residuals",
main="Fitted Values vs.Residuals")

qqnorm(result_4$residuals)
qqline(result_4$residuals)

R^2: The regression output indicates that 0.3574 of variation in life expectancy is explained by the total expenditure. This is better than the first model.
Standard Error: The error is approximately 22x smaller then the corresponding coefficient.
P-value: it’s lower than 2.2e-16 and is very small in this model, which indicates that the total expenditure is a significant variable and that it is likely to impact life expectancy.
F-Statistic: it’s 34.49 which indicates a weak relationship between the independent and dependent variables.
The residuals plot shows that the variability is not constant and the residuals are not normally distributed.
5, Forecast LifeExp when PropMD=.03 and TotExp = 14. Does this forecast seem realistic? Why or why not?
from the result of result 4, we can know:
Life Expentancy MR = 62.8 + .000072 Total Expenditure + 1,497 PropMD + .006 * Total Expenditrure * PropMD
result_5 = 62.8 + .000072 * 14 + 1497 * 0.03 + .006 * 14 * 0.03
result_5
## [1] 107.7135
Life expectancy is predicted to be 107.70 which is unrealistic.