Fitting Curves

Before you read this section take a look at the section on linear regression. You may ask why? Simple, in this section we are going to repeat the linear regression work and try three other curve fits to some data (the Lusitania's design data). Specifically, we will do the following curve fits:

  1. Linear equation, y = mx + b
  2. Exponential equation, y = abx
  3. Power equation, y = axp

As was noted earlier the Lusitania was an historic ship. When the Lusitania was being built it was decided to use turbine engines to power the vessel. At the time this was a major change and promised great advantages in terms of speed and efficiency. The estimates of the cost to build the vessel as a function of the vessel's top speed (in knots) is shown in the figure below.

Speed (knots)Cost (pounds sterling)
20350,000
21400,000
22470,000
23575,000
24850,000
251,000,000
261,250,000


Enter the speed data and the cost data into a calculator or Excel or some other computer program that is regression capable. For a TI-83 calculator you could enter the speed data into List 1 of (Hit STAT key, now hit enter when EDIT is dark) and the cost data into List 2. Now, use that data to calculate the regression equation (STAT, CALC, LinReg). The result should be on the order of y = 152,857 x - 2,816,428 with a correlation coefficient (r) of 0.9695. The r value indicates a good fit but a visual inspection of the curve and data should lead you to question any estimates made using this equation and speed values beyond 26 knots. It is clear that the data is starting to go up more rapidly than a linear curve would predict..

For the second regreression we want to try we will transform the data to the form y=abx which we know to be an exponential relationship. If we take the natural log (ln) of both sides of the equation we get ln(y)= ln(a) + ln(b) * x. Using transformed data in a linear regression you get ln(y)=0.0968x+3.5731 with a correlation coefficient, r, of 0.9907.

The last regression we want to try is the natural log (ln) version of a power function y = axp. Taking ln's of both sides of the equation yields ln(y)=ln(a)+pln(x). For this calculation we will need to take the ln of the original y data and the original x data. The transformed data will yield a result of ln(y)=2.2077 ln(x) - 1.1132 with a correlation coefficient of 0.9870.

Of the regressions that we have used the second regression gives the highest value of r 0.9907. The other two give high values but do not fit the data quite as well. In fact the linear regression is likely to predict values that are significantly in error for values of speed beyond 26 knots. In this cae we would probably use the y=abx varsion of the equation to estimate the cost of achieving a particular speed.