image
Physics Forums Logo
image
image
* Register * Upgrade Blogs Library Staff Rules Mark Forums Read
image
image   image
image

Go Back   Physics Forums > Other Sciences > Computing & Technology


Reply

image Line of Best fit in EXCEL ? Share It Thread Tools Search this Thread image
Old Sep25-04, 05:42 PM                  #1
JamesJames

JamesJames is Offline:
Posts: 206
Line of Best fit in EXCEL ?

I have plotted a few points (8 infact ) in Excel and would like to acquire the equation for the line of best fit. How do I do this using the computer or do I have to do it by hand?
  Reply With Quote
Old Sep25-04, 06:05 PM                  #2
Dr Transport

Dr Transport is Offline:
Posts: 1,245
Recognitions:
PF Contributor PF Contributor
Science Advisor Science Advisor
You can either do a "least squares" fit to what ever order of polynomial you want to use. In Excel, plot the data points, then you can fit the data points to any order of polynomial up to 6th order, exponential curve and a few more I ccannot remember. The correleation coefficient is diplayed on the polt, so you can determine the best equation from that.
  Reply With Quote
Old Sep25-04, 07:01 PM                  #3
russ_watters

PF Mentor

russ_watters is Offline:
Posts: 15,188
Adding a trend line is easy through the chart properties, but fitting an equation is a little tougher (unless you do it manually by looking at the fitted trend-line). IIRC, it requries an add-in that is not installed automatically. In the tools menu, click "add-ins" and I think the "Solver add-in" is the one you need.
  Reply With Quote
Old Sep25-04, 07:05 PM                  #4
robphy
 
robphy's Avatar

robphy is Offline:
Posts: 3,690
Blog Entries: 47
Recognitions:
PF Contributor PF Contributor
Homework Helper Homework Helper
Science Advisor Science Advisor
In Excel, when viewing an XY-scatter chart look for the "Chart" menu and select "Add Trendline". To get the equation of the line, you have check the box in the Options tab of "Add Trendline".
  Reply With Quote
Old Sep25-04, 07:23 PM                  #5
Integral

PF Mentor
 
Integral's Avatar

Integral is Offline:
Posts: 5,806
Blog Entries: 9
The excel command you are looking for is

LINEST(yrange,xrange, b, stats)

for the x and y ranges enter the row column information for your data for example if your data is in the first 8 cells of the first 2 columns you would enter a1:a8 for the xrange and b1:b8 for the y range. The b and stats parameters are logical (b=true if you want Excel to compute the y intercept, b=false of you want it to be 0) The last gives more stats if you set it to true.

You need to select a 3x2 block of cells type = in the command line, enter the formula then type ctrl+Shift+enter to enter the Array formula.

You would do well to get into the Excel help system and research array formulas and the Linest command.
  Reply With Quote
image image
Reply
Thread Tools


Similar Threads for: Line of Best fit in EXCEL ?
Thread Thread Starter Forum Replies Last Post
Excel Malinko9 Computers 6 Nov24-09 03:07 PM
equation of line parallel to plane and intersaction with other line Theofilius Precalculus Mathematics 5 May19-08 03:04 AM
Software to make line graph, Like Excel? tonyjeffs General Math 3 Sep24-07 03:57 PM
74154 4 line to 16 line decoder ravenprp Electrical Engineering 1 Oct23-06 04:54 PM
excel? pivoxa15 Computing & Technology 3 Apr23-06 04:37 AM

Powered by vBulletin Copyright ©2000 - 2010, Jelsoft Enterprises Ltd. © 2009 Physics Forums
Sciam | physorgPhysorg.com Science News Partner
image
image   image