Wednesday, April 22, 2020

Answer for R T Test Weightloss example E11.8

https://365datascience.com/dwqa-answer/answer-for-r-t-test-weightloss-example-e11-8/ -

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.

Anyhow, so…

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! 

Best wishes, 

Simona
365 Team

 




#365datascience #DataScience #data #science #365datascience #BigData #tutorial #infographic #career #salary #education #howto #scientist #engineer #course #engineer #MachineLearning #machine #learning #certificate #udemy

No comments:

Post a Comment