Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

USE RStudio 2. Using seed of 123, and rnorm function in R , generate a sample of size n=1000n=1000 of Xi?N(0,?2X)Xi where ?2X=4, and generate

USE RStudio

2. Using seed of 123, and rnorm function in R, generate a sample of size n=1000n=1000 of Xi?N(0,?2X)Xi where ?2X=4, and generate Yi=1.25?0.2Xi?i where ?i?N(0,?2?) and ?2?=1

a. Plot the scatter plot of X and Y.

b. Split the sample into 2 subsets of sizes 250 and 750. For each subset, run the regression of Y on X using lm. Add each fitted regression line (use color) to your plot from (a). Are the lines the same? Explain why/why not

c. Repeat the steps for different values of n, ?2X, and ?2?. Do you get similar results? What changes and why?

Below is the image of same questions as above:

image text in transcribed
2. (40 points) Using seed of 123, and rnorm function in R , generate a sample of size n = 1000 of X; ~ N(0, of ) where of = 4, and generate Y; = 1.25 - 0.2Xje; where &; ~~ N(0, of ) and of = 1 a. Plot the scatter plot of X and Y. b. Split the sample into 2 subsets of size 250 and 750. For each subset, run the regression of Y on X using 1m . Add each fitted regression line (use color) to your plot from (a). Are the lines the same? Explain why/why not c. Repeat the steps for different values of n, or, and o . Do you get similar results? What changes and why

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

Precalculus With Limits

Authors: Ron Larson

3rd Edition

1285607163, 9781285607160

More Books

Students also viewed these Mathematics questions

Question

Define tissue.

Answered: 1 week ago

Question

Where do your students find employment?

Answered: 1 week ago