- Asked 2/13
- 2070 Magh · 8 marks
Fit y = ln(ax + b)
Short answer
Linearize by taking exponentials: Y=e^y = ax+b. Fit with least squares normal equations to get a=1.7665, b=1.5172. The fitted curve is y = ln(1.7665x + 1.5172).
Fit the following data to the curve y = log_e(ax + b).
| x | 0 | 1 | 2 | 3 | 4 | 5 | 6 |
|---|---|---|---|---|---|---|---|
| y | 0.9 | 1.0 | 1.5 | 1.9 | 2.1 | 2.4 | 2.5 |
Take the exponential of both sides: y = ln(ax + b) → eʸ = ax + b. Put Y = eʸ, so Y = b + ax is a straight line in x.
| x | y | Y = eʸ | x² | xY |
|---|---|---|---|---|
| 0 | 0.9 | 2.4596 | 0 | 0.0000 |
| 1 | 1 | 2.7183 | 1 | 2.7183 |
| 2 | 1.5 | 4.4817 | 4 | 8.9634 |
| 3 | 1.9 | 6.6859 | 9 | 20.0577 |
| 4 | 2.1 | 8.1662 | 16 | 32.6647 |
| 5 | 2.4 | 11.0232 | 25 | 55.1159 |
| 6 | 2.5 | 12.1825 | 36 | 73.0950 |
| Σ | 47.7173 | 91 | 192.6149 |
Normal equations (intercept b, slope a)
ΣY = n·b + a·Σx → 47.7173 = 7b + 21.0000a
ΣxY = b·Σx + a·Σx² → 192.6149 = 21.0000b + 91.0000a
Solving: a = (nΣxY − ΣxΣY)/(nΣx² − (Σx)²) = 1.7665, b = (ΣY − aΣx)/n = 1.5172.
Answer: y = ln(1.7665x + 1.5172) (check: x = 6 gives 2.495 against 2.5; x = 0 gives 0.417 against 0.9).
This fits the straight line to eʸ rather than minimising the error in y itself, which is the usual exam method.
✓ Answer checked by Claude Opus 5.5 (high effort)
Related questions
- Fit curve y = a x^b (A) · Numerical Method, chapter 4 · asked 2×
- Fit y = ax/(b + x) · Numerical Method, chapter 4 · asked 2×
- Fit curve y = a b^x (decay data) · Numerical Method, chapter 4 · asked 3×
- Fit y = a b^x (growth data) · Numerical Method, chapter 4
- Least squares: y = ax + b + c/x · Numerical Method, chapter 4
- Fit y = a b^x and find y(7) · Numerical Method, chapter 4 · asked 2×
- Quadratic least squares fit · Numerical Method, chapter 4
- Least squares fit for calibration data · Metrology, chapter 2
- Demagnetizing via B-H curve; data storage material · Electrical Engineering Material, chapter 4
- Presentation of precipitation data, IDF curve · Engineering Hydrology, chapter 2
- DAD curve procedure and isohyetal area data · Engineering Hydrology, chapter 2