Regression for the Leaning Tower of Pisa
- Camille Fairbourn
- Linear Regression
The Leaning Tower of Pisa is an architectural wonder. Engineers concerned about the tower’s stability have done extensive studies of its increasing tilt. Measurements of the lean of the tower over time provide much useful information. The following table gives measurements for the years 1975 to 1987. The variable “lean” represents the difference between where a point on the tower would be if the tower were straight and where it actually is. The data are coded as tenths of a millimeter in excess of 2.9 meters, so that the 1975 lean, which was 2.9642 meters, appears in the table as 642. Only the last two digits of the year were entered into the computer. obs year lean 1 75 642 2 76 644 3 77 656 4 78 667 5 79 673 6 80 688 7 81 696 8 82 698 9 83 713 10 84 717 11 85 725 12 86 742 13 87 757
5. Open GeoGebra. Turn on the spreadsheet view and enter the data for year in column A and lean in column B. 6. Choose Linear from the Regression model drop down menu. a. Record the equation of the regression line. b. Use the button that says to interchange the X and Y variables. Record the equation of the regression line. c. Are the functions from part a and part b inverse functions? d. Does the choice of X and Y matter when doing linear regression? 7. Highlight the data in columns A and B. Choose Two Variable Regression Analysis from the second button on the menu. From the regression model dropdown menu, choose different functions for the regression. Which one seems to visually fit the data best? 8. Turn on the residual plot graph from the options at the bottom on the Regression Analysis window. Again choose different functions for the regression. With the additional information from the regression plot, determine which function seems to fit the data best. 9. Highlight the data again. Choose Create List of Points from the third main menu button. Call it list1. 10. In the Input bar type FitLine[list1]. This will create the regression line using the list of points and call it f(x). In cell C1 in the spreadsheet, type f(a1). Copy that cell to the 12 cells below it by dragging the box in the lower right corner. This will give us the predicted value of xi using the regression line. 11. In the Input bar type FitPoly[list1,2]. This will create the regression polynomial of degree 2 and call it g(x). In cell D1 in the spreadsheet, type g(a1). Copy that cell to the 12 cells below it by dragging the box in the lower right corner. This will give us the predicted value of xi using the regression quadratic. Adjust the viewing window in the graphics screen so you can see the functions and the points. 12. Calculate the squared residuals for each point and each function. a. In cell E1 type (b1-c1)^2. Copy this down the column for all 12 data points. b. Highlight cells E1 through E13 and press the fourth top menu button to get the sum. It should display in cell E14. This is the sum of squared residuals for the line. c. In cell F1 type (b1-d1)^2. Copy this down the column for all 12 data points. d. Highlight cells E1 through E13 and press the fourth top menu button to get the sum. It should display in cell E14. This is the sum of squared residuals for the quadratic. e. Using the method of squared residuals, which regression function best fits the data?