2

How can I calculate the theoretical type II error in this particular case using R?

a <- rnorm(500, 10, 5)
b <- rnorm(500, 10, 5)
t.test(a, b)
John Coleman
  • 51,337
  • 7
  • 54
  • 119
newa123
  • 99
  • 8

1 Answers1

1

Type 2 error is the probability of failing to reject the null when the null is indeed false. In this case both variables a and b have the same mean 10. So, the null is not false. Therefore, there is no question of type II error here.