- 8. Hypothesis Testing
4. Tests in the Two-Sample Normal Model
In this section, we will study hypothesis tests in the two-sample normal model and in the bivariate normal model. This section parallels the section on Estimation in the Two Sample Normal Model in the chapter on Interval Estimation .
The Two-Sample Normal Model
Suppose that \(\bs{X} = (X_1, X_2, \ldots, X_n)\) is a random sample of size \(m\) from the normal distribution with mean \(\mu\) and standard deviation \(\sigma\), and that \(\bs{Y} = (Y_1, Y_2, \ldots, Y_n)\) is a random sample of size \(n\) from the normal distribution with mean \(\nu\) and standard deviation \(\tau\). Moreover, suppose that the samples \(\bs{X}\) and \(\bs{Y}\) are independent .
This type of situation arises frequently when the random variables represent a measurement of interest for the objects of the population, and the samples correspond to two different treatments. For example, we might be interested in the blood pressure of a certain population of patients. The \(\bs{X}\) vector records the blood pressures of a control sample, while the \(\bs{Y}\) vector records the blood pressures of the sample receiving a new drug. Similarly, we might be interested in the yield of an acre of corn. The \(\bs{X}\) vector records the yields of a sample receiving one type of fertilizer, while the \(\bs{Y}\) vector records the yields of a sample receiving a different type of fertilizer.
Usually our interest is in a comparison of the parameters (either the mean or variance) for the two sampling distributions. In this section we will construct tests for the for the difference of the means and the ratio of the variances. As with previous estimation problems we have studied, the procedures vary depending on what parameters are known or unknown. Also as before, key elements in the construction of the tests are the sample means and sample variances and the special properties of these statistics when the sampling distribution is normal.
We will use the following notation for the sample mean and sample variance of a generic sample \(\bs{U} = (U_1, U_2, \ldots, U_k)\): \[ M(\bs{U}) = \frac{1}{k} \sum_{i=1}^k U_i, \quad S^2(\bs{U}) = \frac{1}{k - 1} \sum_{i=1}^k [U_i - M(\bs{U})]^2 \]
Tests of the Difference in the Means with Known Standard Deviations
Our first discussion concerns tests for the difference in the means \(\nu - \mu\) under the assumption that the standard deviations \(\sigma\) and \(\tau\) are known. This is often, but not always, an unrealistic assumption. In some statistical problems, the variances are stable, and are at least approximately known, while the means may be different because of different treatments. Also this is a good place to start because the analysis is fairly easy.
For a conjectured difference of the means \( \delta \in \R \), define the test statistic \[ Z = \frac{[M(\bs{Y}) - M(\bs{X})] - \delta}{\sqrt{\sigma^2 / m + \tau^2 / n}} \]
- If \( \nu - \mu = \delta \) then \( Z \) has the standard normal distribution.
- If \( \nu - \mu \ne \delta \) then \(Z\) has the normal distribution with mean \([(\nu - \mu) - \delta] \big/ {\sqrt{\sigma^2 / m + \tau^2 / n}}\) and variance 1.
From properties of normal samples, \( M(\bs{X}) \) has a normal distribution with mean \( \mu \) and variance \( \sigma^2 / m \) and similarly \( M(\bs{Y}) \) has a normal distribution with mean \( \nu \) and variance \( \tau^2 / n \). Since the samples are independent, \( M(\bs{X}) \) and \( M(\bs{Y}) \) are independent, so \( M(\bs{Y}) - M(\bs{X}) \) has a normal distribution with mean \( \nu - \mu \) and variance \( \sigma^2 / m + \sigma^2 / n \). The final result then follows since \( Z \) is a linear function of \( M(\bs{Y}) - M(\bs{X}) \).
Of course (b) actually subsumes (a), but we separate them because the two cases play an impotrant role in the hypothesis tests. In part (b), the non-zero mean can be viewed as a non-centrality parameter .
As usual, for \(p \in (0, 1)\), let \(z(p)\) denote the quantile of order \(p\) for the standard normal distribution. For selected values of \(p\), \(z(p)\) can be obtained from the quantile app or from most statistical software packages. Recall also by symmetry that \(z(1 - p) = -z(p)\).
For every \( \alpha \in (0, 1) \), the following tests have significance level \(\alpha\):
- Reject \(H_0: \nu - \mu = \delta\) versus \(H_1: \nu - \mu \ne \delta\) if and only if \(Z \lt -z(1 - \alpha / 2)\) or \(Z \gt z(1 - \alpha / 2)\) if and only if \( M(\bs{Y}) - M(\bs{X}) \gt \delta + z(1 - \alpha / 2) \sqrt{\sigma^2 / m + \tau^2 / n} \) or \( M(\bs{Y}) - M(\bs{X}) \lt \delta - z(1 - \alpha / 2) \sqrt{\sigma^2 / m + \tau^2 / n} \).
- Reject \(H_0: \nu - \mu \ge \delta\) versus \(H_1: \nu - \mu \lt \delta\) if and only if \(Z \lt -z(1 - \alpha)\) if and only if \( M(\bs{Y}) - M(\bs{X}) \lt \delta - z(1 - \alpha) \sqrt{\sigma^2 / m + \tau^2 / n} \).
- Reject \(H_0: \nu - \mu \le \delta\) versus \(H_1: \nu - \mu \gt \delta\) if and only if \(Z \gt z( 1 - \alpha)\) if and only if \( M(\bs{Y}) - M(\bs{X}) \gt \delta + z(1 - \alpha) \sqrt{\sigma^2 / m + \tau^2 / n} \).
This follows the same logic that we have seen before. In part (a), \( H_0 \) is a simple hypothesis, and under this hypothesis \( Z \) has the standard normal distribution. Thus, if \( H_0 \) is true then the probability of falsely rejecting \( H_0 \) is \( \alpha \) by definition of the quantiles. In parts (b) and (c), \( H_0 \) specifies a range of values of \( \nu - \mu \), and under \( H_0 \), \( Z \) has a nonstandard normal distribution, by . But the largest type 1 error probability is \( \alpha \) and occurs when \( \nu - \mu = \delta \). The decision rules in terms of \( M(\bs{Y}) - M(\bs{X}) \) are equivalent to those in terms of \( Z \) by simple algebra.
For each of the tests above, we fail to reject \(H_0\) at significance level \(\alpha\) if and only if \(\delta\) is in the corresponding \(1 - \alpha\) level confidence interval.
- \( [M(\bs{Y}) - M(\bs{X})] - z(1 - \alpha / 2) \sqrt{\sigma^2 / m + \tau^2 / n} \le \delta \le [M(\bs{Y}) - M(\bs{X})] + z(1 - \alpha / 2) \sqrt{\sigma^2 / m + \tau^2 / n} \)
- \( \delta \le [M(\bs{Y}) - M(\bs{X})] + z(1 - \alpha) \sqrt{\sigma^2 / m + \tau^2 / n} \)
- \( \delta \ge [M(\bs{Y}) - M(\bs{X})] - z(1 - \alpha) \sqrt{\sigma^2 / m + \tau^2 / n} \)
These results follow from . In each case, we start with the inequality that corresponds to not rejecting the null hypothesis and solve for \( \delta \).
Tests of the Difference of the Means with Unknown Standard Deviations
Next we will construct tests for the difference in the means \(\nu - \mu\) under the more realistic assumption that the standard deviations \(\sigma\) and \(\tau\) are unknown. In this case, it is more difficult to find a suitable test statistic, but we can do the analysis in the special case that the standard deviations are the same. Thus, we will assume that \(\sigma = \tau\), and the common value \(\sigma\) is unknown. This assumption is reasonable if there is an inherent variability in the measurement variables that does not change even when different treatments are applied to the objects in the population.
Recall that the pooled estimate of the common variance \(\sigma^2\) is the weighted average of the sample variances, with the degrees of freedom as the weight factors: \[ S^2(\bs{X}, \bs{Y}) = \frac{(m - 1) S^2(\bs{X}) + (n - 1) S^2(\bs{Y})}{m + n - 2} \] The statistic \( S^2(\bs{X}, \bs{Y}) \) is an unbiased and consistent estimator of the common variance \( \sigma^2 \).
For a conjectured \( \delta \in \R \) define the test statistc \[ T = \frac{[M(\bs{Y}) - M(\bs{X})] - \delta}{S(\bs{X}, \bs{Y}) \sqrt{1 / m + 1 / n}} \]
- If \( \nu - \mu = \delta \) then \( T \) has the \(t\) distribution with \(m + n - 2\) degrees of freedom,
- If \( \nu - \mu \ne \delta \) then \( T \) has a non-central \( t \) distribution with \( m + n - 2 \) degrees of freedom and non-centrality parameter \[ \frac{(\nu - \mu) - \delta}{\sigma \sqrt{1/m + 1 /n}} \]
Part (b) actually subsumes part (a), since the ordinary \( t \) distribution is a special case of the non-central \( t \) distribution, with non-centrality parameter 0. With some basic algebra, we can write \( T \) in the form \[ T = \frac{Z + a}{\sqrt{V \big/ (m + n - 2)}}\] where \( Z \) is the standard score of \( M(\bs{Y}) - M(\bs{X}) \), \( a \) is the non-centrality parameter given in the theorem, and \( V = \frac{m + n - 2}{\sigma^2} S^2(\bs{X}, \bs{Y}) \). So \( Z \) has the standard normal distribution, \( V \) has the chi-square distribution with \( m + n - 2 \) degrees of freedom, and \( Z \) and \( V \) are independent. Thus by definition, \( T \) has the non-central \( t \) distribution with \( m + n - 2 \) degrees of freedom and non-centrality parameter \( a \).
As usual, for \(k \gt 0\) and \(p \in (0, 1)\), let \(t_k(p)\) denote the quantile of order \(p\) for the \(t\) distribution with \(k\) degrees of freedom. For selected values of \(k\) and \(p\), values of \(t_k(p)\) can be computed from the quantile app , or from most statistical software packages. Recall also that, by symmetry, \(t_k(1 - p) = -t_k(p)\).
The following tests have significance level \(\alpha\):
- Reject \(H_0: \nu - \mu = \delta\) versus \(H_1: \nu - \mu \ne \delta\) if and only if \(T \lt -t_{m + n - 2}(1 - \alpha / 2)\) or \(T \gt t_{m + n - 2}(1 - \alpha / 2)\) if and only if \( M(\bs{Y}) - M(\bs{X}) \gt \delta + t_{m+n-2}(1 - \alpha / 2) \sqrt{\sigma^2 / m + \tau^2 / n} \) or \( M(\bs{Y}) - M(\bs{X}) \lt \delta - t_{m+n-2}(1 - \alpha / 2) \sqrt{\sigma^2 / m + \tau^2 / n} \)
- Reject \(H_0: \nu - \mu \ge \delta\) versus \(H_1: \nu - \mu \lt \delta\) if and only if \(T \le -t_{m-n+2}(1 - \alpha)\) if and only if \( M(\bs{Y}) - M(\bs{X}) \lt \delta - t_{m+n-2}(1 - \alpha) \sqrt{\sigma^2 / m + \tau^2 / n} \)
- Reject \(H_0: \nu - \mu \le \delta\) versus \(H_1: \nu - \mu \gt \delta\) if and only if \(T \ge t_{m-n+2}(1 - \alpha)\) if and only if \( M(\bs{Y}) - M(\bs{X}) \gt \delta + t_{m+n-2}(1 - \alpha) \sqrt{\sigma^2 / m + \tau^2 / n} \)
This follows the same logic that we have seen before. In part (a), \( H_0 \) is a simple hypothesis, and under this hypothesis \( T \) has the \( t \) distribution with \( m + n - 2 \) degrees of freedom. Thus, if \( H_0 \) is true then the probability of falsely rejecting \( H_0 \) is \( \alpha \) by definition of the quantiles. In parts (b) and (c), \( H_0 \) specifies a range of values of \( \nu - \mu \), and under \( H_0 \), \( T \) has a non-central \( t \) distribution by . But the largest type 1 error probability is \( \alpha \) and occurs when \( \nu - \mu = \delta \). The decision rules in terms of \( M(\bs{Y}) - M(\bs{X}) \) are equivalent to those in terms of \( T \) by simple algebra.
- \( [M(\bs{Y}) - M(\bs{X})] - t_{m+n-2}(1 - \alpha / 2) \sqrt{\sigma^2 / m + \tau^2 / n} \le \delta \le [M(\bs{Y}) - M(\bs{X})] + t_{m+n-2}(1 - \alpha / 2) \sqrt{\sigma^2 / m + \tau^2 / n} \)
- \( \delta \le [M(\bs{Y}) - M(\bs{X})] + t_{m+n-2}(1 - \alpha) \sqrt{\sigma^2 / m + \tau^2 / n} \)
- \( \delta \ge [M(\bs{Y}) - M(\bs{X})] - t_{m+n-2}(1 - \alpha) \sqrt{\sigma^2 / m + \tau^2 / n} \)
Tests of the Ratio of the Variances
Next we will construct tests for the ratio of the distribution variances \(\tau^2 / \sigma^2\). So the basic assumption is that the variances, and of course the means \(\mu\) and \(\nu\) are unknown.
For a conjectured \( \rho \in (0, \infty) \), define the test statistics \[ F = \frac{S^2(\bs{X})}{S^2(\bs{Y})} \rho \]
- If \( \tau^2 / \sigma^2 = \rho \) then \( F \) has the \(F\) distribution with \(m - 1\) degrees of freedom in the numerator and \(n - 1\) degrees of freedom in the denominator.
- If \( \tau^2 / \sigma^2 \ne \rho \) then \( F \) has a scaled \( F \) distribution with \( m - 1 \) degrees of freedom in the numerator, \( n - 1 \) degrees of freedom in the denominator, and scale factor \( \rho \frac{\sigma^2}{\tau^2} \).
Part (b) actually subsumes part (a) when \( \rho = \tau^2 / \rho^2 \), so we will just prove (b). Note that \[ F = \left(\frac{S^2(\bs{X}) \big/ \sigma^2}{S^2(\bs{Y}) \big/ \tau^2}\right) \rho \frac{\sigma^2}{\tau^2} \] But \( S^2(\bs{X}) \big/ \sigma^2 \) has the chi-square distribution with \( m - 1 \) degrees of freedom, \( S^2(\bs{Y}) \big/ \tau^2 \) has the chi-square distribution with \( n - 1 \) degrees of freedom, and the variables are independent. Hence the ratio has the \( F \) distribution with \( m - 1 \) degrees of freedom in the numerator and \( n - 1 \) degrees of freedom in the denominator
The following tests have significance level \( \alpha \):
- Reject \(H_0: \tau^2 / \sigma^2 = \rho\) versus \(H_1: \tau^2 / \sigma^2 \ne \rho\) if and only if \(F \gt f_{m-1, n-1}(1 - \alpha / 2)\) or \(F \lt f_{m-1, n-1}(\alpha / 2 )\).
- Reject \(H_0: \tau^2 / \sigma^2 \le \rho\) versus \(H_1: \tau^2 / \sigma^2 \gt \rho\) if and only if \(F \lt f_{m-1, n-1}(\alpha)\).
- Reject \(H_0: \tau^2 / \sigma^2 \ge \rho\) versus \(H_1: \tau^2 / \sigma^2 \lt \rho\) if and only if \(F \gt f_{m-1, n-1}(1 - \alpha)\).
The proof is the usual argument. In part (a), \( H_0 \) is a simple hypothesis, and under this hypothesis \( F \) has the \( f \) distribution with \( m - 1 \) degrees of freedom in the numerator \( n - 1 \) degrees of freedom in the denominator. Thus, if \( H_0 \) is true then the probability of falsely rejecting \( H_0 \) is \( \alpha \) by definition of the quantiles. In parts (b) and (c), \( H_0 \) specifies a range of values of \( \tau^2 / \sigma^2 \), and under \( H_0 \), \( F \) has a scaled \( F \) distribution by thoerem . But the largest type 1 error probability is \( \alpha \) and occurs when \( \tau^2 / \sigma^2 = \rho \).
For each of the tests above, we fail to reject \(H_0\) at significance level \(\alpha\) if and only if \(\rho_0\) is in the corresponding \(1 - \alpha\) level confidence interval.
- \( \frac{S^2(\bs{Y})}{S^2(\bs{X})} F_{m-1,n-1}(\alpha / 2) \le \rho \le \frac{S^2(\bs{Y})}{S^2(\bs{X})} F_{m-1,n-1}(1 - \alpha / 2) \)
- \(\rho \le \frac{S^2(\bs{Y})}{S^2(\bs{X})} F_{m-1,n-1}(\alpha) \)
- \( \rho \ge \frac{S^2(\bs{Y})}{S^2(\bs{X})} F_{m-1,n-1}(1 - \alpha) \)
These results follow from . In each case, we start with the inequality that corresponds to not rejecting the null hypothesis and solve for \( \rho \).
Tests in the Bivariate Normal Model
In this subsection, we consider a model that is superficially similar to the two-sample normal model, but is actually much simpler. Suppose that \[ ((X_1, Y_1), (X_2, Y_2), \ldots, (X_n, Y_n)) \] is a random sample of size \(n\) from the bivariate normal distribution of \((X, Y)\) with \(\E(X) = \mu\), \(\E(Y) = \nu\), \(\var(X) = \sigma^2\), \(\var(Y) = \tau^2\), and \(\cov(X, Y) = \delta\).
Thus, instead of a pair of samples , we have a sample of pairs . The fundamental difference is that in this model, variables \( X \) and \( Y \) are measured on the same objects in a sample drawn from the population, while in the previous model, variables \( X \) and \( Y \) are measured on two distinct samples drawn from the population. The bivariate model arises, for example, in before and after experiments , in which a measurement of interest is recorded for a sample of \(n\) objects from the population, both before and after a treatment. For example, we could record the blood pressure of a sample of \(n\) patients, before and after the administration of a certain drug.
We will use our usual notation for the sample means and variances of \(\bs{X} = (X_1, X_2, \ldots, X_n)\) and \(\bs{Y} = (Y_1, Y_2, \ldots, Y_n)\) in definition . Recall also that the sample covariance of \( (\bs{X}, \bs{Y}) \) is \[ S(\bs{X}, \bs{Y}) = \frac{1}{n - 1} \sum_{i=1}^n [X_i - M(\bs{X})][Y_i - M(\bs{Y})] \] (not to be confused with the pooled estimate of the standard deviation in definition ).
The sequence of differences \(\bs{Y} - \bs{X} = (Y_1 - X_1, Y_2 - X_2, \ldots, Y_n - X_n)\) is a random sample of size \(n\) from the distribution of \(Y - X\). The sampling distribution is normal with
- \(\E(Y - X) = \nu - \mu\)
- \(\var(Y - X) = \sigma^2 + \tau^2 - 2 \, \delta\)
The sample mean and variance of the sample of differences are
- \(M(\bs{Y} - \bs{X}) = M(\bs{Y}) - M(\bs{X})\)
- \(S^2(\bs{Y} - \bs{X}) = S^2(\bs{X}) + S^2(\bs{Y}) - 2 \, S(\bs{X}, \bs{Y})\)
The sample of differences \(\bs{Y} - \bs{X}\) fits the normal model for a single variable. The section on tests in the mormal ,odel could be used to perform tests for the distribution mean \(\nu - \mu \) and the distribution variance \(\sigma^2 + \tau^2 - 2 \delta\).
Computational Exercises
A new drug is being developed to reduce a certain blood chemical. A sample of 36 patients are given a placebo while a sample of 49 patients are given the drug. The statistics (in mg) are \(m_1 = 87\), \(s_1\ = 4\), \(m_2 = 63\), \(s_2 = 6\). Test the following at the 10% significance level:
- \(H_0: \sigma_1 = \sigma_2\) versus \(H_1: \sigma_1 \ne \sigma_2\).
- \(H_0: \mu_1 \le \mu_2\) versus \(H_1: \mu_1 \gt \mu_2\) (assuming that \(\sigma_1 = \sigma_2\)).
- Based on (b), is the drug effective?
- Test statistic 0.4, critical values 0.585, 1.667. Reject \(H_0\).
- Test statistic 1.0, critical values \(\pm 1.6625\). Fail to reject \(H_0\).
- Probably not
A company claims that an herbal supplement improves intelligence. A sample of 25 persons are given a standard IQ test before and after taking the supplement. The before and after statistics are \(m_1 = 105\), \(s_1 = 13\), \(m_2 = 110\), \(s_2 = 17\), \(s_{1, \, 2} = 190\). At the 10% significance level, do you believe the company's claim?
Test statistic 2.8, critical value 1.3184. Reject \(H_0\).
In Fisher's iris data , consider the petal length variable for the samples of Versicolor and Virginica irises. Test the following at the 10% significance level:
- \(H_0: \mu_1 \le \mu_2\) versus \(\mu_1 \gt \mu_2\) (assuming that \(\sigma_1 = \sigma_2\)).
- Test statistic 1.1, critical values 0.6227, 1.6072. Fail to reject \(H_0\).
- Test statistic \(-11.4\), critical value \(-1.6602\). Reject \(H_0\).
A plant has two machines that produce a circular rod whose diameter (in cm) is critical. A sample of 100 rods from the first machine as mean 10.3 and standard deviation 1.2. A sample of 100 rods from the second machine has mean 9.8 and standard deviation 1.6. Test the following hypotheses at the 10% level.
- \(H_0: \mu_1 = \mu_2\) versus \(H_1: \mu_1 \ne \mu_2\) (assuming that \(\sigma_1 = \sigma_2\)).
- Test statistic 0.56, critical values 0.7175, 1.3942. Reject \(H_0\).
- Test statistic \(-4.97\), critical values \(\pm 1.645\). Reject \(H_0\).
- The Open University
- Accessibility hub
- Guest user / Sign out
- Study with The Open University
My OpenLearn Profile
Personalise your OpenLearn profile, save your favourite content and get recognition for your learning
About this free course
Become an ou student, download this course, share this free course.
Start this free course now. Just create an account and sign in. Enrol and complete the course for a free statement of participation or digital badge if available.
4.1 The normal distribution
Here, you will look at the concept of normal distribution and the bell-shaped curve. The peak point (the top of the bell) represents the most probable occurrences, while other possible occurrences are distributed symmetrically around the peak point, creating a downward-sloping curve on either side of the peak point.
The cartoon shows a bell-shaped curve. The x-axis is titled ‘How high the hill is’ and the y-axis is titled ‘Number of hills’. The top of the bell-shaped curve is labelled ‘Average hill’, but on the lower right tail of the bell-shaped curve is labelled ‘Big hill’.
In order to test hypotheses, you need to calculate the test statistic and compare it with the value in the bell curve. This will be done by using the concept of ‘normal distribution’.
A normal distribution is a probability distribution that is symmetric about the mean, indicating that data near the mean are more likely to occur than data far from it. In graph form, a normal distribution appears as a bell curve. The values in the x-axis of the normal distribution graph represent the z-scores. The test statistic that you wish to use to test the set of hypotheses is the z-score . A z-score is used to measure how far the observation (sample mean) is from the 0 value of the bell curve (population mean). In statistics, this distance is measured by standard deviation. Therefore, when the z-score is equal to 2, the observation is 2 standard deviations away from the value 0 in the normal distribution curve.
A symmetrical graph reminiscent of a bell. The top of the bell-shaped curve appears where the x-axis is at 0. This is labelled as Normal distribution.
Hypothesis Testing with the Normal Distribution
Contents Toggle Main Menu 1 Introduction 2 Test for Population Mean 3 Worked Example 3.1 Video Example 4 Approximation to the Binomial Distribution 5 Worked Example 6 Comparing Two Means 7 Workbooks 8 See Also
Introduction
When constructing a confidence interval with the standard normal distribution, these are the most important values that will be needed.
Distribution of Sample Means
where $\mu$ is the true mean and $\mu_0$ is the current accepted population mean. Draw samples of size $n$ from the population. When $n$ is large enough and the null hypothesis is true the sample means often follow a normal distribution with mean $\mu_0$ and standard deviation $\frac{\sigma}{\sqrt{n}}$. This is called the distribution of sample means and can be denoted by $\bar{X} \sim \mathrm{N}\left(\mu_0, \frac{\sigma}{\sqrt{n}}\right)$. This follows from the central limit theorem .
The $z$-score will this time be obtained with the formula \[Z = \dfrac{\bar{X} - \mu_0}{\frac{\sigma}{\sqrt{n}}}.\]
So if $\mu = \mu_0, X \sim \mathrm{N}\left(\mu_0, \frac{\sigma}{\sqrt{n}}\right)$ and $ Z \sim \mathrm{N}(0,1)$.
The alternative hypothesis will then take one of the following forms: depending on what we are testing.
Worked Example
An automobile company is looking for fuel additives that might increase gas mileage. Without additives, their cars are known to average $25$ mpg (miles per gallons) with a standard deviation of $2.4$ mpg on a road trip from London to Edinburgh. The company now asks whether a particular new additive increases this value. In a study, thirty cars are sent on a road trip from London to Edinburgh. Suppose it turns out that the thirty cars averaged $\overline{x}=25.5$ mpg with the additive. Can we conclude from this result that the additive is effective?
We are asked to show if the new additive increases the mean miles per gallon. The current mean $\mu = 25$ so the null hypothesis will be that nothing changes. The alternative hypothesis will be that $\mu > 25$ because this is what we have been asked to test.
\begin{align} &H_0:\mu=25. \\ &H_1:\mu>25. \end{align}
Now we need to calculate the test statistic. We start with the assumption the normal distribution is still valid. This is because the null hypothesis states there is no change in $\mu$. Thus, as the value $\sigma=2.4$ mpg is known, we perform a hypothesis test with the standard normal distribution. So the test statistic will be a $z$ score. We compute the $z$ score using the formula \[z=\frac{\bar{x}-\mu}{\frac{\sigma}{\sqrt{n} } }.\] So \begin{align} z&=\frac{\overline{x}-25}{\frac{2.4}{\sqrt{30} } }\\ &=1.14 \end{align}
We are using a $5$% significance level and a (right-sided) one-tailed test, so $\alpha=0.05$ so from the tables we obtain $z_{1-\alpha} = 1.645$ is our test statistic.
As $1.14<1.645$, the test statistic is not in the critical region so we cannot reject $H_0$. Thus, the observed sample mean $\overline{x}=25.5$ is consistent with the hypothesis $H_0:\mu=25$ on a $5$% significance level.
Video Example
In this video, Dr Lee Fawcett explains how to conduct a hypothesis test for the mean of a single distribution whose variance is known, using a one-sample z-test.
Approximation to the Binomial Distribution
A supermarket has come under scrutiny after a number of complaints that its carrier bags fall apart when the load they carry is $5$kg. Out of a random sample of $200$ bags, $185$ do not tear when carrying a load of $5$kg. Can the supermarket claim at a $5$% significance level that more that $90$% of the bags will not fall apart?
Let $X$ represent the number of carrier bags which can hold a load of $5$kg. Then $X \sim \mathrm{Bin}(200,p)$ and \begin{align}H_0&: p = 0.9 \\ H_1&: p > 0.9 \end{align}
We need to calculate the mean $\mu$ and variance $\sigma ^2$.
\[\mu = np = 200 \times 0.9 = 180\text{.}\] \[\sigma ^2= np(1-p) = 18\text{.}\]
Using the normal approximation to the binomial distribution we obtain $Y \sim \mathrm{N}(180, 18)$.
\[\mathrm{P}[X \geq 185] = \mathrm{P}\left[Z \geq \dfrac{184.5 - 180}{4.2426} \right] = \mathrm{P}\left[Z \geq 1.0607\right] \text{.}\]
Because we are using a one-tailed test at a $5$% significance level, we obtain the critical value $Z=1.645$. Now $1.0607 < 1.645$ so we cannot accept the alternative hypothesis. It is not true that over $90$% of the supermarket's carrier bags are capable of withstanding a load of $5$kg.
Comparing Two Means
When we test hypotheses with two means, we will look at the difference $\mu_1 - \mu_2$. The null hypothesis will be of the form
where $a$ is a constant. Often $a=0$ is used to test if the two means are the same. Given two continuous random variables $X_1$ and $X_2$ with means $\mu_1$ and $\mu_2$ and variances $\frac{\sigma_1^2}{n_1}$ and $\frac{\sigma_2^2}{n_2}$ respectively \[\mathrm{E} [\bar{X_1} - \bar{X_2} ] = \mathrm{E} [\bar{X_1}] - \mathrm{E} [\bar{X_2}] = \mu_1 - \mu_2\] and \[\mathrm{Var}[\bar{X_1} - \bar{X_2}] = \mathrm{Var}[\bar{X_1}] - \mathrm{Var}[\bar{X_2}]=\frac{\sigma_1^2}{n_1}+\frac{\sigma_2^2}{n_2}\text{.}\] Note this last result, the difference of the variances is calculated by summing the variances.
We then obtain the $z$-score using the formula \[Z = \frac{(\bar{X_1}-\bar{X_2})-(\mu_1 - \mu_2)}{\sqrt{\frac{\sigma_1^2}{n_1}+\frac{\sigma_2^2}{n_2}}}\text{.}\]
These workbooks produced by HELM are good revision aids, containing key points for revision and many worked examples.
- Tests concerning a single sample
- Tests concerning two samples
Selecting a Hypothesis Test
IMAGES
VIDEO
COMMENTS
Step 3. Assuming the null hypothesis to be true, define the test statistic, usually. Step 4. Calculate either the critical value (s) or the p - value (probability of the observed value) for the test. Step 5. Compare the observed value of the test statistic with the critical value (s) or the p - value with the significance level.
The Two-Sample Normal Model. Suppose that X = (X 1, X 2, …, X n) is a random sample of size m from the normal distribution with mean μ and standard deviation σ, and that Y = (Y 1, Y 2, …, Y n) is a random sample of size n from the normal distribution with mean ν and standard deviation τ. Moreover, suppose that the samples X and Y are ...
This is a test of two independent groups, two population means. Random variable: ˉXg − ˉXb = difference in the sample mean amount of time girls and boys play sports each day. H0: μg = μb. H0: μg − μb = 0. Ha: μg ≠ μb.
Definition (Normal Distribution) The normal distributions are a family of distribution curves. Each member of the family is specified by two parameters: the standard deviation, denoted by σ. normal distribution follows a bell-shaped curve. For shorthand we often use the notation N (μ, σ) to specify a normal distribution with parameters μ ...
Either the matched pairs have differences that come from a population that is normal or the number of difference; 10.6: Hypothesis Testing for Two Means and Two Proportions (Worksheet) A statistics Worksheet: The student will select the appropriate distributions to use in each case. The student will conduct hypothesis tests and interpret the ...
A normal distribution is a probability distribution that is symmetric about the mean, indicating that data near the mean are more likely to occur than data far from it. In graph form, a normal distribution appears as a bell curve. The values in the x-axis of the normal distribution graph represent the z-scores. The test statistic that you wish ...
Distribution for the test: Use tdf where df is calculated using the df formula for independent groups, two population means. Using a calculator, df is approximately 18.8462. Do not pool the variances. Calculate the test statistic and the p-value using a Student's t-distribution: t = − 3.1424, p-value = 0.0054.
This page titled 9.4: Distribution Needed for Hypothesis Testing is shared under a CC BY 4.0 license and was authored, remixed, and/or curated by OpenStax via source content that was edited to the style and standards of the LibreTexts platform. When testing for a single population mean: A Student's t-test should be used if the data come from a ...
H 1: μ> 25. Now we need to calculate the test statistic. We start with the assumption the normal distribution is still valid. This is because the null hypothesis states there is no change in μ μ. Thus, as the value σ = 2.4 σ = 2.4 mpg is known, we perform a hypothesis test with the standard normal distribution.
Chapter 9 9.6 Comparing the Means of Two Normal Distributions Power function is now a function of 3 parameters: ˇ( 1; 2;˙2j ) The two-sample t-test is a likelihood ratio test (see p. 592) Important difference: Paired t test vs. two sample t test Two-sample t test with unequal variances Proposed test-statistics do not have known distribution, but