Presentation is loading. Please wait.

Presentation is loading. Please wait.

Regression.

Similar presentations


Presentation on theme: "Regression."— Presentation transcript:

1 Regression

2 Regression This Chapter is on Regression
We will learn the difference between dependent and independent variables We will be looking at the line of best fit We are going to see how to calculate the equation of the line of best fit (regression equation), and interpret it

3 Teachings for Exercise 7A

4 Regression x = 0 y = 3 Variables, and the line of best fit
The equation of a straight line is usually given in the form y = a + bx. If y = a + bx then a is the y-intercept (where the line cuts the y-axis) and b is the gradient of the line. You can draw any line like this by choosing values for x and substituting into the equation.  Sketch the equation y = 2x + 3 x = 1 y = 5 x = 2 y = 7 y y = 2x + 3 8 6 4 2 x 1 2 3 7A

5 Regression Variables, and the line of best fit
Independent variable (explanatory) is independent of the other variable. It is plotted on the x-axis. Dependent variable (response) is the one whose values are determined by the independent variable. It is plotted on the y-axis. For example:  If we are looking at album sales and stores that stock albums…  The album sales will be dependent on the number of stores selling them  So album sales are dependent, and the number of stores independent 7A

6 Regression Variables, and the line of best fit
The formula for the line of best fit will be in the form: y = a + bx So you must always calculate b first! The regression line goes through the middle of the points plotted Mathematically each point is a vertical distance ‘e’ from the line Each of these distances is known as a residual The regression line will minimise the sum of the squares of these residuals y e5 e3 e4 e1 e2 x 7A

7 Regression Variables, and the line of best fit
For the following set of data: a) Calculate Sxx and Sxy. b) Work out the equation of the regression line. 7A

8 Give answers in full, or if rounded, to 3sf
Regression Variables, and the line of best fit For the following set of data: a) Calculate Sxx and Sxy. b) Work out the equation of the regression line. y = a + bx Give answers in full, or if rounded, to 3sf y = x 7A

9 Teachings for Exercise 7B

10 Regression Coding and Regression Equations
As with other topics we have looked at, coding can be used to make the numbers easier to work with. However, the coded regression line will most likely be different from the actual regression line To calculate the actual regression line, you must substitute the codes for x and y into the coded regression formula… 7B

11 Regression Coding and Regression Equations
The following coding was used to alter a set of data. This is the formula for the coded regression line: Calculate the actual regression line for the original data, x and y. Substitute the codes for t and r Multiply all parts by 10 to cancel the divide by 10 Expand the bracket Simplify by grouping Divide by 50 to leave y on its own OR: y = (0.04x ) 7B

12 Regression 7B Coding and Regression Equations
Eight Samples of carbon steel were produced with different percentages (c) of carbon in them. Each sample was heated until it melted and the temperature (m) recorded. The results were coded so that: The following table shows the coded results: Calculate Sxy and Sxx. Carbon (x) 1 2 3 4 5 6 7 8 Melting Point (y) 35 28 24 16 15 12 7B

13 Regression 7B Coding and Regression Equations
Calculate the regression line of y on x. y = a + bx y = x Carbon (x) 1 2 3 4 5 6 7 8 Melting Point (y) 35 28 24 16 15 12 7B

14 Regression 7B Coding and Regression Equations y = 36.21 - 4.048x
Calculate the regression line of m on c. Substitute the codes for y and x Multiply out the bracket Multiply by 5 to cancel the division Add 700 Remember, with longer decimals, make a note of the fraction your calculator gives, so you can get the exact value later on… 7B

15 Teachings for Exercise 7C

16 Regression Applying and Interpreting the Regression Equation
A regression equation can be used to predict the dependent variable, based on a chosen value of the independent variable. Interpolation  Estimating a value that is within the data range you have Extrapolation  Estimating a value outside the data that you have. As it is outside the data you have, extrapolated values can be unreliable. Generally, avoid extrapolating values unless asked and even then treat answers ‘with caution’… 7C

17 Interpolation as x = 35 is within the data range we have…
Regression Applying and Interpreting the Regression Equation The results from an experiment in which different masses were placed on a spring and the resulting length of the spring measured, are shown below. The regression line was calculated to be: y = x Estimate the value for y when x = 35kg. Is this Interpolation or Extrapolation? Mass, (x) kg 20 40 60 80 100 Length, y (cm) 48 55.1 56.3 61.2 68 Interpolation as x = 35 is within the data range we have… Include the unit! 7C

18 Extrapolation as x = 120 is outside the data range we have…
Regression Applying and Interpreting the Regression Equation The results from an experiment in which different masses were placed on a spring and the resulting length of the spring measured, are shown below. The regression line was calculated to be: y = x Estimate the value for y when x = 120kg. Is this Interpolation or Extrapolation? Mass, (x) kg 20 40 60 80 100 Length, y (cm) 48 55.1 56.3 61.2 68 Extrapolation as x = 120 is outside the data range we have… Include the unit! 7C

19 The x represents mass and the y represents spring length
Regression Applying and Interpreting the Regression Equation The results from an experiment in which different masses were placed on a spring and the resulting length of the spring measured, are shown below. The regression line was calculated to be: y = x Interpret the ’43.89’ in the equation.  If x = 0, y = 43.89  If the mass is 0kg, the length of the spring is 43.89cm  So the represents the starting length of the spring! Mass, (x) kg 20 40 60 80 100 Length, y (cm) 48 55.1 56.3 61.2 68 The x represents mass and the y represents spring length 7C

20 The x represents mass and the y represents spring length
Regression Applying and Interpreting the Regression Equation The results from an experiment in which different masses were placed on a spring and the resulting length of the spring measured, are shown below. The regression line was calculated to be: y = x Interpret the ’0.2305’ in the equation.  If we increase x by 1, y increases by  If the mass increases by 1kg, the length of the spring increases by cm  So the represents the length increase of the spring after adding on an extra kilogram of mass Mass, (x) kg 20 40 60 80 100 Length, y (cm) 48 55.1 56.3 61.2 68 The x represents mass and the y represents spring length 7C

21 Summary We have learnt how to calculate a line of best fit
We have used coding and learnt how to ‘undo’ it by substitution We have learnt how to interpret a regression equation We have looked at Interpolation and Extrapolation


Download ppt "Regression."

Similar presentations


Ads by Google