In: Statistics and Probability
A sociologist is interested in the relation between x = number of job changes and y = annual salary (in thousands of dollars) for people living in the Nashville area. A random sample of 10 people employed in Nashville provided the following information.
x (number of job changes) | 6 | 3 | 5 | 6 | 1 | 5 | 9 | 10 | 10 | 3 |
y (Salary in $1000) | 38 | 34 | 32 | 32 | 32 | 38 | 43 | 37 | 40 | 33 |
In this setting we have Σx = 58, Σy = 359, Σx2 = 422, Σy2 = 13,023, and Σxy = 2160.
(a) Find x, y, b, and the equation of the least-squares line. (Round your answers for x and y to two decimal places. Round your least-squares estimates to four decimal places.)
x | = | |
y | = | |
b | = | |
ŷ | = | + x |
(b) Draw a scatter diagram displaying the data. Graph the
least-squares line on your scatter diagram. Be sure to plot the
point (x, y).
(c) Find the sample correlation coefficient r and the
coefficient of determination. (Round your answers to three decimal
places.)
r = | |
r2 = |
What percentage of variation in y is explained by the
least-squares model? (Round your answer to one decimal
place.)
%
(d) Test the claim that the population correlation coefficient
ρ is positive at the 5% level of significance. (Round your
test statistic to three decimal places.)
t =
Find or estimate the P-value of the test statistic.
P-value > 0.2500.125 < P-value < 0.250 0.100 < P-value < 0.1250.075 < P-value < 0.1000.050 < P-value < 0.0750.025 < P-value < 0.0500.010 < P-value < 0.0250.005 < P-value < 0.0100.0005 < P-value < 0.005P-value < 0.0005
Conclusion
Reject the null hypothesis. There is sufficient evidence that ρ > 0.Reject the null hypothesis. There is insufficient evidence that ρ > 0. Fail to reject the null hypothesis. There is sufficient evidence that ρ > 0.Fail to reject the null hypothesis. There is insufficient evidence that ρ > 0.
(e) If someone had x = 7 job changes, what does the
least-squares line predict for y, the annual salary?
(Round your answer to two decimal places.)
thousand dollars
(f) Find Se. (Round your answer to two decimal
places.)
Se =
(g) Find a 90% confidence interval for the annual salary of an
individual with x = 7 job changes. (Round your answers to
two decimal places.)
lower limit | thousand dollars |
upper limit | thousand dollars |
(h) Test the claim that the slope β of the population
least-squares line is positive at the 5% level of significance.
(Round your test statistic to three decimal places.)
t =
Find or estimate the P-value of the test statistic.
P-value > 0.2500.125 < P-value < 0.250 0.100 < P-value < 0.1250.075 < P-value < 0.1000.050 < P-value < 0.0750.025 < P-value < 0.0500.010 < P-value < 0.0250.005 < P-value < 0.0100.0005 < P-value < 0.005P-value < 0.0005
Conclusion
Reject the null hypothesis. There is sufficient evidence that β > 0.Reject the null hypothesis. There is insufficient evidence that β > 0. Fail to reject the null hypothesis. There is sufficient evidence that β > 0.Fail to reject the null hypothesis. There is insufficient evidence that β > 0.
(i) Find a 90% confidence interval for β and interpret its
meaning. (Round your answers to three decimal places.)
lower limit | |
upper limit |
Interpretation
For each less job change, the annual salary increases by an amount that falls within the confidence interval.For each additional job change, the annual salary increases by an amount that falls within the confidence interval. For each additional job change, the annual salary increases by an amount that falls outside the confidence interval.For each less job change, the annual salary increases by an amount that falls outside the confidence interval.
The unavailability of time, please refer r-codes
> x=c(6,3,5,6,1,5,9,10,10,3)
> y=c(38,34,32,32,32,38,43,37,40,33)
> model=lm(y~x)
> summary(model)
Call:
lm(formula = y ~ x)
Residuals:
Min 1Q Median 3Q Max
-4.0818 -2.1268 0.3727 1.5999 4.1916
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 30.6285 1.9889 15.400 3.14e-07 ***
x 0.9089 0.3062 2.969 0.0179 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.833 on 8 degrees of freedom
Multiple R-squared: 0.5242, Adjusted R-squared:
0.4647
F-statistic: 8.813 on 1 and 8 DF, p-value: 0.01791
> confint(model,level=0.9)
5 % 95 %
(Intercept) 26.9301129 34.326896
x 0.3395582 1.478199
>
predict(model,data.frame(x=7),interval='confidence',level=0.90)
fit lwr upr
1 36.99065 35.19031 38.791