Purchase Solution

Regression Line and Confidence Intervals using R

Not what you're looking for?

Ask Custom Question

See the attached file.

The question asks to fit a regression line for an independent variable and its dependent variable response.
Data needs to be plotted in R (with code) and regression line.
Confidence intervals for different responses is also needed.

Here X is the predictor (independent variable), and Y is the response (dependent variable).
(a) Fit a regression line, and provide estimates for the intercept ?0, the slope ?1, and the residual standard deviation ?.
(b) Plot the data, and show the regression line.
(c) What is the expected response for X = 60? What is the expected response for X = 70? Provide 95% confidence intervals.
(d) For both X = 60 and X = 70, provide 95% prediction intervals.
(e) Comment on the lengths of the four intervals.

Data:

Y=c(
541,524,561,414,410,457,344,467,464,498,580,471,525,508,566,635,603,714,865,
640,649,540,464,547,460,566,577,631,574,534,571,554,577,628,487,644,640,704,
648,968,587,699,632,591,782,510,610,524)

X=c(
52.5,57.2,58.0,52.9,54.4,57.1,45.1,55.3,52.9,55.2,53.0,52.5,57.4,54.5,60.8,
58.6,57.2,54.0,72.4,67.7,66.3,60.2,51.1,51.7,55.1,54.4,54.8,57.9,56.3,49.3,
51.8,51.3,57.8,54.7,48.7,62.9,56.6,58.6,66.3,67.2,62.6,56.3,60.3,50.8,67.2,
57.1,62.3,59.3).

Attachments
Purchase this Solution

Solution Summary

Regression line and confidence intervals using R is provided in the solution.

Solution Preview

> Y=c(
+ 541,524,561,414,410,457,344,467,464,498,580,471,525,508,566,635,603,714,865,
+ 640,649,540,464,547,460,566,577,631,574,534,571,554,577,628,487,644,640,704,
+ 648,968,587,699,632,591,782,510,610,524)
> X=c(
+ 52.5,57.2,58.0,52.9,54.4,57.1,45.1,55.3,52.9,55.2,53.0,52.5,57.4,54.5,60.8,
+ 58.6,57.2,54.0,72.4,67.7,66.3,60.2,51.1,51.7,55.1,54.4,54.8,57.9,56.3,49.3,
+ 51.8,51.3,57.8,54.7,48.7,62.9,56.6,58.6,66.3,67.2,62.6,56.3,60.3,50.8,67.2,
+ 57.1,62.3,59.3)
> model = lm(Y~X)
> summary(model)

Call:
lm(formula = Y ~ X)

Residuals:
Min 1Q Median 3Q Max
-129.65 -60.53 -13.03 58.57 247.90

Coefficients:
Estimate Std. Error t value ...

Purchase this Solution


Free BrainMass Quizzes
Terms and Definitions for Statistics

This quiz covers basic terms and definitions of statistics.

Measures of Central Tendency

Tests knowledge of the three main measures of central tendency, including some simple calculation questions.

Know Your Statistical Concepts

Each question is a choice-summary multiple choice question that presents you with a statistical concept and then 4 numbered statements. You must decide which (if any) of the numbered statements is/are true as they relate to the statistical concept.

Measures of Central Tendency

This quiz evaluates the students understanding of the measures of central tendency seen in statistics. This quiz is specifically designed to incorporate the measures of central tendency as they relate to psychological research.