Stat 305: Regression Handout: Example 1: Stress / Till-till-fracture data. In the following data, x= uniaxial stress applied (kg/mm2) and y = time till fracture (hours) x y 2.5 63 5 58 10 55 15 61 17.5 62 20 37 25 38 30 45 35 46 40 19 We will fit a linear and quadratic model on this data using least square methods. JMP Handout: x 2.5 5 10 15 17.5 20 25 30 35 40 y 63 58 55 61 62 37 38 45 46 19 Predicted y 64.165486726 61.913274336 57.408849558 52.904424779 50.652212389 48.4 43.895575221 39.391150442 34.886725664 30.382300885 Residual y -1.165486726 -3.913274336 -2.408849558 8.0955752212 11.347787611 -11.4 -5.895575221 5.6088495575 11.113274336 -11.38230088 Response y Whole Model Regression Plot 60 y 50 40 30 20 0 5 10 15 20 25 30 35 40 45 x Summary of Fit RSquare RSquare Adj Root Mean Square Error Mean of Response Observations (or Sum Wgts) Analysis of Variance Source DF Model Error C. Total 1 8 9 0.632518 0.586583 9.124307 48.4 10 Sum of Squares 1146.3761 666.0239 1812.4000 Mean Square F Ratio 1146.38 83.25 13.7698 Prob > F 0.0059* Parameter Estimates Term Estimate Std Error t Ratio Prob>|t| Intercept 66.417699 5.648129 11.76 <.0001* x -0.900885 0.242776 -3.71 0.0059* Residual by Predicted Plot 10 y Residual 5 0 -5 -10 20 30 40 50 60 y Predicted Prediction Expression Y= 66.4176991150442 + -0.9008849557522 *x Quadratic Model with x and x^2: Response y Whole Model Actual by Predicted Plot 60 y Actual 50 40 30 20 20 30 40 50 60 y Predicted P=0.0233 RSq=0.66 RMSE=9.4035 Summary of Fit RSquare RSquare Adj Root Mean Square Error Mean of Response Observations (or Sum Wgts) Analysis of Variance Source DF Model Error C. Total 2 7 9 0.658473 0.560894 9.403518 48.4 10 Sum of Squares 1193.4169 618.9831 1812.4000 Parameter Estimates Term Estimate Intercept 61.52298 x -0.208514 xsq -0.016541 Std Error 8.883684 0.981695 0.022678 Mean Square F Ratio 596.708 88.426 6.7481 Prob > F 0.0233* t Ratio 6.93 -0.21 -0.73 Prob>|t| 0.0002* 0.8378 0.4895 Residual by Predicted Plot 15 10 y Residual 5 0 -5 -10 -15 20 30 40 50 60 y Predicted Prediction Expression: Y= 61.5229796176377 + -0.2085138825891 *x + -0.0165407888515 * xsq Example 2: Data collected on a hardness study of a particular alloy. The variables are: x1= % of copper in alloy, x2 = tempering temperature and y = hardness x1 x2 y 0.02 1000 78.9 1100 65.1 1200 55.2 1300 56.4 0.1 1000 80.9 1100 69.7 1200 57.4 1300 55.4 0.18 1000 85.3 1100 71.8 1200 60.7 1300 58.9 We will fit a linear model and some variations on this data using least square methods. Model with x1 and x2: Response y Whole Model Actual by Predicted Plot 90 85 y Actual 80 75 70 65 60 55 50 55 60 65 70 75 80 85 90 y Predicted P<.0001 RSq=0.90 RMSE=3.7909 Summary of Fit RSquare RSquare Adj Root Mean Square Error Mean of Response Observations (or Sum Wgts) Analysis of Variance Source DF Model Error C. Total 2 9 11 0.899073 0.876645 3.790931 66.30833 12 Sum of Squares 1152.1888 129.3404 1281.5292 Parameter Estimates Term Estimate Intercept 161.33646 x1 32.96875 x2 -0.0855 Std Error 11.43285 16.75371 0.009788 Mean Square F Ratio 576.094 14.371 40.0868 Prob > F <.0001* t Ratio 14.11 1.97 -8.74 Prob>|t| <.0001* 0.0806 <.0001* Prediction Expression Y= 161.336458333333 + 32.96875 + -0.0855 * x1 * x2 Distributions Residual y 6 -1.28 -0.67 0.0 0.67 1.28 4 2 0 -2 -4 -6 0.1 0.2 0.3 0.4 0.5 Normal Quantile Plot Bivariate Fit of Residual y By x1 6 4 Residual y 2 0 -2 -4 -6 0 0.05 0.1 x1 0.15 0.2 0.7 0.8 0.9 Bivariate Fit of Residual y By x2 6 4 Residual y 2 0 -2 -4 -6 950 1000 1050 1150 1100 1200 1250 1300 x2 Bivariate Fit of Residual y By Predicted y 6 4 Residual y 2 0 -2 -4 -6 50 55 60 65 Predicted y 70 75 80 85 Output with x1, x2 and x2^2 in the model. Response y Whole Model Actual by Predicted Plot 90 85 y Actual 80 75 70 65 60 55 50 55 60 65 70 75 80 85 90 y Predicted P<.0001 RSq=0.98 RMSE=1.656 Summary of Fit RSquare RSquare Adj Root Mean Square Error Mean of Response Observations (or Sum Wgts) Analysis of Variance Source DF Model Error C. Total 3 8 11 0.98288 0.97646 1.656034 66.30833 12 Sum of Squares 1259.5896 21.9396 1281.5292 Parameter Estimates Term Estimate Intercept 553.24479 x1 32.96875 x2 -0.773583 x2-sq 0.0002992 Std Error 62.82414 7.318705 0.110036 4.781e-5 Mean Square F Ratio 419.863 2.742 153.0980 Prob > F <.0001* t Ratio 8.81 4.50 -7.03 6.26 Prob>|t| <.0001* 0.0020* 0.0001* 0.0002* Residual by Predicted Plot 3 y Residual 2 1 0 -1 -2 50 55 60 65 75 70 80 85 90 y Predicted Prediction Expression 553.244791666667 + 32.96875 * x1 + -0.7735833333333 * x2 + 0.00029916666667 * x2-sq Residuals: 3 Residual y 2 2 1 0 -1 -2 0 0.05 0.1 x1 Linear Fit 0.15 0.2 3 Residual y2 2 1 0 -1 -2 950 1000 1050 1100 1150 x2 Linear Fit 1200 1250 1300