Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function SignTest(const Data1: TVec; const Data2: TVec; out hRes: THypothesisResult; out Signif: Double; var ConfInt: TDoubleArray; const hType: THypothesisType; const Alpha: Double): Double; | Performs paired Sign test. The routine tests the null hypothesis that Data1 and Data2 have equal median value. |
| 2 | function SignTest(const Data: TVec; Median: Double; out hRes: THypothesisResult; out Signif: Double; var ConfInt: TDoubleArray; const hType: THypothesisType; const Alpha: Double): Double; | One or two-sample Sign test. |
Overload 1: function SignTest(const Data1: TVec; const Data2: TVec; out hRes: THypothesisResult; out Signif: Double; var ConfInt: TDoubleArray; const hType: THypothesisType; const Alpha: Double): Double;
Performs paired Sign test. The routine tests the null hypothesis that Data1 and Data2 have equal median value.
| # | Name | Description |
|---|---|---|
| 1 | Data1 | First set of data from which to compute the median. |
| 2 | Data2 | Second set of data from which to compute the median. |
| 3 | hRes | Returns the result of the null hypothesis (default assumption is that the means are equal). |
| 4 | hType | Defines the type of the null hypothesis (left, right and two - tailed). |
| 5 | Signif | (Significance level) returns the probability of observing the given result by chance given that the null hypothesis is true. |
| 6 | ConfInt | Returns the 100*(1-Alpha) percent confidence interval for the mean. |
| 7 | Alpha | Defines the desired significance level. If the significance probability (Signif) is bellow the desired significance (Alpha), the null hypothesis is rejected. |
Returns: Double - The Sign test statistics.
Examples
Uses MtxExpr, Math387, Statistics;
procedure Example;
var d1,d2: Vector;
SignRes : double;
HypRes : THypothesisResult;
begin
d1.SetIt(false,[1,4,5,6,7,12]);
d2.SetIt(false,[3,3.5,2,3.1,10,9]);
SignTest(d1, d2, SignRes, HypRes); // SignRes = 0.6875; HypRes = hrNotReject
// Since the SignRes is greater than Alpha (0.05), the
// null hypothesis that two medians are equal is not rejected
end;
See Also: Statistics.WilcoxonSign
Overload 2: function SignTest(const Data: TVec; Median: Double; out hRes: THypothesisResult; out Signif: Double; var ConfInt: TDoubleArray; const hType: THypothesisType; const Alpha: Double): Double;
One or two-sample Sign test.
| # | Name | Type | Description |
|---|---|---|---|
| 1 | Data | TVec | |
| 2 | Median | Double | scalar |
| 3 | hRes | THypothesisResult | |
| 4 | Signif | Double | |
| 5 | ConfInt | TDoubleArray | |
| 6 | hType | THypothesisType | |
| 7 | Alpha | Double |
Returns: Double
Remarks:
Performs one-sample Sign test by comparing Data median value with given Median. The null hypothesis is that Data median is equal to Median. Additional assumption is that underlying population is continuous.