Finding the Curve with Least Squares Approximation: 15 hrs

twoski
Messages
177
Reaction score
2

Homework Statement



Given this data:

hours / value
-----------
2 | 1.6
4 | 1.5
6 | 1.45
8 | 1.42
10 | 1.38
12 | 1.36

fit a curve of the form Y ≈ ae^{-bx}

What value can you predict after 15 hours?

The Attempt at a Solution



So i can rewrite the equation as Y ≈ log(a)-bx by taking the logarithm of the original equation.

How do i go about doing a least squares approximation of this? Our lecture notes have no examples that actually show how we are supposed to compute these coefficients.
 
Physics news on Phys.org
Your equation rewrite is wrong:

If y = a e^(-bx) then you must take logarithms of BOTH sides to obtain:

LN(y) = LN(a) - b*x

You can use least squares for linear equations to fit the data.
 
Are there any suggested readings for actually figuring out how to compute a least squares approximation? I've read a handful of different notes and I'm still stumped. It would be nice if there was just a nice step by step methodology to this.
 
twoski said:
Are there any suggested readings for actually figuring out how to compute a least squares approximation? I've read a handful of different notes and I'm still stumped. It would be nice if there was just a nice step by step methodology to this.

Google is your friend. There are hundreds of explanatory articles, ranging from very elementary to very advanced.
 
There are two things I don't understand about this problem. First, when finding the nth root of a number, there should in theory be n solutions. However, the formula produces n+1 roots. Here is how. The first root is simply ##\left(r\right)^{\left(\frac{1}{n}\right)}##. Then you multiply this first root by n additional expressions given by the formula, as you go through k=0,1,...n-1. So you end up with n+1 roots, which cannot be correct. Let me illustrate what I mean. For this...
Back
Top