March 2019
Beginner to intermediate
448 pages
13h 14m
English
A valid question is whether we are losing power due to Welch's correction when the variances are the same. Intuition would suggest that Welch's should be worse than the standard t-test, even when the variances are the same. The t-test (its standard version) is a uniform that's very powerful to test, meaning that, for any possible alternative, it has the greatest power. How can we assess the loss in statistical power when we use Welch's test?
In this case, we will study what happens when we have two samples with different means (12 versus 10) and the same variance:
calc_power <- function(n,sd1,sd2,equalvar){ rejected <- 0 for (x in 1:100000){ data1 <- rnorm(n,12,sd1) data2 <- rnorm(n,10,sd2) result <- t.test(data1,data2,var.equal=equalvar)$p.value ...Read now
Unlock full access