I have this code that does a hypothesis test that tests H0: mu = 0.3 against H1: mu > 0.3. I am asked to estimate the probability of the test leading to the non-rejection of H0 when mu = 1.1. I wanted to do an if statement as followed but I don't know what argument I should use from the t.test
set.seed(1343)
m = 0
accept = 0
valores = numeric(0)
while (m != 150){
amostra <- rnorm(27, mean = 1.1, 2.8)
x <- t.test(amostra, mu = 0.3, alternative = "greater", conf.level = 0.96)
if (something){
accept = accept + 1
}
m = m + 1
}
prob = accept/m