Show the code
Show the code
var.test(df$ctrl,df$trt)
#>
#> F test to compare two variances
#>
#> data: df$ctrl and df$trt
#> F = 1.2553, num df = 15, denom df = 15, p-value = 0.6653
#> alternative hypothesis: true ratio of variances is not equal to 1
#> 95 percent confidence interval:
#> 0.4385898 3.5927405
#> sample estimates:
#> ratio of variances
#> 1.255285
res <- var.test(len ~ supp, data = ToothGrowth)
res
#>
#> F test to compare two variances
#>
#> data: len by supp
#> F = 0.6386, num df = 29, denom df = 29, p-value = 0.2331
#> alternative hypothesis: true ratio of variances is not equal to 1
#> 95 percent confidence interval:
#> 0.3039488 1.3416857
#> sample estimates:
#> ratio of variances
#> 0.6385951