2.13.2.7 vartest2(Pro)
Brief Information
Perform an Ftest
Additional Information
This feature is for OriginPro only.
Minimum Origin Version Required: 8.0 SR4
Command Line Usage
1. vartest2 irng:=(Col(A), Col(B));
2. vartest2 irng:=(Col(A), Col(B)) tail:=2;
3. vartest2 irng:=(Col(A), Col(B)) alpha:=0.1;
4. vartest2 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 two input data ranges on which to perform an Ftest

Tail

tail

Input
int

two

This variable indicates whether an upper, lower, or 2 tailed test should be performed
Option list
 H0: Variance 1 <> Variance 2
 Two tailed Ftest will be performed.
 It tests if the two sample variances are equal
 H0: Variance 1 > Variance 2
 Upper tailed Ftest will be performed.
 It tests if the variance from sample one is larger than the variance from sample two
 H0: Variance 1 < Variance 2
 Lower tailed Ftest will be performed.
 It tests if the variance from sample one is less than the variance from sample two

Significance Level

alpha

Input
double

0.05

Set the significance level of the test

Statistics

stat

Output
double

<unassigned>

Value of F test statistic

Numerator Degrees of Freedom

numdf

Output
double

<unassigned>

Numerator degrees of freedom for the Ftest

Denominator Degrees of Freedom

dendf

Output
double

<unassigned>

Denominator degrees of freedom for Ftest

Pvalue

prob

Output
double

<unassigned>

Associated pvalue of the test. If the pvalue is less than the value of alpha, the null hypothesis is rejected.

Lower Confidence Limit

lcl

Output
double

<unassigned>

The lower confidence limit for the for variance ratio

Upper Confidence Limit

ucl

Output
double

<unassigned>

The upper confidence limit for the variance ratio

Description
This function performs Ftest for testing whether the variance from one population equals, greater or less than the other one, and then creates a confidence interval for the sample variance ratio.
The Ftest statistic is a generalization of the ttest statistic, and is a scalar random variable. The Ftest statistic can be calculated as a ratio of the variances of two samples, and so can be used to test whether or not data samples come from populations with equal variances.
The FTest statistic and pvalue will be calculated so that you can decide whether or not to reject the null hypothesis. A small Pvalue, which less than a significance level , indicates that you can reject the null hypothesis
Examples
1. Import the file vartest2.dat located in \Sample\Statistics\ folder.
2. If you want to know whether the variances of the two samples are equal or not, please use the default command and type:
 vartest2 irng:=(col(a),col(b))
3. If you want to define another significant level, e.g. 0.1, you can use the following command:
vartest2 irng:=(col(a),col(b)) alpha:=0.1.
Algorithm
This function is used to perform Ftest from LabTalk Script. Please refer to Algorithm of TwoSample Test for Variance for the detail algorithms.
References
1. Snedecor, George W. and Cochran, William G. (1989), Statistical Methods, Eighth Edition, Iowa State University Press.
2. Tufte, Edward (1983), The Visual Display of Quantitative Information, Graphics Press.
Related XFunctions
vartest1, ttest2, ttest1
