2.13.4.2 kstest2(Pro)
Contents
Menu Information
Statistics: Nonparametric Tests: Two Sample Kolmogorov-Smirnov Test
Brief Information
Perform a two-sample Kolmogorov-Smirnov test
Additional Information
This feature is for OriginPro only.
Command Line Usage
1. kstest2 irng:=(col(a),col(b));
2. kstest2 -r 2 type:=1 irng:=(col(a),col(b)) tail:=lower;
3. kstest2 irng:=(col(a),col(b)) tail:=upper rt:=<new name:=KS>;
X-Function Execution Options
Please refer to the page for additional option switches when accessing the x-function from script
Variables
| Display Name |
Variable Name |
I/O and Type |
Default Value |
Description | |
|---|---|---|---|---|---|
| Input Data Form | type |
Input int |
|
Specify the input data form.
Option list:
| |
| Input | irng |
Input Range |
|
Specify input data range.
| |
| Null Hypothesis | null |
Input string |
|
The null hypothesis to be tested. This string is not editable, and changes according to the selected Alternate Hypothesis. | |
| Alternative Hypothesis | tail |
Input int |
|
Indicate whether an upper, lower, or two-tailed KS-test should be performed
| |
| Significance Level | alpha |
Input double |
|
Specify the significance level of the test. | |
| Output Results | rt |
Output ReportTree |
|
Specify the output result sheet, which includes Notes table, Descriptive table, Freqs table and Test Statistics table. |
Examples
- To perform a two-tailed two-sample KS-test on columns 1 and 2 of the active worksheet , using default settings:
kstest2 irng:=(col(a),col(b)); - To perform a upper-tailed two-sample KS-test on columns 1 and 2 of the active worksheet, use the script command:
kstest2 irng:=(col(a),col(b)) tail:=1; - To perform a lower-tailed two-sample KS-test on columns 1 and 3 of the active worksheet, and save the result table with the name as KS, use the script command:
kstest2 irng:=(1,3) tail:=2 rt:=<new name:=KS>;
Of course, the name, such as KS, you can define it by yourself.
More Information
For more information, please refer to our User Guide.
References
Nag C Library Function Document: nag_2_sample_ks_test(g08cdc)