Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Use R to solve the following three problems. Submit one R. file with the code and one pdf file. Only the submissions with both
Use R to solve the following three problems. Submit one R. file with the code and one pdf file. Only the submissions with both files will be graded. Make sure your R files are self-sufficient, i.e. they can run on any computer. Make sure to add lines to install and load any necessary packages etc. The pdf file should clearly answer the questions, include any relevant plots etc. 3. (3 points) (a) Generate an i.i.d. sample X N(1, 2) of size nx = 20 and an independent i.i.d. sample Y~ N(1,3) of size ny = 15. Using these samples, construct a 95% confidence interval for (E[X] - E[Y]). Store the values of the upper and lower bounds of the confidence interval. N (b) Repeat part (a) for M = 100 different samples. On the same graph, draw the upper bound and the lower bound against each repetition, i.e. on the z-axis you put the repetition number m from 1 to M, on the y-axis you put the upper and the lower bounds of your confidence interval. (c) In how many samples does the confidence interval not cover zero?
Step by Step Solution
★★★★★
3.52 Rating (159 Votes )
There are 3 Steps involved in it
Step: 1
a l...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started