Maxima Function
test_variance (x)
test_variance(x,option_1,option_2,...)
This is the variance chi^2-test. Argument x is a list or a column matrix containing a one dimensional sample taken from a normal population.
Options:
'mean
, default 'unknown
, is the population's mean, when it is known.
'alternative
, default 'twosided
, is the alternative hypothesis;
valid values are: 'twosided
, 'greater
and 'less
.
'variance
, default 1
, this is the variance value (positive) to be checked.
'conflevel
, default 95/100
, confidence level for the confidence interval; it must
be an expression which takes a value in (0,1).
The output of function test_variance
is an inference_result
Maxima object
showing the following results:
'var_estimate
: the sample variance.
'conf_level
: confidence level selected by the user.
'conf_interval
: confidence interval for the population variance.
'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 parameter.
'p_value
: p-value of the test.
Examples:
It is tested whether the variance of a population with unknown mean is equal to or greater than 200.
(%i1) load("stats")$ (%i2) x: [203,229,215,220,223,233,208,228,209]$ (%i3) test_variance(x,'alternative='greater,'variance=200); | VARIANCE TEST | | var_estimate = 110.75 | | conf_level = 0.95 | | conf_interval = [57.13433376937479, inf] | (%o3) | method = Variance Chi-square test. Unknown mean. | | hypotheses = H0: var = 200 , H1: var > 200 | | statistic = 4.43 | | distribution = [chi2, 8] | | p_value = .8163948512777689