The weight of 11 schoolchildren was measured before and after six months on the proposed lunch plan.
The weights before were: 132, 146, 135, 141, 139, 162, 128, 137, 145, 151, 131
The weights after were: 136, 145, 140, 147, 142, 160, 137, 136, 149, 158, 120
With $ \alpha = 0.95 $, conduct a hypothesis test, including hypotheses, test statistic, rejection region, and p-value, testing whether there is a difference between the mean weight before vs. after.
So far, I've found: $ \overline{d} = -2.091, s_d = 5.576 $
I've identified the hypotheses as
$ H_0: \mu_x = \mu_y \ \ , H_1: \mu_x \ne \mu_y$
What would be the next step? What would be the test statistic? The population variance is unknown, right? Since I only know the data for my small sample.
The two test statistics which come to mind are:
$$ Z = \frac{\bar{X}-\mu_0}{\frac{\sigma}{\sqrt{n}}} $$
$$ T = \frac{\bar{X}-\mu_0}{\frac{S}{\sqrt{n}}} $$
Both of which involve $ \mu_0 $, which I don't know.
Any help will be really appreciated.
Paired t test
Specify hypotheses and test statistic. It is useful to take $H_0: \mu_d = 0$ and the alternative as $H_1: \mu_d \ne 0.$ Then the $T$-statistic is $$ T = \frac{\bar d - \mu_d}{s_d/\sqrt{n}} = \frac{\bar d}{s_d/\sqrt{n}} = \frac{-2.091}{5.576/\sqrt{11}} = -1.244.$$
Distribution of test statistic. If the null hypothesis it true, your $T$-statistic has Student's t distribution with 10 degrees of freedom. You must mean that you intend to test at the 5% level.
Rejection region. For your two-sided alternative (with an $\ne$-sign), the rejection region is found by cutting 2.5% of the area under the t density curve from each tail. Tables give these values as $\pm 2.228.$ Thus you reject the null hypothesis if $|T| \ge 2.228.$ In terms of $T,$ the rejection region has two parts $(-\infty,-2.228]$ and $[2.228, \infty).$ In your case $|T| = 1.244 < 2.228$, so you do not reject $H_0.$
P-value. Finding the exact P-value requires software. I did this paired t-test in R statistical software as shown below. (The initial steps were just to check your computations, which are correct.)
From the output, you can see that the P-value is 0.242. At the 5% level, you would reject $H_0$ if the P-value were 5% or smaller, but it is not.
Confidence interval. The "95%" you mentioned earlier must apply to the confidence interval shown in the output. It says that we have "95% confidence" that the true difference in population means is in the interval $(-5.84, 1.66).$ Notice that this interval includes 0. That is, 0 is a believable value of $\mu_d$, and--from a testing point of view--this is another reason not to reject the null hypothesis.