In: Statistics and Probability
This assignment uses hypothesis testing to determine if there is a significant difference between the means of three or more groups. Find solutions to the following problems. Be sure to include a statement about significance and complete a Tukey's HSD when necessary.
Subjects were interviewed about their smoking habits in cigarettes per day and were tested for their aerobic capacity. Taking cigarettes per day as the explanatory (independent) variable and aerobic capacity as the response (dependent) variable, find the correlation coefficient, the least-squares regression line, and the predicted aerobic capacity for someone whose smokes 25 cigarettes a day. Also, test the null hypothesis that smoking does not affect aerobic capacity against the alternative that increased smoking decreases aerobic capacity at 5% significance.
Cigarettes per day |
Aerobic Capacity |
3 |
52 |
5 |
38 |
6 |
45 |
9 |
34 |
11 |
29 |
12 |
31 |
16 |
17 |
19 |
25 |
I have solved it using R.
The output as follows.
Cig Aero
1 3 52
2 5 38
3 6 45
4 9 34
5 11 29
6 12 31
7 16 17
8 19 25
> cor(tt)
Cig Aero
Cig 1.0000000 -0.8946452
Aero -0.8946452 1.0000000
> Aero_lm <- lm(Aero~Cig,data=tt)
> summary(Aero_lm)
Call:
lm(formula = Aero ~ Cig, data = tt)
Residuals:
Min 1Q
Median 3Q
Max
-6.2807 -3.7521 -0.6988 4.0840 7.1292
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 52.1333 4.1777 12.479 1.62e-05
***
Cig
-1.8033 0.3676 -4.905 0.0027
**
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 5.364 on 6 degrees of
freedom
Multiple R-squared: 0.8004, Adjusted R-squared:
0.7671
F-statistic: 24.06 on 1 and 6 DF, p-value: 0.002697
Taking cigarettes per day as the explanatory (independent) variable and aerobic capacity as the response (dependent) variable, find the correlation coefficient, the least-squares regression line, and the predicted aerobic capacity for someone whose smokes 25 cigarettes a day.
The correlation coefficient between the aerobic capacity and cigarettes is -0.8946. The least-squares regression line is . The predicted aerobic capacity for someone who smokes 25 cigarettes a day is 52.1333-1.8033*25 = 7.0508.
Also, test the null hypothesis that smoking does not affect aerobic capacity against the alternative that increased smoking decreases aerobic capacity at 5% significance.
The null hypothesis that smoking does not affect aerobic capacity at 5% significance is rejected since the p-value for the coefficient is very small at 0.0027 .