Maxima Function
test_variance_ratio (x1, x2)
test_variance_ratio(x1,x2,option_1,option_2,...)
This is the variance ratio F-test for two normal populations. Arguments x1 and x2 are lists or column matrices containing two independent samples.
Options:
'alternative
, default 'twosided
, is the alternative hypothesis;
valid values are: 'twosided
, 'greater
and 'less
.
'mean1
, default 'unknown
, when it is known, this is the mean of
the population from which x1 was taken.
'mean2
, default 'unknown
, when it is known, this is the mean of
the population from which x2 was taken.
'conflevel
, default 95/100
, confidence level for the confidence interval of the
ratio; it must be an expression which takes a value in (0,1).
The output of function test_variance_ratio
is an inference_result
Maxima object
showing the following results:
'ratio_estimate
: the sample variance ratio.
'conf_level
: confidence level selected by the user.
'conf_interval
: confidence interval for the variance ratio.
'method
: inference procedure.
'hypotheses
: null and alternative hypotheses to be tested.
'statistic
: value of the sample statistic used for testing the null hypothesis.
'distribution
: distribution of the sample statistic, together with its parameters.
'p_value
: p-value of the test.
Examples:
The equality of the variances of two normal populations is checked against the alternative that the first is greater than the second.
(%i1) load("stats")$ (%i2) x: [20.4,62.5,61.3,44.2,11.1,23.7]$ (%i3) y: [1.2,6.9,38.7,20.4,17.2]$ (%i4) test_variance_ratio(x,y,'alternative='greater); | VARIANCE RATIO TEST | | ratio_estimate = 2.316933391522034 | | conf_level = 0.95 | | conf_interval = [.3703504689507268, inf] | (%o4) | method = Variance ratio F-test. Unknown means. | | hypotheses = H0: var1 = var2 , H1: var1 > var2 | | statistic = 2.316933391522034 | | distribution = [f, 5, 4] | | p_value = .2179269692254457