Linear Regression Tutorial

Tutorial for Linear Regression

EXAMPLE: Calculate the enthalpy of vaporization, DHvap, for diethyl ether, C4H10O, from the experimental vapor pressures and temperatures listed below.

C4H10O (l)     —›     C4H10O (g)        DHvap = ?


Temperature ( oC) Pvap (torr)
10 292
15 361
20 442
25 537
30 647

PROCEDURE: The pressure exerted by the diethyl ether vapor that is in equilibrium with the diethyl ether liquid is called the vapor pressure, Pvap, of the liquid. The logarithm of the vapor pressure varies linearly with the reciprocal of the abolute temperature (eq 1).

Eq 1 is a linear equation (eq 2) with y = ln( Pvap ) and x = 1/T.


A plot of the logarithms of the experimental vapor pressures versus the reciprocals of the absolute temperatures will be a straight line with a slope of - DHvap /R. The value for DHvap is then equal to the slope of the plot times -R (eq 3).


  1. Calculate the absolute temperatures.

    Temperature ( oC) T (K) Pvap (torr)
    10 283 292
    15 288 361
    20 293 442
    25 298 537
    30 303 647


  2. To Plot 1/x versus ln(y), select 1/x from the drop-down menu on the left and ln(y) from the drop-down menu on the right in the DATA TABLE.



  3. Enter 5 for the number of data points.



  4. Enter the x value (283 K) and the y value (292 torr) for the first data point. 1/x = 1/T and ln(y) = ln(Pvap ).



  5. Enter the x and y values for the remaining data points.



  6. Enter the lower (263) and upper (303) limits of the x axis.



  7. Enter the lower (148) and upper (1636) limits of the y axis.



  8. Add the title "Plot of ln(Vapor Pressure for Diethyl Ether) vs 1/T".



  9. Label the x and y axes.



  10. Click the " Enter" button to display the plot.



  11. Click the button in the upper right-hand corner of the window, that contains the plot, to maximize the window size and move the scroll bar on the right side of the window to center the plot in the window.



  12. Click the " Linear Regression" button above the plot to fit a linear equation to the data. The values for the slope, the standard deviation of the slope, the intercept, the standard deviation of the intercept, and the correlation coefficient are displayed on the plot.



  13. To obtain a hard copy of the plot, press the "Print Screen" key on the keyboard. Next, click the "Start" button in the lower left corner of the screen and then select "Programs," "Accessories," and "WordPad."



  14. Click the "Edit" button in the tool bar at the top of the WordPad window.



  15. Select "Paste" from the pull-down menu to paste the plot on the WordPad page.



  16. Click the "File" button in the tool bar and select "Page Setup" from the pull-down menu. Click the "Landscape" Radio button in the Orientation section of the Page Setup on.



  17. Again click the "File" button in the tool bar and select "Print" from the pull-down menu to print a copy of the page with the plot.





RESULTS: