2.13.2.7 vartest2(Pro)

Brief Information

Perform an F-test

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;

X-Function Execution Options

Please refer to the page for additional option switches when accessing the x-function from script

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 F-test

Tail tail

Input

int

two

This variable indicates whether an upper, lower, or 2 tailed test should be performed

Option list

  • two:Two Tailed
H0: Variance 1 <> Variance 2
Two tailed F-test will be performed.
It tests if the two sample variances are equal
  • upper:Upper Tailed
H0: Variance 1 > Variance 2
Upper tailed F-test will be performed.
It tests if the variance from sample one is larger than the variance from sample two
  • lower:Lower Tailed
H0: Variance 1 < Variance 2
Lower tailed F-test 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 F-test

Denominator Degrees of Freedom dendf

Output

double

<unassigned>

Denominator degrees of freedom for F-test

P-value prob

Output

double

<unassigned>

Associated p-value of the test. If the p-value 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 F-test 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 F-test statistic is a generalization of the t-test statistic, and is a scalar random variable. The F-test 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 F-Test statistic and p-value will be calculated so that you can decide whether or not to reject the null hypothesis. A small P-value, which less than a significance level \alpha, 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 F-test from LabTalk Script. Please refer to Algorithm of Two-Sample 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 X-Functions

vartest1, ttest2, ttest1