• Support PF! Buy your school textbooks, materials and every day products Here!

Least Squares

  • Thread starter twoski
  • Start date
  • #1
181
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 ≈ [itex]ae^{-bx}[/itex]

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.
 

Answers and Replies

  • #2
SteamKing
Staff Emeritus
Science Advisor
Homework Helper
12,796
1,667
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.
 
  • #3
181
2
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.
 
  • #4
Ray Vickson
Science Advisor
Homework Helper
Dearly Missed
10,706
1,728
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.
 

Related Threads on Least Squares

  • Last Post
Replies
8
Views
2K
  • Last Post
Replies
1
Views
2K
  • Last Post
Replies
7
Views
719
  • Last Post
Replies
3
Views
5K
  • Last Post
Replies
1
Views
784
  • Last Post
Replies
4
Views
893
  • Last Post
Replies
10
Views
737
  • Last Post
Replies
0
Views
2K
  • Last Post
Replies
1
Views
1K
  • Last Post
Replies
6
Views
2K
Top