2.13.2.5 ttestpair

Brief Information

Pair-Sample t-test

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 t-test. 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

  • two:Two Tailed
Two-tailed test will be performed. The procedure will test if the true difference of sample means is different from the hypothetical value.
  • upper:Upper Tailed
Upper-tailed test will be performed. The procedure will test if the true difference of sample means is larger than the hypothetical value.
  • lower:Lower Tailed
Lower-tailed 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.

T-Statistic stat

Output

double

<unassigned>

Value of the paired-sample t-test statistic

Degrees of freedom df

Output

double

<unassigned>

Degrees of freedom for the paired-sample t-test.

P-value prob

Output

double

<unassigned>

Associated p-value of the test. Users can compare it with their desirable significance level (commonly 0.05). If the p-value 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* (1-alpha) %.

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* (1-alpha) %.

Description

The Pair-Sample t-Test analysis determines whether the means of two same-sized and dependent samples from a normal distribution are equal or not, and calculates the confidence interval for the difference between the means. The pair-sample t-test 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 t-test 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 2-sample t-test, 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 X-Functions

ttest1, ttest2