Hypothesis Tests.Paired TTest Method
Returns a paired TwoSampleTTest for the difference between two population means.
Definition
Namespace: Numerics.NET.Statistics
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
C#
A paired two sample t test for the specified samples.
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 9.0.4
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
Argument | 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. |