In: Math
Cognitive-based therapy (CBT) and family-based therapy (FBT) are two different treatments for anorexia. In an experimental study, forty-six anorexic teenage girls were randomly assigned to two groups. One group, consisting of n1 = 29 individuals, received CBT, and the other group, consisting of n2 = 17 individuals, received FBT. Weight of each individual is measured twice, once at the beginning and once at the end of the study period. The variable of interest is the weight change, i.e. weight after therapy minus weight before therapy. The data collected from the two samples are given below.
cognitive = c(1.7, 0.7, -0.1, -0.7, -3.5, 14.9, 3.5, 17.1, -7.6, 1.6, 11.7, 6.1,
1.1, -4.0, 20.9, -9.1, 2.1, -1.4, 1.4, -0.3, -3.7, -0.8, 2.4, 12.6, 1.9, 3.9,
0.1, 15.4, -0.7)
family = c(11.4, 11.0, 5.5, 9.4, 13.6, -2.9, -0.1, 7.4, 21.5, -5.3, -3.8, 13.4,
13.1, 9.0, 3.9, 5.7, 10.7)
Note that a positive weight change (weight gain) is generally good for anorexia patients. Let μ1 be the population mean weight change in the CBT group, and μ2 the population mean weight change in the FBT group. The goal is to conduct statistical inference on the difference μ1 − μ2
-
4. Two-sample t-test relies on the assumption that the two samples are either large enough (n1 ≥ 30 and n2 ≥ 30) or coming from normal distributions. In the context of this problem, neither of the two samples is large enough.
(a) Check the normality assumption for both samples using the normal quantile-quantile plot. Re- member that you can do this in R using the qqnorm command.
(b) Suppose one thinks that the normality assumption does not hold for this data set, hence does not trust the results provided in the two-sample t-test. Suggest a different hypothesis testing procedure that does not rely on the normality assumption. (Note: You don’t have to carry out the test.
for the first sample cognitive the qq plot is given by
for the second sample
the normality assumption holds for this data
when the normality assumption is not valid we need to do non parametric test
a non parametric test for comparing two means is wilcoxon signed rank test
it can be done in R by the following way
wilcox.test(a,b)
Wilcoxon rank sum test
with continuity
correction
data: a and b
W = 165, p-value = 0.06526
alternative hypothesis: true location shift is not equal to 0
since p value is greater than 0.05 we accept ho:ux=uy and conclude
that there is not much difference
procedure:
Calculate each paired difference, di = xi − yi , where xi , yi are the pairs of observations
Rank the di's, ignoring the signs (i.e. assign rank 1 to the smallest |di |, rank 2 to the next etc.)
Label each rank with its sign, according to the sign of di .
Calculate W+, the sum of the ranks of the positive dis, and W−, the sum of the ranks of the negative dis. (As a check the total, W+ + W−, should be equal to n(n+1) 2 , where n is the number of pairs of observations in the sample).
Choose W = min(W−, W+). Use tables of critical values for the Wilcoxon signed rank sum test to find the probability of observing a value of W or more extreme. Most tables give both one-sided and two-sided p-values. If not, double the one-sided p-value to obtain the two-sided p-value. This is an exact test.