Computes statistics for mean and variance inferences using samples from two normal populations.
For a list of all members of this type, see NormTwoSample Members.
System.Object
Imsl.Stat.NormTwoSample
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
Class NormTwoSample
computes statistics for making inferences about the means and variances of two normal populations, using independent samples in x1
and x2
. For inferences concerning parameters of a single normal population, see class NormOneSample
.
Let and be the mean and variance of the first population, and let and be the corresponding quantities of the second population. The function contains test confidence intervals for difference in means, equality of variances, and the pooled variance.
The means and variances for the two samples are as follows:
and
Inferences about the Means
The test that the difference in means equals a certain value, for example, , depends on whether or not the variances of the two populations can be considered equal. If the variances are equal and meanHypothesis
equals 0, the test is the two-sample t-test, which is equivalent to an analysis-of-variance test. The pooled variance for the difference-in-means test is as follows:
The t statistic is as follows:
Also, the confidence interval for the difference in means can be obtained by first assigning the unequal variances flag to false. This can be done by setting the UnequalVariances
property. The confidence interval can then be obtained by the LowerCIDiff
and UpperCIDiff
properties.
If the population variances are not equal, the ordinary t statistic does not have a t distribution and several approximate tests for the equality of means have been proposed. (See, for example, Anderson and Bancroft 1952, and Kendall and Stuart 1979.) One of the earliest tests devised for this situation is the Fisher-Behrens test, based on Fisher's concept of fiducial probability. A procedure used in the TTest
, LowerCIDiff
and UpperCIDiff
properties assuming unequal variances are specified is the Satterthwaite's procedure, as suggested by H.F. Smith and modified by F.E. Satterthwaite (Anderson and Bancroft 1952, p. 83). Set UnequalVariances
true to obtain results assuming unequal variances.
The test statistic is
where
Under the null hypothesis of , this quantity has an approximate t distribution with degrees of freedom df
, given by the following equation:
Inferences about Variances
The F statistic for testing the equality of variances is given by , where is the larger of and . If the variances are equal, this quantity has an F distribution with and degrees of freedom.
It is generally not recommended that the results of the F test be used to decide whether to use the regular t-test or the modified on a single set of data. The modified (Satterthwaite's procedure) is the more conservative approach to use if there is doubt about the equality of the variances.
Namespace: Imsl.Stat
Assembly: ImslCS (in ImslCS.dll)
NormTwoSample Members | Imsl.Stat Namespace | Example