Object Reference : Object View and Procedure Reference : Vector
  
 
teststat
Test simple hypotheses of whether the mean, median, or variance of the elements of a vector are equal to specific values.
Syntax
vector_name.teststat(options)
Specify the type of test and the value under the null hypothesis as an option. You must specify at least one hypothesis.
For tests of means, you may either estimate the variance or specify the variance as an option.
Options
 
mean=number
Test the null hypothesis that the mean equals the specified number.
med=number
Test the null hypothesis that the median equals the specified number.
var=number
Test the null hypothesis that the variance equals the specified number. The number must be positive.
std=number
Test equality of mean conditional on the specified standard deviation. The standard deviation must be positive.
prompt
Force the dialog to appear from within a program.
p
Print the test results.
Examples
vec1.teststat(mean=7)
tests the null hypothesis that the mean of VEC1 is equal to 7, using an estimated standard deviation.
vec1.teststat(mean=7, std=2)
tests the null that the mean is 7, using an estimated standard deviation, and also assuming that the standard deviation is known to be 2.
vec1.teststat(var=4)
tests the null hypothesis that the variance of VEC1 is equal to 4.
Cross-references
See “Descriptive Statistics & Tests” for a discussion of simple hypothesis tests.
See also Series::teststat.