Self-Check Questions (ungraded)

Hypothesis testing

Aidong Adam Ding
Made using Slidify in R. (Click mouse then right arrow key for next slide.)

Question 1

We use the t-test for H0: \(\mu\)= -2 versus HA: \(\mu\)< -2 at \(\alpha\)=0.05 level (reject when p-value<0.05). The sample size is n=10. We check the real Type I error rate of this test, when data comes from N(mean= -2, sd=3) distribution, using 10,000 Monte Carlo simulation runs. Write the R commands for the simulation below.

Submit and Compare Clear

Question 2

We use the t-test for H0: \(\mu\)= -2 versus HA: \(\mu\)> -2 at \(\alpha\)=0.05 level. We wish to know the power of this test when data comes from N(mean=1, sd=3) distribution with a sample size n=10. Write the R command that calculate this power.

Submit and Compare Clear