os_vartest
performs tests on the equality of standard
deviations (variances).It tests that the standard deviation of a sample is
equal to a hypothesized value.
os_vartest(x, sd, confint = 0.95, alternative = c("both", "less", "greater", "all"), ...)
os_vartest
returns an object of class "os_vartest"
.
An object of class "os_vartest"
is a list containing the
following components:
Sheskin, D. J. 2007. Handbook of Parametric and Nonparametric Statistical Procedures, 4th edition. : Chapman & Hall/CRC.
# lower tail os_vartest(mtcars$mpg, 5, alternative = 'less')#> One-Sample Statistics #> ----------------------------------------------------------------------------- #> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] #> ----------------------------------------------------------------------------- #> mpg 32 20.0906 1.0654 6.0269 3.8737 10.6526 #> ----------------------------------------------------------------------------- #> #> Lower Tail Test #> --------------- #> Ho: sd(mpg) >= 5 #> Ha: sd(mpg) < 5 #> #> Chi-Square Test for Variance #> ------------------------------------- #> Variable c DF Sig #> ------------------------------------- #> mpg 45.041 31 0.9506 #> -------------------------------------# upper tail os_vartest(mtcars$mpg, 5, alternative = 'greater')#> One-Sample Statistics #> ----------------------------------------------------------------------------- #> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] #> ----------------------------------------------------------------------------- #> mpg 32 20.0906 1.0654 6.0269 3.8737 10.6526 #> ----------------------------------------------------------------------------- #> #> Upper Tail Test #> --------------- #> Ho: sd(mpg) <= 5 #> Ha: sd(mpg) > 5 #> #> Chi-Square Test for Variance #> ------------------------------------- #> Variable c DF Sig #> ------------------------------------- #> mpg 45.041 31 0.0494 #> -------------------------------------# both tails os_vartest(mtcars$mpg, 5, alternative = 'both')#> One-Sample Statistics #> ----------------------------------------------------------------------------- #> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] #> ----------------------------------------------------------------------------- #> mpg 32 20.0906 1.0654 6.0269 3.8737 10.6526 #> ----------------------------------------------------------------------------- #> #> Two Tail Test #> --------------- #> Ho: sd(mpg) = 5 #> Ha: sd(mpg) != 5 #> #> Chi-Square Test for Variance #> ------------------------------------- #> Variable c DF Sig #> ------------------------------------- #> mpg 45.041 31 0.0989 #> -------------------------------------# all tails os_vartest(mtcars$mpg, 5, alternative = 'all')#> One-Sample Statistics #> ----------------------------------------------------------------------------- #> Variable Obs Mean Std. Err. Std. Dev. [95% Conf. Interval] #> ----------------------------------------------------------------------------- #> mpg 32 20.0906 1.0654 6.0269 3.8737 10.6526 #> ----------------------------------------------------------------------------- #> #> Ho: sd(mpg) = 5 #> #> Ha: sd < 5 Ha: sd != 5 Ha: sd > 5 #> c = 45.0412 c = 45.0412 c = 45.0412 #> Pr(C < c) = 0.9506 2 * Pr(C > c) = 0.0989 Pr(C > c) = 0.0494