Linear Regression


    The Linear Regression program fits the linear equation y = mx + b, where m is the slope and b is the intercept, to a set of N data points (x1, y1; x2 , y2 ; … ; xN , yN). The program utilizes the method of least squares to calculate values for m and b and for the standard deviations of m and b. You can fit the data points (x and y), the logarithm of the data points (ln(x) and ln(y)), or the reciprocal of the data points (1/x and 1/y) with a linear equation. Select x, ln(x), log(x), or 1/x and y, ln(y), log(y), or 1/y in the DATA TABLE. Next, enter the number of data points (N). The maximum value for N is nine. Highlight the default values of zero and enter the x and y coordinates for each data point. Replace the default values for the lower and upper limits of the x-axis (-100, 100) with appropriate values. Be sure that all of the values for the x-coordinates( x1, x2 , , xN) fall within these limits. Change the default values for the lower and upper limits of the y-axis (-100, 100) to appropriate values. Be sure that all of the values for the y-coordinates( y1, y2 , , yN) are within the chosen limits. Include a title for the plot and label the x and y axes. Click the "Enter" button to obtain a plot of the data points. If you wish to alter the plot title, correct the data, or add new data, return to the DATA TABLE, make the necessary changes, and again click the "Enter" button to update the plot.

    Click the "Linear Regression" button in the upper right-hand corner of the plot window to fit the data with the linear equation. The values for the slope, the standard deviation of the slope, the intercept, the standard deviation of intercept, and the correlation coefficient are displayed on the plot. The correlation coefficient is a measure of how closely the linear equation fits the data. Generally, the fit improves as the magnitude of the correlation coefficient approaches 1.000. To obtain a hard copy of the plot, press the "Print Screen" key on your keyboard (upper right). Open your favorite word processing program - WordPerfect, Word, WordPad - and "Paste" the plot to the blank page. Finally, print the page with the plot. A hard copy of the DATA TABLE may be acquired in a similar manner. See the Tutorial for Linear Regression for an example and help.

Nutt 00




Dr. Nutt's CHE 115 Course