Data were collected on the differences in weight gains of 12 people one

month after they stopped smoking, compared with their weight at the time
when they stopped smoking. The data are given in Table 2. A positive
quantity corresponds to a gain in weight, a negative quantity toaloss.
Table 2
Person no. 1 234 5 6 789 10 11 12
Weight difference (kg) 1.0 2.3 −0.8 0.1 2.0 0.9 −0.3 2.4 −0.5 2.5 −1.3 2.1
A sign test is to be performed to investigate whether or not people gain
weight after stopping smoking.
(a) Write down the hypothesis to be tested. [1]
(b) Record the number of values lying above and the number lying below
the hypothesised value. What is the value of the test statistic? [2]
(c) What is the appropriate critical value at the 5% significance level? [1]
(d) Decide whether or not you would reject the hypothesis at the
5% significance level. [1]
(e) Using Figure 6 (Subsection 4.1), calculate the p-value given by the
hypothesis test. [3]
(f) Making reference to this p-value, what is the conclusion to be drawn
from the hypothesis test? How does this conclusion sit with the result
of part (d)? What is your overall conclusion in terms of weight change
after stopping smoking, based on these data?

(a) The hypothesis to be tested is whether or not people gain weight after stopping smoking.

(b) To perform the sign test, we need to record the number of values lying above and the number lying below the hypothesized value, which in this case is 0 since we want to test if there is a weight gain or not. Looking at the table, we find that there are 7 values lying above 0 and 5 values lying below 0. The test statistic is the smaller of these two values, which in this case is 5.

(c) The critical value at the 5% significance level depends on the sample size. Since we have 12 data points, we can use the table for the binomial distribution to find the critical value. For a two-tailed test at the 5% significance level with n = 12, the critical value is 3.

(d) To decide whether or not we would reject the hypothesis at the 5% significance level, we compare the test statistic (5) with the critical value (3). If the test statistic is equal to or greater than the critical value, we reject the hypothesis. In this case, the test statistic (5) is greater than the critical value (3), so we would reject the hypothesis at the 5% significance level.

(e) To calculate the p-value, we need to find the probability of observing a test statistic as extreme as or more extreme than the one we obtained (5) under the null hypothesis. Looking at Figure 6 in Subsection 4.1, we find that the p-value is the sum of the probabilities of observing 5 or more successes (values above the hypothesized value) and 5 or more failures (values below the hypothesized value). In this case, the p-value is the probability of getting 5 or more successes and 5 or more failures. Using the binomial distribution table, we can find these probabilities. Let's assume the probability for each individual success or failure is 0.5 for simplicity.

The probability of getting 5 or more successes is:

P(X ≥ 5) = P(X = 5) + P(X = 6) + P(X = 7) + P(X = 8) + P(X = 9) + P(X = 10) + P(X = 11) + P(X = 12)

The probability of getting 5 or more failures is:

P(X ≤ 7) = P(X = 7) + P(X = 8) + P(X = 9) + P(X = 10) + P(X = 11) + P(X = 12)

By summing these probabilities, we can calculate the p-value.

(f) Based on the calculated p-value, we can make our conclusion. If the p-value is smaller than the significance level (5% in this case), we would reject the null hypothesis. If the p-value is larger than the significance level, we fail to reject the null hypothesis.

In this case, the calculated p-value would determine whether the hypothesis is rejected or not. If the p-value is smaller than 0.05 (5%), we would reject the null hypothesis and conclude that people do gain weight after stopping smoking. However, if the p-value is larger than 0.05, we fail to reject the null hypothesis and conclude that there is not enough evidence to suggest that people gain weight after stopping smoking.

Note: Without the exact values of the probabilities for each individual success or failure, I cannot provide a precise calculation of the p-value.