Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Hi there, could you help me solve these questions? Could you show me the R code for each question? Thank you! 1) This problem is

Hi there, could you help me solve these questions? Could you show me the R code for each question? Thank you!

image text in transcribed
1) This problem is designed to show the difference between a condence interval for the mean response and a prediction interval for a new y when tting the normal simple linear regression model. See Lecture 5 Slides 1322 for reference. Lecture 5 has been updated so download the latest version from Canvas. Suppose the true model is y, = 4.4 + 0.8 3:,- + e,- e,- miep N(O, 32) 1:: 1,. . .65 That is, o: = 4.4, = 0.8, a2 = 9, and n = 65. Let the predictor so be a sequence of 65 numbers between the values 515. a) Set a seed at 123 and use R to generate data according to the model. Make a scatterplot, t the model, and add the tted regression line, the 95% condence band for the mean response, and the 95% prediction interval for a new 3;. Include the plot in your homework. b) Let mn+1 = 12. What is the value of the true mean response? Set a seed at 135 and run a simulation that calculates 2,000 95% condence intervals for the mean response. Report the proportion of condence intervals that trap the true value. Show R code and the proportion. c) Repeat part b) for a 95% prediction interval for a new 3;. Set a seed at 135, report the proportion of prediction intervals that trap the true value. Show R code and the proportion

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Cambridge International AS & A Level Further Mathematics Coursebook

Authors: Lee Mckelvey, Martin Crozier

1st Edition

1108403379, 978-1108403375

More Books

Students also viewed these Mathematics questions