Plots the intervals – Essaylink

Get your Assignment in a Minimum of 3 hours

Our academic experts are ready and waiting to assist with any writing project you may have. From simple essay plans, through to full dissertations, you can guarantee we have a service perfectly matched to your needs.

Free Inquiry Order A Paper Now Cost Estimate

In Exercise 4.2.11, the sampling was from the  distribution. Show, however, that setting μ = 0 and σ = 1 is without loss of generality.

Exercise 4.2.11

Let  be a random sample from a N(0, 1) distribution. Then the probability that the random interval  verify this empirically, in this exercise, we simulate m such intervals and calculate the proportion that trap 0, which should be “close” to (1 − α).

(a) Set n = 10 and m = 50. Run the R code mat=matrix(rnorm(m*n),ncol=n) which generates m samples of size n from the N(0, 1) distribution. Each row of the matrix mat contains a sample. For this matrix of samples, the function below computes the (1 − α)100% confidence intervals, returning them in a m × 2 matrix. Run this function on your generated matrix mat. What is the proportion of successful confidence intervals?


(b) Run the following code which plots the intervals. Label the successful intervals. Comment on the variability of the lengths of the confidence intervals.


"Is this question part of your assignment? We Can Help!"

"Our Prices Start at $11.99. As Our First Client, Use Coupon Code GET15 to claim 15% Discount This Month!!"

Get Started