Simple Linear Regression |
How To... > Work with Statistical Objects > Build a Linear Model > Simple Linear Regression Suppose you have data for two attributes and you wish to predict one from the other. For example, you might have a sample of airplane types and data about the cost per hour to run them and their range in miles. Can you predict cost per hour from the range?
The result for the airplanes example is shown at right. The blue values are editable either by typing in a new value or by providing a formula. A formula tied to a slider is especially useful. See Use Sliders to Vary Summary Information in a Statistical Object. The last paragraph of the model allows you to type in your own value for the predictor to get an estimate for the response. The confidence level for this estimate is the same as is given for the slope. You can make a plot of residuals by making a scatter plot of the two attributes. See Make a Residual Plot. You can also make attributes for predicted values and residuals in the collection using the linRegrPredicted and linRegrResiduals functions. (see the Reference section on Statistical Functions for Two Attributes.) |