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
Data points and predictions
| x | y | Weight | Predicted y |
|---|---|---|---|
| 1 | 2 | 3 | 2.112 |
| 2 | 3.4 | 5 | 3.337 |
| 4 | 4.6 | 4 | 4.561 |
| 8 | 5.8 | 6 | 5.786 |
| 16 | 6.9 | 2 | 7.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
- Home
Weighted Logarithmic Regression Calculator