In: Statistics and Probability
Exercise 14-22 (LO14-1, LO14-5)
A regional planner employed by a public university is studying the demographics of nine counties in the eastern region of an Atlantic seaboard state. She has gathered the following data:
County | Median Income | Median Age | Coastal | ||
A | $ | 49,374 | 58.5 | 0 | |
B | 46,850 | 46.5 | 1 | ||
C | 47,586 | 48.5 | 1 | ||
D | 47,781 | 45.5 | 1 | ||
E | 33,738 | 37.3 | 0 | ||
F | 35,553 | 43.4 | 0 | ||
G | 39,910 | 45.3 | 0 | ||
H | 37,266 | 34.2 | 0 | ||
I | 34,571 | 36.5 | 0 |
Yes. The correlation of Income and Median Age is |
Income = | + | Median Age |
B-2 Interpret the value of the slope in a simple regression equation. (Round your answers to 2 decimal places.)
For each year increases in age, the income increases | on average |
C. Include the aspect that the county is "coastal" or not in a multiple linear regression analysis using a "dummy" variable. (Negative amounts should be indicated by a minus sign. Round your answers to 2 decimal places.)
Income = | + | Median Age + | Coastal |
D.
Predictor | t | p-value |
Constant | ||
Median Age | ||
Coastal |
(A) Correlation between INCOME and AGE is given by,
where COV is the covariance between Income and Age, and SD is the standard deviation of Income and Age.
(B) To fit the regression line on Income vs Age.
Therefore, Income = 10171 + 710.36 Age
(C) For each year increase in age, the income increases by 710.36 dollars on average.
(D) For MLR, we use R for computing the regression coefficients. We can use lm(INCOME~AGE+COASTAL) command to obtain the results. I will attach the R code in the end of the answer. We are using R, otherwise the computations will be very lengthy and complex.
The fitted model is, Income = 13611.4 + 582.9 Age + 6497.4 Coastal
(E)
Predictor | t value | p value |
constant | 2.698 | 0.035 |
age | 5.003 | 0.002 |
coastal | 3.768 | 0.009 |
###########################################
R CODE
###########################################
rm(list=ls(all=TRUE))
INCOME=c(49374,46850,47586,47781,33738,35553,39910,37266,34571)
AGE=c(58.5,46.5,48.5,45.5,37.3,43.4,45.3,34.2,36.5)
COASTAL=c(0,1,1,1,0,0,0,0,0)
summary(lm(INCOME~AGE))
summary(lm(INCOME~AGE+COASTAL))