This section briefly covers statistical inference for two samples and is divided into the following subsections:
Inference on the Difference in Population Means When Variances Are Known
Inference on the Difference in Population Means When Variances Are Unknown
The test statistic used here is based on the standard normal distribution. Let and represent the means of two populations, and and their variances, respectively. Let be the hypothesized difference in the population means and and be the sample means obtained from two samples of sizes and drawn randomly from the two populations, respectively. The test statistic can be obtained as:
(12)
The statements for the hypothesis test are:

If , then the hypothesis will test for the equality of the two population means.
If the population variances can be assumed to be equal then the following test statistic based on the distribution can be used. Let , , and be the sample means and variances obtained from randomly drawn samples of sizes and from the two populations, respectively. The weighted average, , of the two sample variances is:

has ( + -- 2) degrees of freedom. The test statistic can be calculated as:
(13)
follows the distribution with ( + -- 2) degrees of freedom. This test is also referred to as the two-sample pooled test.
If the population variances cannot be assumed to be equal then the following test statistic is used:
(14)
follows the distribution with degrees of freedom. is defined as follows:

The test statistic used here is based on the distribution. If and are the sample variances drawn randomly from the two populations and and are the two sample sizes, respectively, then the test statistic that can be used to test the equality of the population variances is:
(15)
The test statistic follows the distribution with ( -- 1) degrees of freedom in the numerator and ( -- 1) degrees of freedom in the denominator.
Example 3.5
Assume that an analyst wants to know if the variances of two normal
populations are equal at a significance level of 0.05. Random samples
drawn from the two populations give the sample standard deviations as
1.84 and 2, respectively. Both the sample sizes are 20. The hypothesis
test may be conducted as follows:

It is clear that this is a two-sided hypothesis and the critical region will be located on both sides of the probability distribution.

and
These values and the critical regions are
shown in Figure 3.16. The analyst would fail to reject if the test statistic is such that:
or
|
Figure 3.16: Critical values and rejection region for Example 3.5 marked on the distribution. |

Since lies in the acceptance region, the analyst fails to reject at a significance level of 0.05.
See Also:
Statistical Inference for a Single Sample
Simple Linear Regression Analysis