 Theory and equation derivation  Least Squares method of best fit
 http://mathforum.org/library/drmath/view/72047.html
Less Than Dot is a community of passionate IT professionals and enthusiasts dedicated to sharing technical knowledge, experience, and assistance. Inside you will find reference materials, interesting technical discussions, and expert tips and commentary.
Forum Search
Forum Statistics
UsersTotal Post History
 Posts:
 81456
 Topics:
 18718
7Day Post History
 New Posts:
 0
 New Topics:
 0
 Active Topics:
 0
Our newest member
Other

FAQ
All times are UTC [ DST ]
quadratic puzzle
Forum rules
Always post answers in a "Hidecode" tag, so that others have a chance to answer the question too.
Always post answers in a "Hidecode" tag, so that others have a chance to answer the question too.
12 posts • Page 1 of 1
Please wait...
quadratic puzzle
"everyone" knows how to get the line of best fit. you challenge is: given a set of data, find the quadratic equation of best fit
*hint* a bit of calculus can go a long way.
I'll post my solution next week if no one gets it.
*hint* a bit of calculus can go a long way.
I'll post my solution next week if no one gets it.

phillip1882  Apprentice
 Posts: 19
 Joined: Mon Mar 14, 2011 11:05 pm
 Location: florida
Re: quadratic puzzle
In other words, for any set of (x, y) points we must find 2nd degree polynomial (a*x^2+b*x+c) that gives the smallest error?
How many SEO experts do you need to change a lightbulb lightbulbs buy light bulbs neon lights sex p0rn

vongrunt  Senior Apprentice
 Posts: 151
 Joined: Thu Mar 27, 2008 3:21 pm
 Location: Space sector 2814
Re: quadratic puzzle
exactly

phillip1882  Apprentice
 Posts: 19
 Joined: Mon Mar 14, 2011 11:05 pm
 Location: florida
Re: quadratic puzzle
vongrunt wrote:In other words, for any set of (x, y) points we must find 2nd degree polynomial (a*x^2+b*x+c) that gives the smallest error?
pass!
Ask three DBAs a question, and you’ll get four different answers.
Brent Ozar

Thirster42  Guru

 Posts: 4646
 Joined: Tue Nov 11, 2008 5:49 pm
 Location: Jefferson City, Mo
Re: quadratic puzzle
I'm very interested but don't have time and don't really remember enough calculus. I know how to integrate... but exactly how doing that is going to help with, say, 50 random points, I don't know.
God cries a little bit every time someone builds a database.

Emtucifor  Guru

 Posts: 2835
 Joined: Fri May 30, 2008 9:30 pm
 Location: Bellingham, WA
Re: quadratic puzzle
i think this one might be a little over our heads
the highest math i took was trig, and i didn't pay a whole lot of attention (senioritus)
the highest math i took was trig, and i didn't pay a whole lot of attention (senioritus)
Ask three DBAs a question, and you’ll get four different answers.
Brent Ozar

Thirster42  Guru

 Posts: 4646
 Joined: Tue Nov 11, 2008 5:49 pm
 Location: Jefferson City, Mo
Re: quadratic puzzle
I took calculus BC and got a 5 on the calculus AP exam. I love math. With a few refreshers, I'd be back in the game.
God cries a little bit every time someone builds a database.

Emtucifor  Guru

 Posts: 2835
 Joined: Fri May 30, 2008 9:30 pm
 Location: Bellingham, WA
Re: quadratic puzzle
Emtucifor wrote:I took calculus BC and got a 5 on the calculus AP exam.
I did the same, then pursued a mathematics degree in college. But 30+ years later, I'm certain I couldn't derive the equations to do solve this now.
Good thing others have done this for me already:
Code is hidden, SHOW
And others have previously programmed this as well:
Code is hidden, SHOW
I'm curious to see if Phillip gives us similar solutions or if he has another method in mind. In the meantime, thanks for taking me back to my mathematic roots  pun intended  for an afternoon, Phillip!
"The trouble with quotes on the Internet is that it's Abraham Lincoln
difficult to determine whether or not they are genuine."

MHGlassman  Senior Apprentice
 Posts: 72
 Joined: Tue Jun 17, 2008 7:58 pm
 Location: Englewood, CO, USA
Re: quadratic puzzle
MHGlassman wrote:Emtucifor wrote:I took calculus BC and got a 5 on the calculus AP exam.
I did the same, then pursued a mathematics degree in college. But 30+ years later, I'm certain I couldn't derive the equations to do solve this now.
I cannot do it now either. Thus the need for refresher courses! Though for me it's been 21 years.
God cries a little bit every time someone builds a database.

Emtucifor  Guru

 Posts: 2835
 Joined: Fri May 30, 2008 9:30 pm
 Location: Bellingham, WA
Re: quadratic puzzle
Thirster42 wrote:i think this one might be a little over our heads
the highest math i took was trig, and i didn't pay a whole lot of attention (senioritus)
No not over our heads just yours . I have one tucked away somewhere just need to get it out, wich isn't going to happen any time soon I'm afraid. It's also better known as curve fitting. Some sample data would be nice so people can compare their solutions eassier.
pink fuzzy slippers

chrissie1  Senior Guru

 Posts: 9475
 Joined: Wed Oct 10, 2007 7:18 pm
 Location: Belgium
Re: quadratic puzzle
OK. Extra milk and cookies for anyone who writes generalized algorithm (curve fitting with nth degree polynomial)
How many SEO experts do you need to change a lightbulb lightbulbs buy light bulbs neon lights sex p0rn

vongrunt  Senior Apprentice
 Posts: 151
 Joined: Thu Mar 27, 2008 3:21 pm
 Location: Space sector 2814
Re: quadratic puzzle
 TinnedTuna
 Newbie
 Posts: 1
 Joined: Wed Aug 22, 2012 11:19 am
12 posts • Page 1 of 1
LTD Social Sitings
Note: Watch for social icons on posts by your favorite authors to follow their postings on these and other social sites.