Register to reply 
Find a curve that fits this data please 
Share this thread: 
#1
Apr2614, 09:30 AM

P: 17

I'm doing research and I have some data (attached  'y' = first column, 'x' = second column in CSV format) that I need to find a general curve fit for (function = f(x)/x). This will help me do future predictions.
Here are my stipulations: The fit curve must have the format of f(x)/x. Two examples I've tried are sqrt(x)/x and log(x)/x > and of course they have more general forms such as [(b*x+a)^n]/x and {[log(x+a)]^n}/x. However, these functions do not "bend" in the way that fits the data best so there must be better (see "sqrt.jpg"). The function f(x) MUST behave well at zero and be positive for 'x' > 0. E.g., for the log function this can be done by shifting the x data by '1'. The sqrt function is naturally well behaved with no modifications obviously. The curve needs to fit the general shape but use as FEW of parameters as possible. E.g., the sqrt function (x^n) is attractive because it only uses 1 parameter, "n", but just not quite right. Thanks! 


#2
Apr2614, 10:45 AM

Mentor
P: 11,890

If you want an x in the denominator, it is easier to look at y*x as function of x. There, a linear fit is actually reasonable, especially if we can ignore the first datapoint (at x=9.5) as outlier.
It is easy to adjust that shape to fit better to the lower values, for example with f(x)=0.255 x + 19  19 e^(0.1x). I did not optimize it yet (and I'm not used to measured values without known uncertainties), that's just by eye. But that arbitrary exponential there looks like overfitting, at least without a physical model behind it. Here are y*x and y as a function of x, with f(x) plotted on top: 


#3
Apr2614, 11:02 AM

P: 17

Very impressive! You must do this often to be able to "eye" a fit?! Can you explain a little more (maybe in a different way) on what you've done here? I don't quite understand "y*x as function of x".
This is a model to describe relative changes in bulk density of a material, so no physical model is really possible. The variability in the data is due to measurement error and other factors but very difficult to isolate. Also  The curve would need to bend up a little more in the beginning. After you've linearized the data in the top graph, the group at the beginning is slightly bias. Thanks!!! 


#4
Apr2614, 11:11 AM

Mentor
P: 11,890

Find a curve that fits this data please



#5
Apr2614, 11:17 AM

P: 17

For the low values of 'x', the fit curve you've given APPEARS to generally be "under" the data points. Is there a way to manipulate the curve to better fit the data points for low low values of 'x'?



#6
Apr2614, 11:18 AM

Mentor
P: 11,890

Sure, just play around with the 4 free parameters.



#7
Apr2614, 11:27 AM

P: 17

Cool. Well done, and thank you.



Register to reply 
Related Discussions  
How to correctly read in visibility data from a FITS file using IDL  Astronomy & Astrophysics  0  
Comparing Bestfits of different data sets that have different noise levels  Set Theory, Logic, Probability, Statistics  1  
Long shot  how can I find the raw data for observed velocities in Galactic curve?  Cosmology  3  
Photometric data from SDSS fits files  Astronomy & Astrophysics  1  
Need help finding an equation that fits data  Precalculus Mathematics Homework  1 