NormTwoSample Class |
Namespace: Imsl.Stat
The NormTwoSample type exposes the following members.
Name | Description | |
---|---|---|
NormTwoSample |
Constructor to compute statistics for mean and variance inferences
using samples from two normal populations.
|
Name | Description | |
---|---|---|
DowndateX |
Removes the observations in x from the first sample.
| |
DowndateY |
Removes the observations in y from the second sample.
| |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) | |
GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) | |
GetType | Gets the Type of the current instance. (Inherited from Object.) | |
MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
ToString | Returns a string that represents the current object. (Inherited from Object.) | |
Update |
Concatenates samples x and y to the samples provided in
the constructor.
| |
UpdateX |
Concatenates the values in x to the first sample provided in
the constructor.
| |
UpdateY |
Concatenates the values in y to the second sample provided in
the constructor.
|
Name | Description | |
---|---|---|
ChiSquaredTest |
The test statistic associated with the chi-squared test for common,
or pooled, variances.
| |
ChiSquaredTestDF |
The degrees of freedom associated with the chi-squared test for the
common, or pooled, variances.
| |
ChiSquaredTestNull |
The null hypothesis value for the chi-squared test.
| |
ChiSquaredTestP |
The probability of a larger chi-squared associated with the
chi-squared test for common, or pooled, variances.
| |
ConfidenceMean |
The confidence level (in percent) for a two-sided interval estimate
of the mean of x - the mean of y, in percent.
| |
ConfidenceVariance |
The confidence level (in percent) for two-sided interval estimate of
the variances.
| |
DiffMean |
The difference of means for the two samples.
| |
FTest |
The F test value of the F test for equality of
variances.
| |
FTestDFdenominator |
The denominator degrees of freedom of the F test for equality
of variances.
| |
FTestDFnumerator |
The numerator degrees of freedom of the F test for equality of
variances.
| |
FTestP |
The probability of a larger F in absolute value for the
F test for equality of variances, assuming equal variances.
| |
LowerCICommonVariance |
The lower confidence limits for the common, or pooled, variance.
| |
LowerCIDiff |
The lower confidence limit for the mean of the first population minus
the mean of the second for equal or unequal variances.
| |
LowerCIRatioVariance |
The approximate lower confidence limit for the ratio of the variance
of the first population to the second.
| |
MeanX |
The mean of the first sample, x.
| |
MeanY |
The mean of the second sample, y.
| |
PooledVariance |
The Pooled variance for the two samples.
| |
StdDevX |
The standard deviation of the first sample, x.
| |
StdDevY |
The standard deviation of the second sample, y.
| |
TTest |
The test statistic for the Satterthwaite's approximation for equal or
unequal variances.
| |
TTestDF |
The degrees of freedom for the Satterthwaite's approximation for
t-test for either equal or unequal variances.
| |
TTestNull |
The Null hypothesis value for t-test for the mean.
| |
TTestP |
The approximate probability of a larger t for the
Satterthwaite's approximation for equal or unequal variances.
| |
UnequalVariances |
Specifies whether to return statistics based on equal or unequal
variances.
| |
UpperCICommonVariance |
The upper confidence limits for the common, or pooled, variance.
| |
UpperCIDiff |
The upper confidence limit for the mean of the first population minus
the mean of the second for equal or unequal variances.
| |
UpperCIRatioVariance |
The approximate upper confidence limit for the ratio of the variance
of the first population to the second.
|
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.