In: Statistics and Probability
Consider the levels of GHB for control patients and patients
under treatment:
control:
0.7, 0.5, 0.6, 0.8, 0.8, 1.1, 0.5, 0.4, 0.6, 0.7, 0.5, 1.0, 1.5,
1.4, 0.7, 0.9, 0.6, 0.8, 0.9, 1.0, 0.7, 0.7, 0.7, 0.8, 1.0, 0.6,
1.2, 0.7, 0.9, 0.9
treatment:
0.7, 0.8, 0.7, 0.6, 1.0, 0.9, 1.4, 1.4, 1.0, 0.8, 0.6, 1.3, 0.4,
0.5, 0.9, 1.0, 1.0, 0.5, 0.7, 1.0, 1.2, 1.3, 0.6, 1.0, 0.8, 1.4,
0.8, 1.0, 1.3, 1.4
a. Do a 95% hypothesis test to test if:
(H0) the mean CONTROL level is greater than 0.89 vs. (Ha) he mean
CONTROL level is less than 0.89.
Report the p-value: ___
Reject Null hypothesis at the 95% level of confidence?
no
yes
b. Do a 95% hypothesis test to test if:
(H0) the mean of the CONTROL is equal to the mean of the TREATMENT
vs. (Ha) the mean of the CONTROL is not equal to the mean of the
TREATMENT.
Report the p-value: ___
Reject Null hypothesis at the 95% level of confidence?
yes
no
c. Do a 95% hypothesis test to test if:
(H0) the mean of the CONTROL is less than the mean of the TREATMENT
vs. (Ha) the mean of the CONTROL is greater than the mean of the
TREATMENT (Ha).
Report the p-value: ___
Reject Null hypothesis at the 95% level of confidence?
yes
no
a. using R
> control=c(0.7, 0.5, 0.6, 0.8, 0.8, 1.1, 0.5, 0.4, 0.6, 0.7,
0.5, 1.0, 1.5, 1.4, 0.7, 0.9, 0.6, 0.8, 0.9, 1.0, 0.7, 0.7, 0.7,
0.8, 1.0, 0.6, 1.2, 0.7, 0.9, 0.9)
> t.test(control,alternative =c("less") ,mu=0.89 )
One Sample t-test
data: control
t = -1.7745, df = 29, p-value = 0.04324
alternative hypothesis: true mean is less than 0.89
95 percent confidence interval:
-Inf 0.8864599
sample estimates:
mean of x
0.8066667
the p-value: 0.0432
Reject Null hypothesis at the 95% level of confidence?
yes
b. using R
> control=c(0.7, 0.5, 0.6, 0.8, 0.8, 1.1, 0.5, 0.4, 0.6, 0.7,
0.5, 1.0, 1.5, 1.4, 0.7, 0.9, 0.6, 0.8, 0.9, 1.0, 0.7, 0.7, 0.7,
0.8, 1.0, 0.6, 1.2, 0.7, 0.9, 0.9)
> treatment=c(0.7, 0.8, 0.7, 0.6, 1.0, 0.9, 1.4, 1.4, 1.0, 0.8,
0.6, 1.3, 0.4, 0.5, 0.9, 1.0, 1.0, 0.5, 0.7, 1.0, 1.2, 1.3, 0.6,
1.0, 0.8, 1.4, 0.8, 1.0, 1.3, 1.4)
> t.test(control,treatment,alternative =c("two.sided")
,mu=0)
Welch Two Sample t-test
data: control and treatment
t = -1.7563, df = 56.69, p-value = 0.08444
alternative hypothesis: true difference in means is not equal to
0
95 percent confidence interval:
-0.27110492 0.01777158
sample estimates:
mean of x mean of y
0.8066667 0.9333333
Report the p-value:0.0844
Reject Null hypothesis at the 95% level of confidence?
no
c. using R
> t.test(control,treatment,alternative =c("greater"),mu=0)
Welch Two Sample t-test
data: control and treatment
t = -1.7563, df = 56.69, p-value = 0.9578
alternative hypothesis: true difference in means is greater than
0
95 percent confidence interval:
-0.2472671 Inf
sample estimates:
mean of x mean of y
0.8066667 0.9333333
the p-value:0.9578
Reject Null hypothesis at the 95% level of confidence?
no