1 / 16

# Regression

Regression. Linear regression involves finding the equation of the line of best fit on a scatter graph. The equation obtained can then be used to make an estimate of one variable given the value of the other variable. There are two cases to consider, depending upon whether:.

Télécharger la présentation

## Regression

E N D

### Presentation Transcript

1. Regression Linear regression involves finding the equation of the line of best fit on a scatter graph. The equation obtained can then be used to make an estimate of one variable given the value of the other variable. There are two cases to consider, depending upon whether: • We wish to find a value of y given a value for x, or • We want to estimate x given y. S1 deals with the with the first situation.

2. Regression Linear regression involves finding the equation of the line of best fit on a scatter graph. The equation obtained can then be used to make an estimate of one variable given the value of the other variable. There are two cases to consider, depending upon whether: • We wish to find a value of y given a value for x, • We want to estimate x given y. S1 deals with the with the first situation.

3. The best fitting line is the one that minimizes the sum of the squared deviations, , where di is the vertical distance between the ith point and the line. The distances di are sometimes referred to as residuals. Regression d6 d3 d5 d4 d1 d2

4. As stated previously, the best fitting line should pass through the mean point, . Regression

5. y = a + bx where: b is sometimes referred to as the regression coefficient. and: Recall: and Regression The line that minimizes the sum of squared deviations is formally known as the least squares regression line of y on x. The equation of the least squares regression line of y on x is:

6. Regression Example: The table shows the latitude, x, and mean January temperature(°C), y, for a sample of 10 cities in the northern hemisphere. Calculate the equation of the regression line of y on x and use it to predict the mean January temperature for the city of Los Angeles, which has a latitude of 34°N.

7. Regression We begin by finding summary statistics for the table: We then use these to calculate the gradient (b) and y-intercept (a) for the regression line.

8. Regression To find the gradient, we need Sxy and Sxx: Therefore: –0.720 (to 3 s.f.)

9. To find the y-intercept we also need and : This is our estimate of the mean January temperature in Los Angeles. Regression So: = 33.3 (to 3 s.f.) Therefore, the equation of the regression line is: y = 33.3 – 0.720x So, when x = 34, y = 33.3 – 0.720 × 34 = 8.82°C.

10. Regression This prediction for the mean January temperature in Los Angeles is based purely on the city’s latitude. There are likely to be additional factors that can affect the climate of a city, for example: • altitude; • proximity to the coast; • ocean currents; • prevailing winds. The concept of regression we have considered here can be extended to incorporate other relevant factors, producing a new formula. This allows for more accurate prediction.

11. The dangers of extrapolation A regression equation can only confidently be used to predict values of y that correspond to x values that lie within the range of the data values available. It can be dangerous to extrapolate (i.e. to predict) from the graph, a value for y that corresponds to a value of x that lies beyond the range of the values in the data set. This is because we cannot be sure that the relationship between the two variables will continue to be true. It is reasonably safe to make predictions within the range of the data. It is unwise to extrapolate beyond the given data.

12. d) Explain why it would be inappropriate to use your line to estimate the wingspan of a duck, if the averageweight of a duck is 1 kg. Examination-style question: regression Examination-style question:The average weight and wingspan of 9 species of British birds are given in the table. • Plot the data on a scatter graph. Comment on the relationship between the variables. • Calculate the regression line of wingspan on weight. • Use your regression line to estimate the wingspan of a jay, if its average weight is 160 g.

13. Examination-style question: regression The graph indicates that there is fairly strong positive correlation between weight and wingspan – this means that wingspan tends to be longer in heavier birds.

14. x = weight y = wingspan Examination-style question: regression b) Summary values for the paired data are: These can be used to find the gradient of the regression line: Therefore: 0.176 (to 3 s.f.)

15. So: Examination-style question: regression To find the y-intercept we also need and : Therefore, the equation of the regression line is: y = 20.0 + 0.176x where y = wingspan and x = weight.

16. Examination-style question: regression c) When the weight is 160 g, we can predict the wingspan to be: y = 20.0 + 0.176x = 20.0 + (0.176 × 160) = 48.2 cm (to 3 s.f.) d) The average weight of a duck is outside the range of weights provided in the data. It would therefore be inappropriate to use the regression line to predict the wingspan of a duck, as we cannot be certain that the same relationship will continue to be true at higher weights. Note: The regression coefficient (0.176) can be interpreted here as follows: as the weight increases by 1 g, the wingspan increases by 0.176 cm, on average.

More Related