I don’t understand the Solution for E11.8.
H0: muB-muA >=0 ok!
alternativ should be then
H1: muB-muA <0
The solution’s t.test Syntax is:
dep.t.test <- t.test(weight$before, weight$after, paired = TRUE, alternative = “g”)
shouldn’t it be:
dep.t.test <- t.test(weight$before, weight$after, paired = TRUE, alternative = “less”)
Thanks for the Help.
Hi Alex, thanks for the question and apologies for the delay in response — unfortunately, this got lost in the threads somehow.
Not quite. But I do see now that the way I’ve stated the H0 might be a little confusing — I am editing the file now.
The code in the solution is going off of this formulation of the hypotheses:
H0: muB – muA <= 0 OR D0 <= 0 (as defined here, the D is a negative number; or in the After condition people are either keeping their weight or increasing it)
H1: muB – muA > 0 OR D1 > 0 (as defined here, the D is a positive number)
So, in our code, we’d set the alternative argument in the code to “g” or the true difference in means is “more than zero“!
dep.t.test <- t.test(magn$Before, magn$After, paired=TRUE, alternative = "g")
Hopefully, this is helpful.
Thank you for the question!
Hello Simona, I am confused with the Ho and trying to wrap my head around the solution. In my eyes, where: —> (Ub – Ua) = Do —> shouldn't "Do" be "> or =" to Zero? If we are trying to reject the Null, then why wouldn't Ho be something along the lines of: "The average weight of individuals in the before and after group did not decline (hence greater than or equal to) zero" and then if reject that going with H1 which would be Do < 0 stated along the lines of " At "x" % significance level, we can reject the Null and conclude participants in the weight-loss program experienced a statistically significant DECLINE in weight??