165k views
5 votes
How do I calculate residuals and residual plots? Ex: The Watsons have always kept a garden of Geometrees in their yard. The data table and scatter plot below represent the number of years for their longest living Geometree and how tall it has grown in feet.

How do I calculate residuals and residual plots? Ex: The Watsons have always kept-example-1
How do I calculate residuals and residual plots? Ex: The Watsons have always kept-example-1
How do I calculate residuals and residual plots? Ex: The Watsons have always kept-example-2
User Dopamane
by
5.1k points

1 Answer

4 votes

Answer:

Complete step by step explanation along with graphs are provided below.

Explanation:

We are given a linear regression model described by the equation,


f(x) = 1.3x + 9.2

Where x is the age in years of the Geometrees and f(x) is the corresponding height of the Geometrees.

Residual value:

A residual value shows the position of a data point with respect to the regression line.

The Residual value is calculated by

Residual value = Observed value - Predicted value

Where observed values are already given in the question.

The predicted values are calculated as

For x = 1

F(x) = 1.3(1) + 9.2 = 1.3 + 9.2 = 10.5

For x = 2

F(x) = 1.3(2) + 9.2 = 2.6 + 9.2 = 11.8

For x = 3

F(x) = 1.3(3) + 9.2 = 3.9 + 9.2 = 13.1

For x = 4

F(x) = 1.3(4) + 9.2 = 5.2 + 9.2 = 14.4

The rest of the predicted values are calculated similarly and are given in the attached table.

Now we can find out the residual values,

Residual value = Observed value - Predicted value

Residual value = 9 - 10.5 = -1.5

Residual value = 12 - 11.8 = 0.2

Residual value = 14 - 13.1 = 0.9

Residual value = 15 - 14.4 = 0.6

The rest of the residual values are calculated similarly and are given in the attached table.

A plot of residual values vs age of Geometrees is attached.

A plot of residual values vs height of Geometrees is also attached.

Note:

A residual value closer to 0 is desired since such values means that the regression best fits the data points.

How do I calculate residuals and residual plots? Ex: The Watsons have always kept-example-1
How do I calculate residuals and residual plots? Ex: The Watsons have always kept-example-2
How do I calculate residuals and residual plots? Ex: The Watsons have always kept-example-3
User Torra
by
5.4k points