The table below shows the weights of seven randomly selected subjects before and after following a particular diet for two months. The dependent sample are from two normally distributed populations. Do the data suggest that the diet is effective in reducing weight? Use a 0.01 significance level.
Subject | A | B | C | D | E | F | G |
---|---|---|---|---|---|---|---|
Before | 191 | 185 | 165 | 191 | 193 | 176 | 161 |
After | 184 | 176 | 163 | 196 | 179 | 178 | 149 |
Solution
The sample size $n = 7$. Let $d=x-y$. So
Before | After | d | d-dbar | (d-dbar)^2 |
---|---|---|---|---|
191 | 184 | 7 | 1.714286 | 2.938776 |
185 | 176 | 9 | 3.714286 | 13.795918 |
165 | 163 | 2 | -3.285714 | 10.795918 |
191 | 196 | -5 | -10.285714 | 105.795918 |
193 | 179 | 14 | 8.714286 | 75.938776 |
176 | 178 | -2 | -7.285714 | 53.081633 |
161 | 149 | 12 | 6.714286 | 45.081633 |
$$ \begin{aligned} \overline{d}& = \frac{1}{n}\sum d_i\\ &= \frac{37}{7}\\ &=5.2857 \end{aligned} $$
and
$$ \begin{aligned} s_d^2 &= \frac{1}{n-1}\sum (d_i-\overline{d})^2\\ &=\frac{307.4285714}{7-1}\\ &=51.2383956 \end{aligned} $$
$s_d =7.1581$.
Step 1 Hypothesis
The hypothesis testing problem is
$H_0 : \mu_d = 0$ against $H_1 : \mu_d > 0$ ($\textit{right-tailed}$)
Step 2 Test Statistic
The test statistic is
$$ \begin{aligned} t=\frac{\overline{d} -\mu_d}{s_d/\sqrt{n}} \end{aligned} $$
Step 3 Level of Significance
The significance level is $\alpha = 0.01$.
Step 4 Critical Value(s)
As the alternative hypothesis is $\textit{right-tailed}$, the critical value of $t$ for $6$ degrees of freedom and $\alpha = 0.01$ level of significance $\text{is}$ $\text{3.143}$.

The rejection region (i.e. critical region) is $\text{t > 3.143}$.
Step 5 Computation
The test statistic for testing above hypothesis testing problem under the null hypothesis is
$$ \begin{aligned} t&=\frac{\overline{d} -\mu_d}{s_d/\sqrt{n}}\\ &= \frac{5.2857-0}{7.1581/\sqrt{7}}\\ &= 1.9537 \end{aligned} $$
Step 6 Decision
Traditional approach:
The test statistic is $t =1.9537$ which falls $\textit{outside}$ the critical region, we $\textit{fail to reject}$ the null hypothesis.
OR
$p$-value approach:
The test is $\textit{right-tailed}$ test, so p-value is the area to the $\textit{right}$ of the test statistic ($t=1.9537$). That is p-value = $P(t\geq 1.9537 ) = 0.0493$.
The p-value is $0.0493$ which is $\textit{greater than}$ the significance level
of $\alpha = 0.01$, we $\textit{fail to reject}$ the null hypothesis.
There is no sufficient evidence to suggest that the diet is effective in reducing weight.
Further Reading
- Statistics
- Descriptive Statistics
- Probability Theory
- Probability Distribution
- Hypothesis Testing
- Confidence interval
- Sample size determination
- Non-parametric Tests
- Correlation Regression
- Statistics Calculators