Help me to make best fit with error

  • Context: Graduate 
  • Thread starter Thread starter shad0w2000
  • Start date Start date
  • Tags Tags
    Error Fit
Click For Summary
SUMMARY

The discussion centers on calculating the error associated with the parameter 'a' in the model y = c*Exp(a/x) using Bayesian methods. The user has implemented a Bayesian approach to derive the posterior distribution but is struggling to compute the error on 'a'. A solution is provided, suggesting the transformation of the model into a linear regression format by taking the logarithm, allowing the use of software like Excel or Mathematica's Regress function to obtain standard errors for the parameters.

PREREQUISITES
  • Understanding of Bayesian statistics and posterior distributions
  • Familiarity with linear regression techniques
  • Proficiency in using Mathematica for statistical analysis
  • Knowledge of logarithmic transformations in data modeling
NEXT STEPS
  • Learn how to implement Bayesian inference in statistical models
  • Study linear regression analysis using Mathematica's Regress function
  • Explore error estimation techniques in regression analysis
  • Investigate the application of logarithmic transformations in data fitting
USEFUL FOR

Data scientists, statisticians, and researchers involved in statistical modeling and error analysis in regression contexts.

shad0w2000
Messages
5
Reaction score
0
Hi,

I have a set of datapoints (x_i,y_i) and I am going to make a best fit to y = c*Exp(a/x)

Making the fit isn't the problem (Mathematica, etc. can handle this), but what I need is the error on a.

What I have done so far is something like this:

P(c,a | {x_i,y_i} ) = k * P( {x_i,y_i} | c,a ) using Bayes.

And then

P({(x_1,y_1),(x_2,y_2),...}|c,a) = product of ( P(x_i,y_i | c,a) ) for all i's.

which is proportional with

product of ( P(y_i | x_i, c,a) )



But I can't get any further than this :)

Can anyone help me with this ?

Thanks in advance
 
Physics news on Phys.org
How are you defining the error on 'a'? Totally missing what you mean!
 
y = c*Exp(a/x)
Log y = Log c + a (1/x)
v = d + a z where v = Log y, d = Log c and z = 1/x.

Now you have a linear regression that you can compute with any type of software that will print out the standard errors for the regression parameters d and a. For example, Excel. Or use the Regress function in Math'ca (after you enter Needs["LinearRegression`"]).
 
Last edited:

Similar threads

  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 19 ·
Replies
19
Views
3K
Replies
24
Views
3K
Replies
1
Views
4K
  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 12 ·
Replies
12
Views
3K
  • · Replies 3 ·
Replies
3
Views
2K
Replies
2
Views
19K
  • · Replies 3 ·
Replies
3
Views
4K