Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

20
Linear Scaling of Linear Scaling of Regression Data Regression Data © Christine Crisp Teach A Level Maths” Teach A Level Maths” Statistics 1 Statistics 1

Transcript of Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Page 1: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Linear Scaling of Regression DataRegression Data

© Christine Crisp

““Teach A Level Maths”Teach A Level Maths”Statistics 1Statistics 1

Page 2: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

"Certain images and/or photos on this presentation are the copyrighted property of JupiterImages and are being used with permission under license. These images and/or photos may not be copied or downloaded without permission from JupiterImages"

Statistics 1

AQA

EDEXCELOCR

Page 3: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

We may want to change the units that have been used when collecting data.

For example, we may want kilometres instead of miles or kilograms instead of pounds.

Sometimes we may simply want to reduce the size of the numbers in data items.

In both these cases we talk about scaling or coding the data.

When dealing with regression lines, we can alter a regression line to different units without converting the original data.

Page 4: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression DataA researcher has the following data giving the average daily maximum temperature for each month in 1980 and the corresponding figures for the sales of milk in a supermarket.

J F M A M J J A S O N D

Temp (°F), F 40 38 46 55 60 70 65 69 64 58 47 49

Sales ( thousands of

pints ), y8 9 8 5 6 3 4 2 3 7 8 10

The y on F regression line is

Fy 213408417 The correlation coefficient is 0·89. Recent data are measured in degrees Celsius and thousands of litres and the researcher wants to compare the sets of results by converting the older ones.

Page 5: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

761

yY

To convert from pints to litres, we must divide by 1·76 so, if Y is the new variable,

The conversion from degrees Fahrenheit to degrees Celsius is

)32(9

5 FC

As the conversions are both linear, instead of converting all the data we can simply substitute into the regression line.We first need to rearrange both conversion equations.

Page 6: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

761

yY

)32(9

5FC

Yy 761

325

9FC 32

5

9 CF

As we have only a small amount of data, we can check the effect of the scaling by converting the data and drawing both regression lines.

Substituting in

Fy 213408417

32

5

9213408417761 CY

CY 384100111761 CY 21830266

836384108417761 CYSimplifying:

Page 7: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

The correlation coefficient is a measure of the spread of the data so is not altered by linear scaling.( Although the scales are different on the

diagrams, we can see that the scatter of the points is unchanged. )

CY 21830266 Fy 213408417 Product Moment Correlation Coefficient

(p.m.c.c.)

Graphs showing milk sales against temperature

Page 8: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

e.g.2 A set of data connects two variables, p and t. However, in order to calculate a regression line, the data has been coded using the formulae

x 60t and y p 1000

If the regression line of y on x is y = 3·29 + 4·15xfind the equation of the regression line for p

on t.

Solution:

Substitute for y and x:

xy 154293 )60(1542931000 tp

tp 249291003

Page 9: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

SUMMARY

To convert a scaled or coded regression equation, substitute for the variables using the conversion formulae.

The product moment correlation coefficient (p.m.c.c.) is not changed by linear scaling.

Page 10: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression DataExercise1. Data for 2 variables, v and z have been scaled

using the formulae

1000zy,100

vx

If the equation of the resulting y on x regression line is xy 162440 find the equation of the regression line of v

on z.

Solution:

1001624401000

vz

vz 02160441000

xy 162440 becomes

Page 11: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression DataExercise

(b) Use your answer to (a) to find the equation of the regression line of t on m.

(a) Find the equation of the y on x regression line, giving the values of the constants correct to 2 d.p.

(c) What effect would the conversion have on the product moment correlation coefficient?

2. A company rep. records the distance travelled, m miles, and time taken, t minutes, for 5 journeys. The data were converted to kilometres and hours and are summarised below. The formulae for the conversions are

60

ty

5

8mx

1422 x 432 y 10326 yx4624642 x

5n

and

Page 12: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

1422 x 432 y 10326 yx4624642 x

(b) The equation of the regression line of t on m.

(a) The y on x regression line:

(c) The conversion has no effect on the p.m.c.c.

xy 020031

n

yxyxS xy

n

xxS xx

22

xx

xy

S

Sb xbya

bxay

441111 258047

01910 03451

60

ty ,

5

8mx

5

8020031

60

mt

mt 921861

xy 020031 becomes

so

Solution:

Page 13: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.
Page 14: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

The following slides contain repeats of information on earlier slides, shown without colour, so that they can be printed and photocopied.For most purposes the slides can be printed as “Handouts” with up to 6 slides per sheet.

Page 15: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

We may want to change the units that have been used when collecting data.

For example, we may want kilometres instead of miles or kilograms instead of pounds.

Sometimes we may simply want to reduce the size of the numbers in data items.

In both these cases we talk about scaling or coding the data.

When dealing with regression lines, we can alter a regression line to different units without converting the original data.

Page 16: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

A researcher has the following data from 1980 giving the monthly average daily maximum temperature and sales of milk in a supermarket.

1087324365898Sales

( thousands of pints ), y

494758646965706055463840Temp (°F), F

NM J J A S O DAMFJ

The y on F regression line is

Fy 213408417 The correlation coefficient is 0·89. Recent data are measured in degrees Celsius and thousands of litres and the researcher wants to compare the sets of results by converting the older ones.

Page 17: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

761

yY

To convert from pints to litres, we must divide by 1·76 so, if Y is the new variable,

The conversion from degrees Fahrenheit to degrees Celsius is

)32(9

5 FC

As the conversions are both linear, instead of converting all the data we can simply substitute into the regression line.We first need to rearrange both conversion equations.

Page 18: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

761

yY

)32(9

5FC

Yy 761

325

9FC 32

5

9 CF

As we have only a small amount of data, we can check the effect of the scaling by converting the data and drawing both regression lines.

Substituting in

Fy 213408417

32

5

9213408417761 CY

CY 384100111761 CY 21830266

836384108417761 CYSimplifying:

Page 19: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

The correlation coefficient is a measure of the spread of the data so is not altered by linear scaling.( Although the scales are different on the

diagrams, we can see that the scatter of the points is unchanged. )

CY 21830266 Fy 213408417

Product Moment Correlation Coefficient (p.m.c.c.)

Graphs showing milk sales against temperature

Page 20: Linear Scaling of Regression Data © Christine Crisp Teach A Level Maths Statistics 1.

Linear Scaling of Regression Data

SUMMARY

To convert a scaled or coded regression equation, substitute for the variables using the conversion formulae.

The product moment correlation coefficient (p.m.c.c.) is not changed by linear scaling.