R bloggers

Type I error rates in two-sample t-test by simulation

FavoriteLoadingAdd to favorites

What do you do when analyzing data is fun, but you don’t have any new data? You make it up. This simulation tests the type I error rates of two-sample t-test in R and SAS. It demonstrates efficient methods for simulation, and it reminders the reader not to take the result of any single hypothesis test as gospel truth. That is, there is always a risk of a false positive (or false negative), so determining truth requires more than one research study. A type I error is a false positive. That is, it happens when a hypothesis test rejects the null hypothesis when in fact it is not true. In this simulation the null hypothesis is true by design, though in the real world we cannot be sure the null hypothesis is true. This is why we write that we…
Original Post: Type I error rates in two-sample t-test by simulation