In: Statistics and Probability
3. Three different treatments for hypertension (high blood pressure) are being tested. A medical researcher takes volunteers and randomly assigns them into groups taking treatment A, B, and C. The reduction in blood pressure is measured for each patient with the following results:
> d patient treatment reduction 1 1 A 7.0 2 2 A 7.9 3 3 A 5.0 4 4 A 8.3 5 5 A 3.3 6 6 A 2.8 4 7 7 A 3.9 8 8 A 5.8 9 9 A 2.2 10 10 A 5.1 11 11 B 0.4 12 12 B -1.4 13 13 B -0.8 14 14 B 5.3 15 15 B 1.3 16 16 B 5.9 17 17 B 0.7 18 18 B 5.5 19 19 B 2.3 20 20 C 5.5 21 21 C 5.2 22 22 C 2.2 23 23 C -1.4 24 24 C 3.2 25 25 C 3.0
In R: > dput(d$treatment)
c("A", "A", "A", "A", "A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B", "B", "B", "B", "B", "C", "C", "C", "C", "C", "C" )
> dput(d$reduction)
c(7, 7.9, 5, 8.3, 3.3, 2.8, 3.9, 5.8, 2.2, 5.1, 0.4, -1.4, -0.8, 5.3, 1.3, 5.9, 0.7, 5.5, 2.3, 5.5, 5.2, 2.2, -1.4, 3.2, 3) Is there evidence that blood pressure reduction differs between the treatment groups?\
(a) State a sensible null hypothesis
(b) State the precise definition of p-value and explain what “more extreme” means in this context
(c) Perform an ANOVA using lm() and interpret
1) we want to test,
Ho:The mean of blood pressure reduction does not differs between the treatment groups.
Vs
H1: Atleast one mean of blood pressure reduction differs between the treatment groups.
2)
The p-value is nothing but the probabilty of null hypothesis being true. The more extreme means the p-value is very very less.
3) The necessary r-codes are given below along with output. ( Blue color shows r-code)
> Treatment=c("A", "A",
"A", "A", "A", "A", "A", "A", "A", "A", "B", "B", "B", "B", "B",
"B", "B", "B", "B", "C", "C", "C", "C", "C", "C" )
> reduction=c(7, 7.9, 5, 8.3, 3.3, 2.8, 3.9, 5.8, 2.2, 5.1, 0.4,
-1.4, -0.8, 5.3, 1.3, 5.9, 0.7, 5.5, 2.3, 5.5, 5.2, 2.2, -1.4, 3.2,
3)
> lm=lm(reduction~Treatment)
> summary(lm)
Call:
lm(formula = reduction ~ Treatment)
Residuals:
Min 1Q Median 3Q Max
-4.350 -1.733 -0.030 2.250 3.767
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 5.1300 0.7807 6.571 1.31e-06 ***
TreatmentB -2.9967 1.1344 -2.642 0.0149 *
TreatmentC -2.1800 1.2749 -1.710 0.1013
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 2.469 on 22 degrees of freedom
Multiple R-squared: 0.252, Adjusted R-squared:
0.184
F-statistic: 3.706 on 2 and 22 DF, p-value: 0.04102
>
summary.aov(lm)
Df Sum Sq Mean Sq F value Pr(>F)
Treatment 2 45.17 22.587 3.706 0.041 *
Residuals 22 134.10 6.095
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Conclusion: Here p-value is 0.041< 5% level of significance, therefore we conclude that there sufficient evidence that blood pressure reduction differs between the treatment groups