hw-9

Homework 9 in STAT400: Computational Statistics @ CSU

Assignment

Be sure to set.seed(400) at the beginning of your homework.

  1. Use the Monte Carlo simulation to investigate whether the empirical Type I error rate of the \(t\)-test is approximately equal to the nominal significance level when the sampled population is non-normal.

    1. For \(n = 5, 10, 30, 100, 500, 1000\), investigate the empirical type I error for a test of \(H_0: \mu = 1\) vs. \(H_a: \mu \not= 1\) when \(X_1, \dots, X_n \sim \chi^2(1)\) with \(m = 2000\) Monte Carlo samples with nominal \(\alpha = .05\).

    2. For \(n = 5, 10, 30, 100, 500, 1000\), investigate the empirical type I error for a test of \(H_0: \mu = 1\) vs. \(H_a: \mu \not= 1\) when \(X_1, \dots, X_n \sim Unif[0, 2]\) with \(m = 2000\) Monte Carlo samples with nominal \(\alpha = .05\).

    3. For \(n = 5, 10, 30, 100, 500, 1000\), investigate the empirical type I error for a test of \(H_0: \mu = 1\) vs. \(H_a: \mu \not= 1\) when \(X_1, \dots, X_n \sim Exponential(1)\) with \(m = 2000\) Monte Carlo samples with nominal \(\alpha = .05\).

    4. Compare your results in a.-c. in a table. What can you say about the departures from Normality as they relate to the Type I error rate of the \(t\)-test?

  2. Suppose \(X_1, \dots, X_{n}\) is a random sample from a \(N(\mu, \sigma^2)\) distribution. Consider the test \(H_0: \mu = 500\) vs. \(H_a = \mu \not= 500\) with \(\alpha = 0.05\). Then under the alternative hypothesis, \[ T^* = \frac{\overline{X} - 500}{s/{\sqrt{n}}} \sim t_{n - 1}. \] for \(\mu_a \not= 500\). We will examine the impact of effect size on power. Use \(m = 1000\) for the number of Monte Carlo replications and \(\sigma = 100\).

    1. Set \(n = 20\). Plot the estimated power or \(\mu_a\) ranging between \(350\) to \(650\).
    2. Set \(n = 100\) and repeat part a. Plot both power curves on the same plot. What happens to power as \(n\) increases?
    3. What is the estimated power when \(\mu_a = 450\) for \(n = 20\) and \(n = 100\)?
    4. When \(n = 20\), what effect size will you need to achieve power of approximately \(0.80\)?

Turn in in a pdf of your homework to canvas. Your .Rmd file on the server will also be used in grading, so be sure they are identical and reproducible.