## 2.3 Carrying out the test: Paired \(t\)-test

We are now ready to carry out the paired \(t\)-test to test whether the true mean difference between before and after weights is different from 0. The results of the test are as follows:

```
Paired t-test
data: anorexia$Prewt and anorexia$Postwt
t = -2.9376, df = 71, p-value = 0.004458
alternative hypothesis: true difference in means is not equal to 0
95 percent confidence interval:
-4.6399424 -0.8878354
sample estimates:
mean of the differences
-2.763889
```

We note the following:

- The
**\(p\)-value**is 0.00446, which is less than 0.05, so we reject \(H_0\). That is, we have enough evidence to conclude that the difference between before and after weights is statistically significant. - The
**95% confidence interval**for \(\mu_D\) is (-4.64, -0.89), meaning we are 95% confident that the average weight gain was between 4.64 and 0.89 lbs. Since this interval does not include 0, we can reject \(H_0\). - The
**test statistic**is \(t = -2.9376\) - The
**degrees of freedom**is \(71\) - The
**sample mean**of the paired differences is \(-2.76\).