Test of the hypothesis: diet affects weight.
Test Data:(weight before and after diet) $60;57, 65;60, 79;70, 55;60, 75;70, 60;65, 69;59, 108;101, 77;67, 88;86$
Firstly I count the difference beetween first and second column (Weight before - Weight after)
then I tried to solve this in R:
weight = c(3,5,9,-5,5,-5,10,7,10,2)
t.test(weight, mu=0)
One Sample t-test
data: weight
t = 2.3459, df = 9, p-value = 0.04359
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
0.1464349 8.0535651
sample estimates:
mean of x
4.1
The $p-value$ is less than $.05$, so I can reject the $H_{0}$ hypothesis. Is this correct?