In: Statistics and Probability
In a study of the effectiveness of a fabric device that acts like a support stocking for a weak or damaged heart, 110 people who consented to treatment were assigned at random to either a standard treatment consisting of drugs or the experimental treatment that consisted of drugs plus surgery to install the stocking. After two years, 35% of the 60 patients receiving the stocking had improved and 26% of the patients receiving the standard treatment had improved. (Use a statistical computer package to calculate the P-value. Use pexperimental ? pstandard. Round your test statistic to two decimal places and your P-value to four decimal places.)
z | = |
P | = |
Given that N = 110 total samples
Let X1 be the standard treatment and n1 be the sample size which is 50 (n1+n2 =110, n2 =60)
p1 = (# patients receiving the standard treatment had improved their health )/n1 = 0.26
Similarly, Let X2 be an experimental treatment with n2=60
p2 = (# patients receiving the experimental treatment had improved their health) /n2 = 0.35
H_0: p1=p2 ( both the treatment affecting equally to the improved health condition of patients)
H_1: (differ significantly)
where S.E(p1-p2) = sqrt(p1q1/n1+p2q2/n2)
Below is the R code for computation purpose
p1 = 0.26;p2 =0.35;n1=50;n2 =60;q1 = 1-p1;q2 =1-p2
SE = sqrt(p1*q1/n1+p2*q2/n2) = 0.08740519
z = (p1-p2)/SE = -1.029687
aplha = .05
zalpha = qnorm(p = 0.05/2,mean = 0,sd =1,lower.tail = TRUE) (both
tailed test so diveded by 2)
= -1.959964
so we reject H_0 because p(z> -alpha)
on the similar line, we can check p-value to as the evidence as against H_0
pvaluenormal = pnorm(z,mean = 0,sd =1, lower.tail = TRUE) = 0.1515784
because pvaluenormal > alpha level significant level.
Z | -1.029687 |
P | 0.1515784 |