Working out the equation for coordinates on a graph

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
7 replies · 2K views
Saints-94
Messages
63
Reaction score
1
I have a series of data points for X and Y points on a graph. The data is quite random and I am trying to work out a trend line so I can then form an equation for the line. How would I go about working out the equation for the data below.
(0, 580)
(6.7, 495)
(13.4, 445)
(18.7, 365)
(22.8, 350)
(27, 340)
upload_2017-3-6_20-7-31.png
 
Physics news on Phys.org
Unless there is an underlying model that would suggest otherwise, I would consider that to be a straight line and do a linear least-square fit.
 
  • Like
Likes   Reactions: jedishrfu
I'm not sure how I can apply that to the data that I have. Where would I start with working out an equation?
 
You need to first calculate the averages, ##\bar{x}## and ##\bar{y}##. Then use eqs. (16) and (20) in the link I gave you to get ##\mathrm{ss}_{xx}## and ##\mathrm{ss}_{xy}##. You then get the slope from eq. (27) and the intercept from eq. (28).
 
I was expecting to get a trend line that looked like an exponential curve. Is it possible to work out an equation that would give me an exponential curve?
 
Saints-94 said:
I was expecting to get a trend line that looked like an exponential curve. Is it possible to work out an equation that would give me an exponential curve?
The problem with the non-linear case is that you can't get a direct answer. It becomes a multidimensional minimization problem.

The best is to use existing software to do this. Most graphing programs can do this, as well as other software such as Matlab.
 
Ok, thanks. I have the Matlab software, but am unsure how to programme my data.