Performs a F test to compare the variances of two normal populations.
ht_2pop_var(
x,
y,
ratio = 1,
alternative = "two.sided",
conf_level = NULL,
sig_level = 0.05,
na_rm = FALSE
)a tibble with the following columns:
the value of the test statistic.
the p-value for the test.
critical value in the General Procedure for Hypothesis Testing.
critical region in the General Procedure for Hypothesis Testing.
a scalar value indicating the value of ratio.
character string giving the direction of the alternative hypothesis.
lower bound of the confidence interval. It is presented only if !is.null(conf_level).
upper bound of the confidence interval. It is presented only if !is.null(conf_level).
a (non-empty) numeric vector.
a (non-empty) numeric vector.
the hypothesized ratio of the population variances of x and y. Default value is 1.
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less".
a number indicating the confidence level to compute the confidence interval. If conf_level = NULL, then the confidence interval is not included in the output. Default value is NULL.
a number indicating the significance level to use in the General Procedure for Hypothesis Testing.
a logical value indicating whether NA values should be removed before the computation proceeds. Default value is FALSE.
We have wrapped the var.test in a function as explained in the book of Montgomery and Runger (2010) <ISBN: 978-1-119-74635-5>.
x <- rnorm(100, sd = 2)
y <- rnorm(1000, sd = 10)
ht_2pop_var(x, y)
Run the code above in your browser using DataLab