## STA 248-The theory used in developing t condence intervals assumes

Question
The theory used in developing t condence intervals assumes the data come from a normal distribution. In this question we will look at what happens when that assumption is violated; that is, when the data come from other distribution.

(a) Create a matrix with 50 rows and 5 columns such that each row is a sample of size 5 from

the exponential distribution with = 1. Print your matrix.

(b) Compute the 90% t condence intervals for the mean for each sample. Use a diagram or

table to illustrate your intervals.

(c) What percent of your intervals successfully captured the true mean?

(d) Calculate the P-value for testing H0 : = 1 vs. H1 : 6= 1 for each sample. Describe

your P-values. Note that is the mean of the exponential distribution. In how many

tests did you reject H0? Use = 0:05.

(e) The exponential distribution is a fairly extreme departure from normality. What can you

conclude about the sensitivity of t intervals and tests to non-normality? That is, were the

observed condence level (for CI) and signicant level (for test) close to what you would expect