In: Statistics and Probability
How do I even begin to solve this using R
statistical software?
A random sample of eight pairs of twins was randomly assigned to
treatment A or treatment B. The data are given in the following
table:
Twins | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
Treatment A | 48.3 | 44.6 | 49.7 | 40.5 | 54.3 | 55.6 | 45.8 | 35.4 |
Treatment B | 43.5 | 43.8 | 53.7 | 43.9 | 54.4 | 54.7 | 45.2 | 34.4 |
What is the p-value of the Wilcoxon signed-rank test?
Is there any significant evidence that the two treatments differ using an α = 0.05 and Wilcoxon-signed rank test.
Compare the p-value of the Wilcoxon-signed rank test and paired t-test.
>
treatment_A=c(48.3,44.6,49.7,40.5,54.3,55.6,45.8,35.4)
> treatment_B=c(43.5,43.8,53.7,43.9,54.4,54.7,45.2,34.4)
> wilcox.test(treatment_A, treatment_B, paired = TRUE,
alternative = "two.sided")
Wilcoxon signed rank test
data: treatment_A and treatment_B
V = 22, p-value = 0.6406
alternative hypothesis: true location shift is not equal to 0
As p-value = 0.6406 >0.05 we accept the null hypothesis and conclude there is no significant difference between two treatments.
# let's perfom paired t-test
> t.test(treatment_A, treatment_B, paired = TRUE, alternative = "two.sided")
Paired t-test
data: treatment_A and treatment_B
t = 0.076822, df = 7, p-value = 0.9409
alternative hypothesis: true difference in means is not equal to
0
95 percent confidence interval:
-2.233538 2.383538
sample estimates:
mean of the differences
0.075
Here p-value = 0.9409 >0.05 so we accept the null hypothesis and conclude that their is no significant difference between two treatments.
Compare the p-value of the Wilcoxon-signed rank test and paired t-test.
p-value for paired t-test is 0.9409 and Wilcoxon-signed rank test p-value = 0.6406 so p-value for paired t-test is high as compare to Wilcoxon-signed rank test.
And also indicates that paired t-test has strong evidence for accepting null hypothesis.