linear regression: scaling and residuals

18
Linear regression: scaling and residuals Starter: Complete question 4 on page 129. Use this as a scale for your axis

Upload: marvin

Post on 22-Feb-2016

39 views

Category:

Documents


0 download

DESCRIPTION

Linear regression: scaling and residuals. Starter: Complete question 4 on page 129. Use this as a scale for your axis. Linear regression: scaling and residuals. Starter: Answers. (a). Linear regression: scaling and residuals. Starter: Answers. , - PowerPoint PPT Presentation

TRANSCRIPT

Page 1: Linear regression: scaling and residuals

Linear regression: scaling and residuals

Starter:Complete question 4 on page 129.

Use this as a scale for your axis

Page 2: Linear regression: scaling and residuals

Linear regression: scaling and residuals

Starter: Answers.(a)

Page 3: Linear regression: scaling and residuals

Linear regression: scaling and residuals

Starter: Answers.b) ,

c) tells us that for every millibar increase in pressure, the predicted wind speed will drop by .

d) millibars is the only reliable estimate.

Page 4: Linear regression: scaling and residuals

Linear regression: scaling and residuals

Learning objectives:Understand how a regression equation is affected by

a linear transformation of either variableCalculate and draw conclusions from residuals

Page 5: Linear regression: scaling and residuals

Linear transformationsThis skill is useful if you want to take a model that you know works and use it with different units.

Page 6: Linear regression: scaling and residuals

ExampleThis is the data on midday temperature and ice cream sales.

Assuming a linear model is suitable, calculate the least squares regression equation.

Temperature

Ice cream sales

Page 7: Linear regression: scaling and residuals

ExampleThis is the data on midday temperature and ice cream sales.

Now suppose you want to work in Fahrenheit (because you’re American or over 70).The temperature in Fahrenheit can be found from the temperature in Celsius using the linear scaling

Temperature

Ice cream sales

Page 8: Linear regression: scaling and residuals

ExampleThis is the data on midday temperature and ice cream sales.

Rearranging gives:

Substituting gives:

Temperature

Ice cream sales

Page 9: Linear regression: scaling and residuals

TaskExercise C, Question 1 – Page 130

Time: 10 minutes!

Page 10: Linear regression: scaling and residuals

Using ResidualsAnalysis of individual points can be achieved through considering the residual of that point.This can have two purposes:To compare performance of individuals within a data

set.To assess whether a data point is erroneous or not.

Be careful with your interpretations; use common sense and always refer to the context of the data.

Page 11: Linear regression: scaling and residuals

Drivers:A = Ahmed B = Brian C = Carol

What can we deduce about each driver?

Should Ahmed be sacked?

5

5.5

6

6.5

4 5 6 7 8 9 10 11

Load (000s kg)

Cons

umpt

ion

(km

l^-1

)

Ahmed’s fuel consumption is well below those predicted by the line, whilst Brian’s is above. This means Brian’s driving appears to be highly economical whilst Ahmed’s is not.

No, we should be careful not to make rash judgements as there may be factors involved other than driving style; e.g. age/make of lorry may not be the same for all drivers, route of journey may change etc. Also, we should remember the sample size is very small.

Page 12: Linear regression: scaling and residuals

Calculating residuals numericallyA residual is the difference the observed values of and those predicted by the regression equation.

Page 13: Linear regression: scaling and residuals

ExampleThis is the data on midday temperature and ice cream sales.

Temperature

Ice cream sales

Page 14: Linear regression: scaling and residuals

ExampleThis is the data on midday temperature and ice cream sales.

Temperature

Ice cream sales

Expected

Page 15: Linear regression: scaling and residuals

ExampleThis is the data on midday temperature and ice cream sales.

Temperature

Ice cream sales

Expected

Residual

Page 16: Linear regression: scaling and residuals

ExampleThis is the data on midday temperature and ice cream sales.

On one of the days the ice cream vendor was ill and went home early. Which data pair do you think represents this day?

Temperature

Ice cream sales

Expected

Residual

Page 17: Linear regression: scaling and residuals

TaskExercise D, Question 2 – Page 132

Time: 10 minutes!

Page 18: Linear regression: scaling and residuals

HomeworkTest yourself – Page 134Questions 1 & 3Due MondayTwo lucky people will be presenting their answers at the start of next lesson!