var.test(x, y, alternative="two.sided", conf.level=.95)
NA
s and
Inf
s are allowed but will be
removed.
"greater"
,
"less"
or
"two.sided"
,
or just the initial letter of each, indicating
the specification of the alternative hypothesis.
alternative
refers to the true population variance for
x
in relation to that
for
y
.
"htest"
, containing the following components:
names
attribute
"F"
.
statistic
. Component
parameters
has
names
attribute
c("num df", "denom df")
.
x
to that for
y
.
The confidence level is recorded in the attribute
conf.level
.
estimate
has a
names
attribute describing its elements.
1
, the value of the ratio of population variances
specified by the null hypothesis. Component
null.value
has
names
attribute
"ratio of variances"
.
alternative
:
"greater"
,
"less"
or
"two.sided"
.
x
and
y
.
The null hypothesis states that the population variances are equal.
The alternative hypothesis states that the variance of the population
from which
x
is drawn is greater, less than, or simply not
equal to the variance of the population from which
y
is drawn,
depending on the value of input argument
alternative
.
It is assumed that both
x
and
y
are drawn from normal populations.
Outliers in the data may have a significant effect on the results
through their relatively strong influence on the variance estimates.
Box, G. E. P., Hunter, W. G. and Hunter, J. S. (1978).
Statistics for Experimenters.
New York: Wiley.
Snedecor, G. W. and Cochran, W. G. (1980).
Statistical Methods,
7th ed. Ames, Iowa: Iowa State University Press.
x <- rnorm(22); y <- rnorm(20,0,1.5) var.test(x, y, conf.level=.9) # The null hypothesis is that 'x' and 'y' come from # populations with the same variance. These populations # are assumed to be normal. The alternative hypothesis is # that the population variances are not equal. The # confidence interval for the ratio of the population # variances will have a confidence level of 0.90. var.test(x, y, alternative="greater") # The null hypothesis is as above. The alternative # hypothesis is that the population variance for # 'x' is greater than that for 'y'.