2.13.2.1 rowttest2(Pro)
Menu Information
Statistics: Hypothesis Testing: TwoSample ttest on Rows.
Brief Information
Perform a twosample ttest on rows
Additional Information
This feature is for OriginPro only.
This feature is updated in Origin 2015 SR0
Command Line Usage
1. rowttest2 irng1:=(1,2,3) irng2:=(4,5,6);
2. rowttest2 irng1:=col(a)[1]:col(c)[8] irng2:=col(d)[1]:col(f)[8] prob:=wcol(8)[1:8];
3. rowttest2 irng1:=(1,2,3) irng2:=(4,5,6) sig:=<new>;
Variables
Display Name

Variable Name

I/O and Type

Default Value

Description

1st Data Range

irng1

Input
Range

<unassigned>

Specify data range(multiple columns) of the first sample. Each row represents a data variable.

2nd Data Range

irng2

Input
Range

<unassigned>

Specify data range(multiple columns) of the second sample. Each row represents a data variable.

Test Mean

mean

Input
double

0

Hypothetical difference between the means of the two samples

Alternate Hypothesis

tail

Input
int

Radio

Specify the alternative hypothesis of the ttest.
Option list
 Specify the alternative hypothesis is that if the means of the two samples are equal or not.
 Specify the alternative hypothesis is that if the mean of the sample 1 is greater than the mean of sample 2.
 Specify the alternative hypothesis is that if the mean of the sample 1 is less than the mean of sample 2.

Tstatistic

statistic

Output
vector

<new>

Select to output the tstatistic, and you can specify the column for the values. Each row represents the tstatistic of the data in the row.

Degree of Freedom

df

Output
vector

<new>

Select to output the degree of freedom, and you can specify the column for the values. Each row represents the degree of freedom of the data in the row.

Pvalue

prob

Output
vector

<new>

Select to output the pvalue, and you can specify the column for the values. Each row represents the pvalue of the data in the row.

Significant

sign

Output
vector

<new>

Select to output the flag of decision and specify the column for the values. the value equals to 1 indicates that the difference of the means is significant at the 0.05 level, 0 indicates that the means are not significant different at the 0.05 level

Description
The independent twosample ttest analysis tests whether or not the means of two independent samples from a normal distribution are equal or whether they differ by a given value.
This function performs independent twosample ttest for the rows. The data of both samples is set in one row to perform this twosample ttest of this row.
Examples
1. Import rowttest2.dat on the\Sample\Statistics\ folder.
2. Use the default setting, run the script below in Script Window or Command Window:
rowttest2 irng1:=(1,2,3,4) irng2:=(5,6,7);
This script specifies that for each rows, column 1 to column 4 is sample one, column 5 to column 7 is sample two. These two samples are used to do independent twosample ttest. And the pvalue will output to a new column of source worksheet.
3. To output both pvalue and significant flag, the pvalue will be put in the 8the column and the significant flag will be put in the 8th column, run the script below
rowttest2 irng1:=(1,2,3,4) irng2:=(5,6,7) prob:=wcol(8) sig:=<new>;
Notes: We can specify an existing range such as wcol(8) for the output variables such as prob ect. However, if specifying an existing column, header of the column won't be updated to indicate the name of the output variable.

More Information
More Information
For more information, please refer to our User Guide.
Related XFunctions
rowttestpair, ttest1, ttest2, ttestpair
