HypothesisTests.UnpairedTTest Method

Returns an unpaired TwoSampleTTest for the difference between two population means.

Definition

Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
public static TwoSampleTTest UnpairedTTest(
	Vector<double> sample1,
	Vector<double> sample2,
	double difference = 0,
	bool assumeEqualVariances = true,
	HypothesisType type = HypothesisType.TwoTailed
)

Parameters

sample1  Vector<Double>
A vector containing a sample from the first population.
sample2  Vector<Double>
A vector containing a sample from the second population.
difference  Double  (Optional)
The proposed difference between the population means. The default is 0.
assumeEqualVariances  Boolean  (Optional)
Indicates whether the variances of the two populations are assumed to be the same. The default is true.
type  HypothesisType  (Optional)
A HypothesisType value that specifies whether the test is two-tailed (the default) or one-tailed.

Return Value

TwoSampleTTest
An unpaired two sample t test for the specified samples.

Exceptions

ArgumentNullExceptionsample1 is null.

-or-

sample2 is null.

InsufficientDataException

The length of at least one of the samples is less than 2.

See Also