[Solution] We just need to implement the formula for the confidence interval for the mean. If we don’t use normal approximation we would use: CI=(X̄-t_c*
Question:
- We just need to implement the formula for the confidence interval for the mean. If we don’t use normal approximation we would use:
The following R-script would used:
After executing the code, the following output is obtained:
Notice though the sample is large enough for using normal approximation, in which case we can use:
which would lead to the following output:
(The results are quite similar when using the exact t-distribution and the approximation normal distribution).
(B) In this case, we need to find alpha so that \({{t}_{\alpha /2,df=249}}=1\), which leads to \(\alpha =0.3181\), so then the level of confidence of the interval is approximately 68.19%.
If using normal approximation, the confidence level would be 68.27%.
(C) (i) The confidence intervals obtained correspond to confidence interval for the mean high rate, which in this case corresponds to the proportion of high rates. Based on the sample results, using normal approximation, we are 50% confident that the true proportion of high rates is contained by (0.1712994, 0.2047006). Also we are 95% confident that the true proportion of high rates is contained by (0.1394706, 0.2365294). Finally, we are 99% confident that the true proportion of high rates is contained by (0.1242215, 0.2517785).
(ii) Using normal approximation, the margin of error for the 95% CI would be MOE = (0.2365294 - 0.1394706)/2 = 0.0485294.
(D) The sample size should increase by 4 (because of the term \(\frac{1}{\sqrt{n}}\) that appears in the formula of the confidence interval).
(E) In this case we use the following:
which leads to the following output:
In this case, due to a smaller sample size (n = 20), the margin of error is larger for the 3 confidence levels.
(F) The following code is used:
The true proportion of high rate loans is computed as:
which corresponds to 0.1993724.
In order to compute the proportion of times the sampled confidence intervals contain the true proportion 0.1993724, we use the following code:
The outcome is:
which means that the sampled 95% CI contain the true population mean 95% of the cases (notice that this is a random outcome, it won’t always be 95% of case, could me more or less, but it should be close to 95%).
Deliverable: Word Document 