Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Two-sample *F*-test for equal variances

`h = vartest2(x,y)`

`h = vartest2(x,y,Name,Value)`

```
[h,p] =
vartest2(___)
```

```
[h,p,ci,stats]
= vartest2(___)
```

returns
a test decision for the null hypothesis that the data in vectors `h`

= vartest2(`x`

,`y`

)`x`

and `y`

comes
from normal distributions with the same variance, using the two-sample *F*-test.
The alternative hypothesis is that they come from normal distributions
with different variances. The result `h`

is `1`

if
the test rejects the null hypothesis at the 5% significance level,
and `0`

otherwise.

returns
a test decision for the two-sample `h`

= vartest2(`x`

,`y`

,`Name,Value`

)*F*-test with
additional options specified by one or more name-value pair arguments.
For example, you can change the significance level or conduct a one-sided
test.

Was this topic helpful?