2.13.2.5 ttestpair
Brief Information
PairSample ttest
Command Line Usage
1. ttestpair irng:=(Col(a), Col(b));
2. ttestpair irng:=(Col(a), Col(b)) mdiff:=0.5;
3. ttestpair irng:=(Col(a), Col(b)) tail:=2;
4. ttestpair irng:=(Col(a), Col(b)) prob:=myprob;
Variables
Display Name

Variable Name

I/O and Type

Default Value

Description

Input

irng

Input
Range

<active>

This variable specifies the input data ranges on which to perform a pair sample ttest. It should contain two columns with the same size.

Hypothetical means difference

mdiff

Input
double

0

This variable specifies the hypothetical difference between the paired sample means

Tail

tail

Input
int

two

This variable indicates whether an upper, lower or 2 tailed test is required. (Suppose m1 and m2 are sample means and m is the mean difference.)
Option list
 Twotailed test will be performed. The procedure will test if the true difference of sample means is different from the hypothetical value.
 Uppertailed test will be performed. The procedure will test if the true difference of sample means is larger than the hypothetical value.
 Lowertailed test will be performed. The procedure will test if the true difference of sample means is less than the hypothetical value.

Significance level

alpha

Input
double

0.05

This variable specifies alpha value, or the significance level value. With this value, the associated confidence interval will be computed. It should be larger than 0 and less than 1.

TStatistic

stat

Output
double

<unassigned>

Value of the pairedsample ttest statistic

Degrees of freedom

df

Output
double

<unassigned>

Degrees of freedom for the pairedsample ttest.

Pvalue

prob

Output
double

<unassigned>

Associated pvalue of the test. Users can compare it with their desirable significance level (commonly 0.05). If the pvalue is greater than or equal to that value, the null hypothesis is rejected.

Lower confidence limit

lcl

Output
double

<unassigned>

The lower confidence limit for the hypothetical mean of the sample data. The confidence level is set as 100* (1alpha) %.

Upper confidence limit

ucl

Output
double

<unassigned>

The upper confidence limit for the hypothetical mean of the sample data. The confidence level is set as 100* (1alpha) %.

Description
The PairSample tTest analysis determines whether the means of two samesized and dependent samples from a normal distribution are equal or not, and calculates the confidence interval for the difference between the means. The pairsample ttest also enables you to test whether or not the means of two samples differ by a specified amount. The term paired means that there is a dependence or correspondence between observations from each sample. For example, a paired ttest would be used when a laboratory process is changed, and equal numbers of data points are taken before and after the change in process. For unequal numbers of data points and independent data sets, use the 2sample ttest, known as ttest2 in Origin.
To estimate the difference between two population means, the sample mean difference with confidence interval is also computed for each confidence levels.
Algorithm
Please read the help of PairSampletTest for detail algorithms
References
Snedecor, George W. and Cochran, William G. (1989), Statistical Methods, Eighth Edition, Iowa State University Press.
Related XFunctions
ttest1, ttest2
