In: Statistics and Probability
In a comparative double-blind randomized study of single dose fosfomycin trometamol with trimethoprim in the treatment of uncomplicated urinary infections, 20 of 26 were cured with fosfomycin trometamol and 22 of 41 were cured with the reference drug trimethoprim.
Denote the eradication rates for fosfomycin trometamol and the reference drug trimethoprim by p1p1 and p2p2 respectively.
(a) Evaluate the test statistic
Z=p̂ 1−p̂ 2p̂ (1−p̂ )(1n1+1n2)‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾√.Z=p^1−p^2p^(1−p^)(1n1+1n2).
Answer
(b) Use the R function pnorm() and the value of the test statistic from (a) to find the p-value for the test H0:p1=p2H0:p1=p2 versus HA:p1≠p2.HA:p1≠p2. Answer
(c) Calculate a 98% two-sided confidence interval for the difference p1−p2p1−p2using the formula
p̂ 1−p̂ 2±z⋆p̂ 1(1−p̂ 1)n1+p̂ 2(1−p̂ 2)n2‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾‾√p^1−p^2±z⋆p^1(1−p^1)n1+p^2(1−p^2)n2
and the critical value z⋆=2.3263.z⋆=2.3263. The interval ranges from Answer to Answer .
(d) Find the p-value for the test H0:p1=p2H0:p1=p2 versus HA:p1≠p2HA:p1≠p2 using the R function prop.test().Answer
(e) Are the eradication rates for the two drugs significantly different? Use the result of (d) and significance level α=0.02α=0.02 to answer this question. Answeryesno
(f) Calculate a 98% two-sided confidence interval for the difference p1−p2p1−p2using the R function prop.test(). The interval ranges from Answer to Answer .
Here
a)The test statistic is
b) The P-value of the test is
R command is
> 2*pnorm(-2.0824659 )
[1] 0.03729993
c) The
confidence interval for difference in means is
Here
, the 98% CI is
The critical value is
R command below.
> qnorm(0.99)
[1] 2.326348
d) The R command below:
prop.test(c(20,22),c(26,41),alternative = c("two.sided"),conf.level = 0.98, correct = FALSE)
Output is:
2-sample test for equality of proportions without continuity correction
data: c(20, 22) out of c(26, 41)
X-squared = 3.6816, df = 1, p-value = 0.05502
alternative hypothesis: two.sided
98 percent confidence interval:
-0.03149915 0.49678996
sample estimates:
prop 1 prop 2
0.7692308 0.5365854
The p-value = 0.05502.
e) 98 percent confidence interval:
-0.03149915 0.49678996
Since the confidence interval includes 0, the eradication rates for the two drugs significantly are not different.
f) 98 percent confidence interval:
-0.03149915 0.49678996