
1.  It is assumed that the two variances are equal, that is ${\sigma}_{x}^{2}={\sigma}_{y}^{2}$.
The test used is the two sample $t$test. The test statistic $t$ is defined by;
Under the null hypothesis ${H}_{0}$ this test statistic has a $t$distribution with $\left({n}_{x}+{n}_{y}2\right)$ degrees of freedom.
The test of ${H}_{0}$ is carried out against one of three possible alternatives:
Upper and lower $100\left(1\alpha \right)$% confidence limits for ${\mu}_{x}{\mu}_{y}$ are calculated as:


2. 
It is not assumed that the two variances are equal.
If the population variances are not equal the usual two sample $t$statistic no longer has a $t$distribution and an approximate test is used.
This problem is often referred to as the Behrens–Fisher problem, see Kendall and Stuart (1979). The test used here is based on Satterthwaites procedure. To test the null hypothesis the test statistic ${t}^{\prime}$ is used where
A $t$distribution with $f$ degrees of freedom is used to approximate the distribution of ${t}^{\prime}$ where
The test of ${H}_{0}$ is carried out against one of the three alternative hypotheses described above, replacing $t$ by ${t}^{\prime}$ and ${t}_{\mathrm{obs}}$ by ${t}_{\mathrm{obs}}^{\prime}$.
Upper and lower $100\left(1\alpha \right)$% confidence limits for ${\mu}_{x}{\mu}_{y}$ are calculated as:
