# Type I Error and Power using Monte Carlo Simulations

Hello,

1. Consider a normal population with mean \mu=2 and variance \sigma^2=1. and testing the hypotheses: $$H_0: \mu=2 \mbox{ versus } H_1: \mu=3.$$ The decision rule is to reject H_0 if the sample mean, \bar{x} is larger than 2.5. Write code to estimate the probability Type-I error as well as the power of the test based on K=1000 Monte Carlo simulations. Print these two quantities.