keisoku

Weighted Logarithmic Regression Calculator

Fit a logarithmic model y = a + b ln(x) to frequency-weighted data points using weighted least squares. Get the coefficients a and b, the coefficient of determination R squared, the correlation, and the total weight, plus a scatter plot with the fitted curve.

Input

Enter (x, y, weight) data points with a frequency for each, and the tool fits the logarithmic model y = a + b ln(x) by weighted least squares.

One point per line. Separate x, y, and weight with a comma or space. Omit the weight to treat it as 1. x and weight must be positive.

Result

Weighted logarithmic regression equation

y = 2.112116 + 1.76666 ln(x)

Intercept a

2.112116

Coefficient b

1.76666

R squared

0.998

Correlation r

0.999

Total weight

20

Data points

5


Scatter plot and fitted curve

x minx max

Data points and predictions

xyWeightPredicted y
1232.112
23.453.337
44.644.561
85.865.786
166.927.01

How it works

  • Each data point carries a frequency (weight), and the model y = a + b ln(x) is fitted with weighted least squares.
  • Substituting u = ln(x) turns the model into a weighted straight-line fit y = a + b u, solved through the weighted normal equations for a and b.
  • Because ln(x) is taken, x values must be positive, and the weights must be positive as well.
  • R squared is computed from the weighted residual sum of squares relative to the weighted mean; values closer to 1 indicate a better fit.
  • Enter one point per line as x, y, and weight separated by commas or spaces. Omit the weight to treat it as 1.

Reviews

Tell us what you think of this calculator.

Write a review

  1. Home
  2. Weighted Logarithmic Regression Calculator