Hypothesis Tests.Paired TTest Method
Returns a paired TwoSampleTTest for the difference between two population means.
Definition
Namespace: Extreme.Statistics
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
C#
A paired two sample t test for the specified samples.
Assembly: Extreme.Numerics (in Extreme.Numerics.dll) Version: 8.1.23
public static TwoSampleTTest PairedTTest(
Vector<double> sample1,
Vector<double> sample2,
double difference = 0,
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.
- type HypothesisType (Optional)
- A HypothesisType value that specifies whether the test is two-tailed (the default) or one-tailed.
Return Value
TwoSampleTTestA paired two sample t test for the specified samples.
Exceptions
ArgumentNullException | sample1 is null.
-or- sample2 is null. |
Dimension | sample1 and sample2 do not have the same length. |
Insufficient | The length of the samples is less than 2. |