This exercise is intended to check the statement: "If we were to compute confidence intervals a large number of times, we would find that approximately $(1-\alpha) \times 100 \%$ of the time, the computed intervals would contain the true value of the parameter."
(a) Assuming that the mean is unknown and that the variance is known, find the $90 \%$ confidence interval for the mean of a Gaussian random variable with $n=10$.
(b) Generate 500 batches of 10 zero-mean, unit-variance Gaussian random variables. and determine the associated confidence intervals. Find the proportion of confidence intervals that include the true mean (which by design is zero). Is this in agreement with the confidence level $1-\alpha=.90$ ?
(c) Repeat part b using exponential random variables with mean one. Should the proportion of intervals including the true mean be given by $1-\alpha$ ? Explain.