Hypothesis Tests.Unpaired TTest Method
Returns an unpaired TwoSampleTTest for the difference between two population means.
Definition
Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
C#
An unpaired two sample t test for the specified samples.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.3
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
TwoSampleTTestAn unpaired two sample t test for the specified samples.
Exceptions
Argument | sample1 is null. -or- sample2 is null. |
Insufficient | The length of at least one of the samples is less than 2. |