1 Tests concerning two samples
Two independent populations each with a known variance
We assume that the populations are normally distributed. This may not always be true and you should note this basic assumption while studying this Section of the Workbook.
A standard notation often used to describe the populations and samples is:
Population | Sample |
${X}_{1}\sim N\left({\mu}_{1},{\sigma}_{1}^{2}\right)$ | ${x}_{11},{x}_{12},{x}_{13},\⋯\phantom{\rule{0.3em}{0ex}},{x}_{1{n}_{1}}$ with ${n}_{1}$ members. |
${X}_{2}\sim N\left({\mu}_{2},{\sigma}_{2}^{2}\right)$ | ${x}_{21},{x}_{22},{x}_{23},\⋯\phantom{\rule{0.3em}{0ex}},{x}_{2{n}_{2}}$ with ${n}_{2}$ members. |
If you are not familiar with the double suffix notation used to represent the samples, simply remember that a random sample of size ${n}_{1}$ is drawn from ${X}_{1}\sim N\left({\mu}_{1},{\sigma}_{1}^{2}\right)$ and a random sample of size ${n}_{2}$ is drawn from ${X}_{1}\sim N\left({\mu}_{1},{\sigma}_{1}^{2}\right)$ .
In diagrammatic form the populations may be represented as follows:
Figure 6
When we look at hypothesis testing using two means, we will be considering the difference ${\mu}_{1}-{\mu}_{2}$ of the means and writing null hypotheses of the form
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}=$ Value
As you might expect, Value will often be zero and we will be trying to detect whether there is any statistically significant evidence of a difference between the means.
We know, from our previous work on continuous distributions (see HELM booklet 38) that:
$\phantom{\rule{2em}{0ex}}\text{E}\left({\stackrel{\u0304}{X}}_{1}-{\stackrel{\u0304}{X}}_{2}\right)=\text{E}\left({\stackrel{\u0304}{X}}_{1}\right)-\text{E}\left({\stackrel{\u0304}{X}}_{2}\right)={\mu}_{1}-{\mu}_{2}$
and that
$\phantom{\rule{2em}{0ex}}\text{V}\left({\stackrel{\u0304}{X}}_{1}-{\stackrel{\u0304}{X}}_{2}\right)=\text{V}\left({\stackrel{\u0304}{X}}_{1}\right)-\text{V}\left({\stackrel{\u0304}{X}}_{2}\right)=\frac{{\sigma}_{1}^{2}}{{n}_{1}}+\frac{{\sigma}_{2}^{2}}{{n}_{2}}$
since ${\stackrel{\u0304}{X}}_{1}$ and ${\stackrel{\u0304}{X}}_{2}$ are independent. Given the assumptions made we can assert that the quantity $Z$ defined by
$\phantom{\rule{2em}{0ex}}Z=\frac{\left({\stackrel{\u0304}{X}}_{1}-{\stackrel{\u0304}{X}}_{2}\right)-\left({\mu}_{1}-{\mu}_{2}\right)}{\sqrt{\frac{{\sigma}_{1}^{2}}{{n}_{1}}+\frac{{\sigma}_{2}^{2}}{{n}_{2}}}}$
follows the standard normal distribution $N\left(0,1\right)$ .
We are now ready to apply this formula to practical problems in which random samples of different sizes are drawn from normal populations. The conditions for the rejection of ${H}_{0}$ at the 5% and the 1% levels of significance are exactly the same as those previously used for single sample problems.
Example 4
A motor manufacturer wishes to replace steel suspension components by aluminium components to save weight and thereby improve performance and fuel consumption. Tensile strength tests are carried out on randomly chosen samples of two possible components before a final choice is made. The results are:
Component | Sample | Mean Tensile | Standard Deviation |
Number | Size | Strength ( $\text{kg}{\text{mm}}^{-2}$ ) | ( $\text{kg}{\text{mm}}^{-2}$ ) |
1 | 15 | 90 | 2.3 |
2 | 10 | 88 | 2.2 |
Is there any difference between the measured tensile strengths at the 5% level of significance?
Solution
The null and alternative hypotheses are:
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}=0\phantom{\rule{2em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}\ne 0$
The null hypothesis represent the statement ‘there is no difference in the tensile strengths of the two components.’ The test statistic $Z$ is calculated as:
$$\begin{array}{rcll}Z& =& \frac{\left({\stackrel{\u0304}{X}}_{1}-{\stackrel{\u0304}{X}}_{2}\right)-\left({\mu}_{1}-{\mu}_{2}\right)}{\sqrt{\frac{{\sigma}_{1}^{2}}{{n}_{1}}+\frac{{\sigma}_{2}^{2}}{{n}_{2}}}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}& \text{}\\ & =& \frac{\left(90-88\right)-\left(0\right)}{\sqrt{\frac{2.{3}^{2}}{15}+\frac{2.{2}^{2}}{10}}}& \text{}\\ & =& \frac{2}{\sqrt{0.3527+0.484}}& \text{}\\ & =& 2.186& \text{}\end{array}$$Since $2.186>1.96$ we conclude that, on the basis of the (limited) evidence available, there is a difference in tensile strength between the components tested. The manufacturer should carry out more comprehensive tests before making a final decision as to which component to use. The decision is a serious one with safety implications as well as economic implications. As well as carrying out more tests the manufacturer should consider the level of rejection of the null hypothesis, perhaps using 1% instead of 5%. Component 1 appears to be stronger but this may not be the case after more tests are carried out.
Task!
A motor manufacturer is considering whether or not a new fuel formulation will improve the maximum power output of a particular type of engine. Tests are carried out on randomly chosen samples of the two fuels in order to inform a decision. The results are:
Fuel | Sample | Mean Maximum | Standard Deviation |
Type | Size | Power Output (bhp) | (bhp) |
1 | 20 | 1350 | 10 |
2 | 16 | 131 | 8 |
Is there any difference between the measured power outputs at the 5% level of significance?
The null and alternative hypotheses are:
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}=0\phantom{\rule{2em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}\ne 0$
The null hypothesis represent the statement ‘there is no difference in the measured maximum power outputs’. The test statistic $Z$ is calculated as:
$\phantom{\rule{2em}{0ex}}Z=\frac{\left({\stackrel{\u0304}{X}}_{1}-{\stackrel{\u0304}{X}}_{2}\right)-\left({\mu}_{1}-{\mu}_{2}\right)}{\sqrt{\frac{{\sigma}_{1}^{2}}{{n}_{1}}+\frac{{\sigma}_{2}^{2}}{{n}_{2}}}}=\frac{\left(135-131\right)-\left(0\right)}{\sqrt{\frac{1{0}^{2}}{20}+\frac{{8}^{2}}{16}}}=\frac{4}{\sqrt{5+4}}=1.33$
Since $1.33<1.96$ we conclude that, on the basis of the (limited) evidence available, there is insufficient evidence to conclude that there is a difference in the maximum power output of the engines tested when run on the different types of fuel.
1.1 Two independent populations each with an unknown variance
Again we assume that the populations are normally distributed and use the same standard notation used previously to describe the populations and samples, namely:
Population | Sample |
${X}_{1}\sim N\left({\mu}_{1},{\sigma}_{1}^{2}\right)$ | ${x}_{11},{x}_{12},{x}_{13},\⋯\phantom{\rule{0.3em}{0ex}},{x}_{1{n}_{1}}$ with ${n}_{1}$ members. |
${X}_{2}\sim N\left({\mu}_{2},{\sigma}_{2}^{2}\right)$ | ${x}_{21},{x}_{22},{x}_{23},\⋯\phantom{\rule{0.3em}{0ex}},{x}_{2{n}_{2}}$ with ${n}_{2}$ members. |
There are two distinct cases to consider. Firstly, we will assume that although the variances are unknown, they are in fact equal. Secondly, we will assume that the unknown variances are not necessarily equal.
Case (i) - Unknown but equal variances
Again, when we look at hypothesis testing using two means, we will be considering the difference ${\mu}_{1}-{\mu}_{2}$ of the means and writing null hypotheses of the form
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}=$ Value
and again Value will often be zero and we will be trying to detect whether there is any statistically significant difference between the means.
We will take ${\sigma}_{1}^{2}={\sigma}_{2}^{2}={\sigma}^{2}$ so that in diagrammatic form the populations are:
Figure 7
The results from our work on continuous distributions (see HELM booklet 38) tell us that:
$\phantom{\rule{2em}{0ex}}\text{E}\left({\stackrel{\u0304}{X}}_{1}-{\stackrel{\u0304}{X}}_{2}\right)=\text{E}\left({\stackrel{\u0304}{X}}_{1}\right)-\text{E}\left({\stackrel{\u0304}{X}}_{2}\right)={\mu}_{1}-{\mu}_{2}$
as before, and that
$\phantom{\rule{2em}{0ex}}\text{V}\left({\stackrel{\u0304}{X}}_{1}-{\stackrel{\u0304}{X}}_{2}\right)=\text{V}\left({\stackrel{\u0304}{X}}_{1}\right)-\text{V}\left({\stackrel{\u0304}{X}}_{2}\right)=\frac{{\sigma}_{1}^{2}}{{n}_{1}}+\frac{{\sigma}_{2}^{2}}{{n}_{2}}$
Given that we do not know the value of $\sigma $ , we must estimate it. This is done by combining (or pooling) the sample variances say ${S}_{1}^{2}$ and ${S}_{2}^{2}$ for samples 1 and 2 respectively according to the formula:
$\phantom{\rule{2em}{0ex}}{S}_{c}^{2}=\frac{\left({n}_{1}-1\right){S}_{1}^{2}+\left({n}_{2}-1\right){S}_{2}^{2}}{{n}_{1}+{n}_{2}-2}$
Notice that
$\phantom{\rule{2em}{0ex}}{S}_{c}^{2}=\frac{\left({n}_{1}-1\right){S}_{1}^{2}+\left({n}_{2}-1\right){S}_{2}^{2}}{{n}_{1}+{n}_{2}-2}=\frac{\left({n}_{1}-1\right){S}_{1}^{2}}{{n}_{1}+{n}_{2}-2}+\frac{\left({n}_{2}-1\right){S}_{2}^{2}}{{n}_{1}+{n}_{2}-2}$
so that you can see that ${S}_{c}^{2}$ is a weighted average of ${S}_{1}^{2}$ and ${S}_{2}^{2}$ . In fact, each sample variance is weighted according to the number of degrees of freedom available. Notice also that the first sample contributes ${n}_{1}-1$ degrees of freedom and the second sample contributes ${n}_{2}-1$ degrees of freedom so that ${S}_{c}^{2}$ has ${n}_{1}+{n}_{2}-2$ degrees of freedom.
Since we are estimating unknown variances, the quantity $T$ defined by
$\phantom{\rule{2em}{0ex}}T=\frac{\left({\stackrel{\u0304}{X}}_{1}-{\stackrel{\u0304}{X}}_{2}\right)-\left({\mu}_{1}-{\mu}_{2}\right)}{{S}_{c}\sqrt{\frac{1}{{n}_{1}}+\frac{1}{{n}_{2}}}}$
will follow Student’s $t$ -distribution with ${n}_{1}+{n}_{2}-2$ degrees of freedom.
We are now ready to apply this formula to practical problems in which random samples of different sizes with unknown but equal variances are drawn from independent normal populations. The conditions for the rejection of ${H}_{0}$ at the 5% and the 1% levels of significance are found from tables of the $t$ -distribution (Table 2), a copy of which is included to the end of this Workbook.
Example 5
A manufacturer of electronic equipment has developed a circuit to feed current to a particular component in a computer display screen. While the new design is cheaper to manufacture, it can only be adopted for mass production if it passes the same average current to the component. In tests involving the two circuits, the following results are obtained.
Test Number | Circuit 1 - Current (mA) | Circuit 2 - Current (mA) |
1 | 80.1 | 80.7 |
2 | 82.3 | 81.3 |
3 | 84.1 | 84.6 |
4 | 82.6 | 81.7 |
5 | 85.3 | 86.3 |
6 | 81.3 | 84.3 |
7 | 83.2 | 83.7 |
8 | 81.7 | 84.7 |
9 | 82.2 | 82.8 |
10 | 81.4 | 84.4 |
11 | 85.2 | |
12 | 84.9 | |
On the assumption that the populations from which the samples are drawn have equal variances , should the manufacturer replace the old circuit design by the new one? Use the 5% level of significance.
Solution
If the average current flows are represented by ${\mu}_{1}$ and ${\mu}_{2}$ we form the hypotheses
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}=0\phantom{\rule{2em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}\ne 0$
The sample means are ${\stackrel{\u0304}{X}}_{1}=82.42$ and ${\stackrel{\u0304}{X}}_{2}=83.72$ .
The sample variances are ${S}_{1}^{2}=2.00$ and ${S}_{2}^{2}=2.72$ .
The pooled estimate of the variance is
$\phantom{\rule{2em}{0ex}}{S}_{c}^{2}=\frac{\left({n}_{1}-1\right){S}_{1}^{2}+\left({n}_{2}-1\right){S}_{2}^{2}}{{n}_{1}+{n}_{2}-2}=\frac{9\times 2.00+11\times 2.72}{20}=2.396$
The test statistic is
$\phantom{\rule{2em}{0ex}}T=\frac{\left({\stackrel{\u0304}{X}}_{1}-{\stackrel{\u0304}{X}}_{2}\right)-\left({\mu}_{1}-{\mu}_{2}\right)}{{S}_{c}\sqrt{\frac{1}{{n}_{1}}+\frac{1}{{n}_{2}}}}=\frac{82.42-83.72}{\sqrt{2.396}\sqrt{\frac{1}{10}+\frac{1}{12}}}=-1.267$
From $t$ -tables, the critical values with 20 degrees of freedom and a two-tailed test are $\pm 2.086$ . Since $-2.086<-1.267<2.086$ we conclude that we cannot reject the null hypothesis in favour of the alternative. A 95% confidence interval for the difference between the mean currents is given by ${\stackrel{\u0304}{x}}_{1}-{\stackrel{\u0304}{x}}_{2}\pm 2.086\times {S}_{c}\sqrt{\frac{1}{{n}_{1}}+\frac{1}{{n}_{2}}}$ . The confidence interval is $-2.683<{\mu}_{1}-{\mu}_{2}<0.083$ .
Task!
A manufacturer of steel cables used in the construction of suspension bridges has experimented with a new type of steel which it is hoped will result in the cables produced being stronger in the sense that they will accept greater tension loads before failure. In order to test the performance of the new cables in comparison with the old cables, samples are tested for failure under tension. The following results were obtained, the failure tensions being given in kg $\times 1{0}^{3}$ .
Test Number | New Cable | Original Cable |
1 | 92.7 | 90.2 |
2 | 91.6 | 92.4 |
3 | 94.7 | 94.7 |
4 | 93.7 | 92.1 |
5 | 96.5 | 95.9 |
6 | 94.3 | 91.1 |
7 | 93.7 | 93.2 |
8 | 96.8 | 91.5 |
9 | 98.9 | |
10 | 99.9 | |
The cable manufacturer, on looking at health and safety legislation, decides that a 1% level of significance should be used in any statistical testing procedure adopted to distinguish between the cables. On the basis of the results given, should the manufacturer replace the old cable by the new one? You may assume that the populations from which the samples are drawn have equal variances .
If the average tensions are represented by ${\mu}_{1}$ (new cable) and ${\mu}_{2}$ (old cable) we form the hypotheses
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}=0\phantom{\rule{2em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}>0$
in order to test the hypothesis that the new cable is stronger on average than the old cable.
The sample means are ${\stackrel{\u0304}{X}}_{1}=95.28$ and ${\stackrel{\u0304}{X}}_{2}=92.64$ .
The sample variances are ${S}_{1}^{2}=6.47$ and ${S}_{2}^{2}=3.14$ .
The pooled estimate of the variance is
$\phantom{\rule{2em}{0ex}}{S}_{c}^{2}=\frac{\left({n}_{1}-1\right){S}_{1}^{2}+\left({n}_{2}-1\right){S}_{2}^{2}}{{n}_{1}+{n}_{2}-2}=\frac{9\times 6.47+7\times 3.14}{16}=5.013$
The test statistic is
$\phantom{\rule{2em}{0ex}}T=\frac{\left({\stackrel{\u0304}{X}}_{1}-{\stackrel{\u0304}{X}}_{2}\right)-\left({\mu}_{1}-{\mu}_{2}\right)}{{S}_{c}\sqrt{1{n}_{1}+1{n}_{2}}}=\frac{95.28-92.64}{\sqrt{2.239}\sqrt{\frac{1}{10}+\frac{1}{8}}}=\frac{2.64}{2.239\times \sqrt{0.225}}=2.486$
Using $t$ -distribution tables with 16 degrees of freedom, we see that the critical value at the 1% level of significance is 2.583. Since $2.486<2.583$ we conclude that we cannot reject the null hypothesis in favour of the alternative. However, the close result indicates that more tests should be carried out before making a final decision. At this stage the cable manufacturer should not replace the old cable by the new one on the basis of the evidence available. Case (ii) - Unknown and unequal variances
In this case we will take ${\sigma}_{1}^{2}\ne {\sigma}_{2}^{2}$ so that in diagrammatic form the populations may be represented as shown below.
Figure 8
Again, when we look at hypothesis testing using two means, we will be considering the difference ${\mu}_{1}-{\mu}_{2}$ of the means and writing null hypotheses of the form
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}=$ Value
and again Value will often be zero and we will be trying to detect whether there is any statistically significant difference between the means.
In the case where we assume unequal variances, there is no exact statistic which we can use to test the validity or otherwise of the null hypothesis ${H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}=$ Value. However, the following approximation in Key Point 1 allows us to overcome this problem.
Key Point 1
Provided that the null hypothesis is true, the statistic
$T=\frac{\left({\stackrel{\u0304}{X}}_{1}-{\stackrel{\u0304}{X}}_{2}\right)-\left({\mu}_{1}-{\mu}_{2}\right)}{{S}_{c}\sqrt{\frac{1}{{n}_{1}}+\frac{1}{{n}_{2}}}}$
will approximately follow Student’s distribution with the number of degrees of freedom given by the expression:
Essentially, this means that the actual test procedure is similar to that used previously but with $T$ and the number of degrees of freedom $\nu $ calculated using the above formulae. We are now ready to apply these formulae to practical problems in which random samples of different sizes with unknown and unequal variances are drawn from independent normal populations. We will illustrate the test procedure by reworking an Example and Task done previously but we will assume unequal rather than equal variances.
This next Example is a repeat of Example 5 but here assuming unequal variances.
Example 6
A manufacturer of electronic equipment has developed a circuit to feed current to a particular component in a computer display screen. While the new design is cheaper to manufacture, it can only be adopted for mass production if it passes the same average current to the component. In tests involving the two circuits, the results are obtained are:
Test Number | Circuit 1 - Current (mA) | Circuit 2 - Current (mA) |
1 | 80.1 | 80.7 |
2 | 82.3 | 81.3 |
3 | 84.1 | 84.6 |
4 | 82.6 | 81.7 |
5 | 85.3 | 86.3 |
6 | 81.3 | 84.3 |
7 | 83.2 | 83.7 |
8 | 81.7 | 84.7 |
9 | 82.2 | 82.8 |
10 | 81.4 | 84.4 |
11 | 85.2 | |
12 | 84.9 | |
On the assumption that the populations from which the samples are drawn do not have equal variances , should the manufacturer replace the old circuit design by the new one? Use the 5% level of significance.
Solution
If the average current flows are represented by ${\mu}_{1}$ and ${\mu}_{2}$ we form the hypotheses
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}=0\phantom{\rule{2em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}\ne 0$
The sample means are ${\stackrel{\u0304}{X}}_{1}=82.42$ and ${\stackrel{\u0304}{X}}_{2}=83.72$ .
The sample variances are ${S}_{1}^{2}=2.00$ and ${S}_{2}^{2}=2.72$ .
The test statistic is
$\phantom{\rule{2em}{0ex}}T=\frac{\left({\stackrel{\u0304}{X}}_{1}-{\stackrel{\u0304}{X}}_{2}\right)-\left({\mu}_{1}-{\mu}_{2}\right)}{\sqrt{\frac{{S}_{1}^{2}}{{n}_{1}}+\frac{{S}_{2}^{2}}{{n}_{2}}}}=\frac{82.42-83.72}{\sqrt{\frac{2.00}{10}+\frac{2.72}{12}}}=-\frac{1.3}{\sqrt{0.427}}=-1.990$
The number of degrees of freedom is given by
$$\begin{array}{rcll}\nu & =& \frac{{\left(\frac{{S}_{1}^{2}}{{n}_{1}}+\frac{{S}_{2}^{2}}{{n}_{2}}\right)}^{2}}{\frac{{\left(\frac{{S}_{1}^{2}}{{n}_{1}}\right)}^{2}}{{n}_{1}+1}+\frac{{\left(\frac{{S}_{2}^{2}}{{n}_{2}}\right)}^{2}}{{n}_{2}+1}}-2& \text{}\\ & =& \frac{{\left(\frac{2.00}{10}+\frac{2.72}{12}\right)}^{2}}{\frac{{\left(2.00\u221510\right)}^{2}}{11}+\frac{{\left(2.72\u221512\right)}^{2}}{13}}-2=\frac{0.182}{0.004+0.004}-2\approx 21\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}\phantom{\rule{2em}{0ex}}& \text{}\end{array}$$From $t$ -tables, the critical values (two-tailed test, 5% level of significance) are $\pm 2.080$ . Since $-2.080<-1.990<2.080$ we conclude that there is insufficient evidence to reject the null hypothesis in favour of the alternative at the 5% level of significance.
This next Task is a repeat of the Task on page 25 but assuming unequal variances.
Task!
A manufacturer of steel cables used in the construction of suspension bridges has experimented with a new type of steel which it is hoped will result in the cables produced being stronger in the sense that they will accept greater tension loads before failure. In order to test the performance of the new cables in comparison with the old cables, samples are tested for failure under tension. The results obtained are given below where the failure tensions are given in kg $\times 1{0}^{3}$ .
Test Number | New Cable | Original Cable |
1 | 92.7 | 90.2 |
2 | 91.6 | 92.4 |
3 | 94.7 | 94.7 |
4 | 93.7 | 92.1 |
5 | 96.5 | 95.9 |
6 | 94.3 | 91.1 |
7 | 93.7 | 93.2 |
8 | 96.8 | 91.5 |
9 | 98.9 | |
10 | 99.9 | |
The cable manufacturer, on looking at health and safety legislation, decides that a 1% level of significance should be used in any statistical testing procedure adopted to distinguish between the cables. On the basis of the results given and assuming that the populations from which the samples are drawn do not have equal variances , should the manufacturer replace the old cable by the new one?
If the average tensions are represented by ${\mu}_{1}$ (new cable) and ${\mu}_{2}$ (old cable), we form the hypotheses
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}=0\phantom{\rule{2em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\mu}_{1}-{\mu}_{2}>0$
in order to test the hypothesis that the new cable is stronger on average than the old cable.
The sample means are ${\stackrel{\u0304}{X}}_{1}=95.28$ and ${\stackrel{\u0304}{X}}_{2}=92.64$ .
The sample variances are ${S}_{1}^{2}=6.47$ and ${S}_{2}^{2}=3.14$ .
The test statistic is
$\phantom{\rule{2em}{0ex}}T=\frac{\left({\stackrel{\u0304}{X}}_{1}-{\stackrel{\u0304}{X}}_{2}\right)-\left({\mu}_{1}-{\mu}_{2}\right)}{\sqrt{\frac{{S}_{1}^{2}}{{n}_{1}}+\frac{{S}_{2}^{2}}{{n}_{2}}}}=\frac{95.28-92.64}{\sqrt{\frac{6.47}{10}+\frac{3.14}{8}}}=\frac{2.64}{\sqrt{1.017}}=2.589$
The number of degrees of freedom is given by
$\phantom{\rule{2em}{0ex}}\nu =\frac{{\left(\frac{{S}_{1}^{2}}{{n}_{1}}+\frac{{S}_{2}^{2}}{{n}_{2}}\right)}^{2}}{\frac{{\left(\frac{{S}_{1}^{2}}{{n}_{1}}\right)}^{2}}{{n}_{1}+1}+\frac{{\left(\frac{{S}_{2}^{2}}{{n}_{2}}\right)}^{2}}{{n}_{2}+1}}-2=\frac{{\left(\frac{6.47}{10}+\frac{3.14}{8}\right)}^{2}}{\frac{{\left(6.47\u221510\right)}^{2}}{11}+\frac{{\left(3.14\u22158\right)}^{2}}{9}}-2=\frac{1.081}{0.038+0.017}-2\approx 4$
Using $t$ -distribution tables with 18 degrees of freedom, we see that the critical value at the 1% level of significance is 2.552. Since $2.589<2.552$ we conclude that we reject the null hypothesis in favour of the alternative. Notice that the result could still be considered marginal. The cable manufacturer should exercise caution if the old cable is replaced by the new one on the basis of the evidence available.
1.2 The $F$ -test
In the tests above, we distinguished between the cases of equal and unequal variances of samples chosen from independent normal populations. As you have seen, the analysis changes according to the assumptions made, conclusions reached and recommendations made - accepting or rejecting a null hypothesis for example - may also change. In view of this, we may wish to test in order to decide whether the assumption that the variances ${\sigma}_{1}^{2}$ and ${\sigma}_{2}^{2}$ of the independent normal populations shown in the diagram below, may be regarded as equal.
Figure 9
Essentially, we will test the null hypothesis
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\sigma}_{1}^{2}={\sigma}_{2}^{2}$
against one of the alternatives
$\phantom{\rule{2em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\sigma}_{1}^{2}\ne {\sigma}_{2}^{2}\phantom{\rule{2em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\sigma}_{1}^{2}>{\sigma}_{2}^{2}\phantom{\rule{2em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\sigma}_{1}^{2}<{\sigma}_{2}^{2}$
In order to do this, we use the $F$ -distribution. The hypothesis test for the equality of two variances ${\sigma}_{1}^{2}$ and ${\sigma}_{2}^{2}$ is encapsulated in the following Key Point.
Key Point 2
Consider a random sample of size ${n}_{1}$ taken from a normal population with mean ${\mu}_{1}$ and variance ${\sigma}_{1}^{2}$ and a random sample of size ${n}_{1}$ taken from a second normal population with mean ${\mu}_{2}$ and variance ${\sigma}_{2}^{2}$ . Denote the respective sample variances by ${S}_{1}^{2}$ and ${S}_{2}^{2}$ and assume that the populations are independent. The ratio
$F=\frac{{S}_{1}^{2}}{{\sigma}_{1}^{2}}\u2215\frac{{S}_{2}^{2}}{{\sigma}_{2}^{2}}$
follows an $F$ distribution in which the numerator has ${n}_{1}-1$ degrees of freedom and the denominator has ${n}_{2}-1$ degrees of freedom.
Note that if the null hypothesis ${H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\sigma}_{1}^{2}={\sigma}_{2}^{2}$ is true, then the value of $F$ reduces to the ratio of the sample variances and that in this case
$F=\frac{{S}_{1}^{2}}{{S}_{2}^{2}}$
Note
Recall that if a random sample of size ${n}_{1}$ is taken from a normal population with mean ${\mu}_{1}$ and variance ${\sigma}_{1}^{2}$ and if the sample variance is denoted by ${S}_{1}^{2}$ , the random variable
$\phantom{\rule{2em}{0ex}}{X}_{1}^{2}=\frac{\left({n}_{1}-1\right){S}_{1}^{2}}{{\sigma}_{1}^{2}}$
has a ${\chi}^{2}$ distribution with ${n}_{1}-1$ degrees of freedom. Similarly, if a random sample of size ${n}_{2}$ is taken from a normal population with mean ${\mu}_{2}$ and variance ${\sigma}_{2}^{2}$ and if the sample variance is denoted by ${S}_{2}^{2}$ , the random variable
$\phantom{\rule{2em}{0ex}}{X}_{2}^{2}=\frac{\left({n}_{2}-1\right){S}_{2}^{2}}{{\sigma}_{2}^{2}}$
has a ${\chi}^{2}$ distribution with ${n}_{2}-1$ degrees of freedom. This means that the ratio
$\phantom{\rule{2em}{0ex}}F=\frac{{S}_{1}^{2}}{{\sigma}_{1}^{2}}\u2215\frac{{S}_{2}^{2}}{{\sigma}_{2}^{2}}$
is a ratio of ${\chi}^{2}$ random variables with ${n}_{1}-1$ degrees of freedom in the numerator and ${n}_{2}-1$ degrees of freedom in the denominator. Under the null hypothesis
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\sigma}_{1}^{2}={\sigma}_{2}^{2}$
we know that the expression for $F$ reduces to
$\phantom{\rule{2em}{0ex}}F=\frac{{S}_{1}^{2}}{{S}_{2}^{2}}$
and we say that $F$ has an $F$ -distribution with ${n}_{1}-1$ degrees of freedom in the numerator and ${n}_{2}-1$ degrees of freedom in the denominator. This distribution is denoted by
$\phantom{\rule{2em}{0ex}}{F}_{{n}_{1}-1,{n}_{2}-1}$
and some tabulated values are given in Tables 3 and 4 at the end of this Workbook.
If you check Tables 3 and 4, you will find that only right-tail values are given. The left-tail values are calculated by using the following formula:
$\phantom{\rule{2em}{0ex}}{f}_{1-\alpha ,\phantom{\rule{1em}{0ex}}{n}_{1}-1,\phantom{\rule{1em}{0ex}}{n}_{2}-1}=\frac{1}{{f}_{\alpha ,\phantom{\rule{1em}{0ex}}{n}_{2}-1,\phantom{\rule{1em}{0ex}}{n}_{1}-1}}$
Note the reversal in the order in which the expressions for the number of degrees of freedom occur.
Example 7
The following is an extract from the $F$ -distribution tables (5% tail) given at the end of this Workbook.
Figure 10
Write down or calculate as appropriate, the following values of $F$ from the table:
Right-tail Values | Left-tail Values |
${f}_{0.05,4,3}$ | ${f}_{0.95,4,3}$ |
${f}_{0.05,8,2}$ | ${f}_{0.95,8,2}$ |
${f}_{0.05,7,8}$ | ${f}_{0.95,7,8}$ |
Solution
The right-tail values are read directly from the tables. The left-tail values are calculated using the formula given above.
Right-tail Values | Left-tail Values |
${f}_{0.05,4,3}=9.12$ | ${f}_{0.95,4,3}=\frac{1}{{f}_{0.05,3,4}}=\frac{1}{6.59}=0.152$ |
${f}_{0.05,8,2}=19.37$ | ${f}_{0.95,8,2}=\frac{1}{{f}_{0.05,2,8}}=\frac{1}{4.46}=0.224$ |
${f}_{0.05,7,8}=3.50$ | ${f}_{0.95,7,8}=\frac{1}{{f}_{0.05,8,7}}=\frac{1}{3.73}=0.268$ |
Task!
Write down or calculate as appropriate, the following values of $F$ from the tables given at the end of this Workbook.
Right-tail Values | Left-tail Values |
${f}_{0.05,10,20}$ | ${f}_{0.95,10,20}$ |
${f}_{0.05,5,30}$ | ${f}_{0.95,5,30}$ |
${f}_{0.05,20,7}$ | ${f}_{0.95,20,7}$ |
${f}_{0.025,10,10}$ | ${f}_{0.975,10,10}$ |
${f}_{0.025,8,30}$ | ${f}_{0.975,8,30}$ |
${f}_{0.025,20,30}$ | ${f}_{0.975,20,30}$ |
Right-tail Values | Left-tail Values |
${f}_{0.05,10,20}=2.35$ | ${f}_{0.95,10,20}=\frac{1}{{f}_{0.05,20,10}}=\frac{1}{2.77}=0.361$ |
${f}_{0.05,5,30}=2.53$ | ${f}_{0.95,5,30}=\frac{1}{{f}_{0.05,30,5}}=\frac{1}{4.53}=0.221$ |
${f}_{0.05,20,7}=3.44$ | ${f}_{0.95,20,7}=\frac{1}{{f}_{0.05,7,20}}=\frac{1}{2.51}=0.398$ |
${f}_{0.025,10,10}=3.72$ | ${f}_{0.975,10,10}=\frac{1}{{f}_{0.025,10,10}}=\frac{1}{3.72}=0.269$ |
${f}_{0.025,8,30}=2.65$ | ${f}_{0.975,8,30}=\frac{1}{{f}_{0.025,30,8}}=\frac{1}{3.89}=0.257$ |
${f}_{0.025,20,30}=2.20$ | ${f}_{0.975,20,30}=\frac{1}{{f}_{0.025,30,20}}=\frac{1}{2.35}=0.426$ |
We are now in a position to use the $F$ -test to solve engineering problems. The application of the $F$ -test will be illustrated by using the data given in a previous worked example in order to determine whether the assumption of equal variability in the samples used is realistic. This next Example was met as Example 5 (page 24). Here we test one of the underlying assumptions.
Example 8
A manufacturer of electronic equipment has developed a circuit to feed current to a particular component in a computer display screen. While the new design is cheaper to manufacture, it can only be adopted for mass production if it passes the same average current to the component. In tests involving the two circuits, the results obtained are
Test Number | Circuit 1 - Current (mA) | Circuit 2 - Current (mA) |
1 | 80.1 | 80.7 |
2 | 82.3 | 81.3 |
3 | 84.1 | 84.6 |
4 | 82.6 | 81.7 |
5 | 85.3 | 86.3 |
6 | 81.3 | 84.3 |
7 | 83.2 | 83.7 |
8 | 81.7 | 84.7 |
9 | 82.2 | 82.8 |
10 | 81.4 | 84.4 |
11 | 85.2 | |
12 | 84.9 | |
In Example 5 we worked on the assumption that the populations from which the samples are drawn have equal variances. Is this assumption valid at the 5% level of significance?
Note that the manufacturer may also be interested in knowing whether the variances are equal as well as the means. We shall not address that problem here but it can be argued that equality of variances will facilitate consistent performance from the components.
Solution
We form the hypotheses
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\sigma}_{1}^{2}={\sigma}_{2}^{2}\phantom{\rule{2em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\sigma}_{1}^{2}\ne {\sigma}_{2}^{2}$
and perform a two-tailed test.
The sample variances are ${S}_{1}^{2}=2.00$ and ${S}_{2}^{2}=2.72$ .
The test statistic is
$\phantom{\rule{2em}{0ex}}F=\frac{{S}_{1}^{2}}{{S}_{2}^{2}}=\frac{2.00}{2.72}=0.735$
which has an $F$ -distribution with 9 degrees of freedom in the numerator and 11 degrees of freedom in the denominator.
We require two 2.5% tails, that is we require right-tail ${f}_{0.025,9,11}=3.59$ and left-tail ${f}_{0.975,9,11}$ . The latter may be approximated as follows:
$$\begin{array}{rcll}{f}_{0.975,9,11}=\frac{1}{{f}_{0.025,11,9}}& \approx & \frac{\left(\frac{1}{11}-\frac{1}{20}\right)\frac{1}{{f}_{0.025,10,9}}+\left(\frac{1}{10}-\frac{1}{11}\right)\frac{1}{{f}_{0.025,20,9}}}{\left(\frac{1}{10}-\frac{1}{20}\right)}& \text{}\\ & \approx & \frac{\frac{0.040909}{3.96}+\frac{0.009091}{3.67}}{0.05}& \text{}\\ & \approx & \frac{0.81818}{3.96}+\frac{0.18182}{3.67}=0.256& \text{}\end{array}$$Since $0.256<0.735<3.59$ we conclude that we cannot reject the null hypothesis in favour of the alternative at the 5% level of significance. The evidence supports the conclusion that the samples have equal variability.
Note that we can adopt the rule (many statisticians do this) of always dividing the larger ${S}^{2}$ value by the smaller ${S}^{2}$ value so that you only need to look up right tail values.
This next Task was first met on page 25. Here we test one of the underlying assumptions.
Task!
A manufacturer of steel cables used in the construction of suspension bridges has experimented with a new type of steel which it is hoped will result in the cables produced being stronger in the sense that they will accept greater tension loads before failure. In order to test the performance of the new cables in comparison with the old cables, samples are tested for failure under tension. The results obtained are as follows, where the failure tensions are given in tonnes.
Test Number | New steel cable tension | Old steel cable tension |
1 | 80.1 | 80.7 |
2 | 82.3 | 81.3 |
3 | 84.1 | 84.6 |
4 | 82.6 | 81.7 |
5 | 85.3 | 86.3 |
6 | 81.3 | 84.3 |
7 | 83.2 | 83.7 |
8 | 81.7 | 84.7 |
9 | 82.2 | 82.8 |
10 | 81.4 | 84.4 |
11 | 85.2 | |
12 | 84.9 | |
Last time we assumed that the populations from which the samples are drawn did not have equal variances. Is this assumption valid at the 5% level of significance?
We form the hypotheses
$\phantom{\rule{2em}{0ex}}{H}_{0}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\sigma}_{1}^{2}={\sigma}_{2}^{2}\phantom{\rule{2em}{0ex}}{H}_{1}:\phantom{\rule{1em}{0ex}}\phantom{\rule{1em}{0ex}}{\sigma}_{1}^{2}\ne {\sigma}_{2}^{2}$
and perform a two-tailed test.
The sample variances are ${S}_{1}^{2}=6.47$ and ${S}_{2}^{2}=3.14$ .
The test statistic is
$\phantom{\rule{2em}{0ex}}F=\frac{{S}_{1}^{2}}{{S}_{2}^{2}}=\frac{6.47}{3.14}=2.061$
which has an $F$ -distribution with 9 degrees of freedom in the numerator and 7 degrees of freedom in the denominator. We require two 2.5% tails. That is, we require right-tail ${f}_{0.025,9,7}=4.42$ and left-tail ${f}_{0.975,9,7}$ which may be calculated as
$\phantom{\rule{2em}{0ex}}{f}_{0.975,9,7}=\frac{1}{{f}_{0.025,7,9}}=\frac{1}{4.20}=0.238$
Since $0.238<2.061<4.82$ we conclude that we cannot reject the null hypothesis in favour of the alternative at the 5% level of significance. The evidence does not support the conclusion that the populations have unequal variances.