## 2.2 Visualising the data and checking assumptions: Paired $$t$$-test

At this point, we will again visualise the data and look at some basic descriptive statistics. This can give us an idea of what we may expect when we carry out the hypothesis test, and also help us check the assumptions.

First of all, let's take a look at some boxplots, and also the sample size, sample mean, and standard deviations (SD's) for both groups, as well as the paired differences: Sample size Mean SD Pre 72 82.41 5.18 Post 72 85.17 8.04 Paired differences 72 -2.76 7.98

From the above, we can observe the following:

1. The boxplots and sample means indicate that the average pre and post weights look different. When we carry out the $$t$$-test, we will see whether or not this difference is statistically significant
2. The mean paired difference is -2.76, with a standard deviation of 7.98. The paired $$t$$-test will be testing to see whether this is significantly different from 0.
3. The sample size of the paired differences is 72. This will be useful knowledge when checking for normality.

Checking for normality

When checking for normality for the paired $$t$$-test, this needs to be done for the paired differences variable. Let's take a look at the histogram, Normal Q-Q plot, and Shapiro-Wilk test results: Shapiro-Wilk test for paired differences:


Shapiro-Wilk normality test

data:  anorexia\$paired.differences
W = 0.97466, p-value = 0.1544

Considering the histograms, Normal Q-Q plots, Shapiro-Wilk test results, and sample size ($$n = 72$$), we can safely conclude the normality assumption has been met.

We are now ready to carry out the paired $$t$$-test.