Statistics: Nonparametric Tests: Mann-Whitney test
Preform Mann-Whitney test
This feature is for OriginPro only.
1. mwtest type:=1 irng:=(1,2) 2. mwtest irng:=(1,2) tail:=upper; 3. mwtest irng:=(1,2) tail:=lower rt:=<new MW>
Please refer to the page for additional option switches when accessing the x-function from script
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 the input data. | |
Null Hypothesis | null |
Input string |
|
Specify the null hypothesis of Mann-Whiney test. | |
Alternate Hypothesis | tail |
Input int |
|
Indicates whether an upper, lower, or two-tailed MW-test should be performed.
Option list:
| |
Significance Level | alpha |
Input double |
|
Specify the significance level of the test. | |
Exact P Value | exact |
Input int |
|
Specify whether to calculate exact p value. | |
Output Results | rt |
Output ReportTree |
|
Include Notes table, Descriptive table, Ranks table, and Test Statistics table. |
mwtest irng:=(1,2)
mwtest irng:=(1,3) tail:=2 rt:=<new name:=MW>
/* This example is used to show how to test whether the two populations have identical distribution or not, when the normality is questionable. The sample data used is in OriginPath\Samples\Statistics folder. 1. Import the sample data into a book in Origin 2. use mwtest XF to calculate the U-statistics and p-value. 3. put the result into a new sheet */ /*Import the sample data into a new book*/ String fname$=system.path.program$+"Samples\Statistics\mw-test.dat"; newbook; impASC; string bkn$=%H; /*Use the mwtest XF to calculate the U statistics and p-value*/ mwtest irng:=[bkn$]1!(col(1),col(2)) rt:=<new name:="Manny-Whitney">; /*New a sheet to stor the results of the Manny-Whitney test*/ newsheet book:=bkn$ name:="Result" label:="MW_U|Zstat|Sig"; range MW_U=[bkn$]Result!col(1); range Zstat=[bkn$]Result!col(2); range Sig=[bkn$]Result!col(3); getresults iw:=[bkn$]2 tr:=mytree; MW_U[1]=mytree.stats.stats.c1; Zstat[1]=mytree.stats.stats.c2; Sig[1]=mytree.stats.stats.c3;
For more information, please refer to our User Guide.