keisoku

Weighted ab Exponential Regression

Fit the exponential model y = a times b to the power x to frequency weighted data points. Weighted least squares on log transformed values gives the coefficient a, base b and coefficient of determination, with a scatter plot sized by frequency.

Input

Enter x, y and frequency (weight) per line, separated by commas or spaces. A missing frequency is treated as 1. Only positive y values are supported.

For example, enter one point per line like 0, 2.1, 3.

Result

Regression equation

y = 2.089578 × 1.444733 ^ x

Coefficient a

2.089578

Base b

1.444733

R squared

1

Total frequency

15

Number of points

5


Scatter plot and fitted curve

1.528-0.323.5630.845.59727.6313.169.6654.32x = 0, y = 2.1, frequency = 3x = 1, y = 3, frequency = 5x = 2, y = 4.4, frequency = 2x = 3, y = 6.3, frequency = 4x = 4, y = 9.1, frequency = 1

Data and fitted values

No.xyFrequencyFitted
102.132.09
21353.019
324.424.361
436.346.301
549.119.104

How it works

  • Fits the exponential model y = a times b to the power x, where a is the value at x equal to 0 and b is the multiplier for each unit increase in x, to frequency weighted data points.
  • Taking the natural log of both sides linearizes the model to ln y = ln a + (ln b) x, then weighted least squares is solved in log space. The frequency w is treated as the weight of a point observed w times.
  • The base b is obtained as exp of the log space slope, and a as exp of the log space intercept.
  • R squared is computed from the residual variation relative to the total variation in log space.
  • Only positive y values are supported because the log is taken. Enter positive numbers for frequencies.

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. Weighted ab Exponential Regression