Best fit of a function containing costants with error

  • Context: Undergrad 
  • Thread starter Thread starter RaamGeneral
  • Start date Start date
  • Tags Tags
    Error Fit Function
Click For Summary

Discussion Overview

The discussion revolves around the best fit of a function with parameters that include constants with uncertainties. Participants explore methods for fitting the parameter p in the function y=f(a,b;p;x), where a and b are known with uncertainties, and x and y are measured multiple times. The context includes considerations of Gaussian distributions for uncertainties and the implications of these on the fitting process.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant suggests treating a and b as Gaussian variables and considers multiple fitting approaches, including ignoring uncertainties or generating random values for a and b to obtain a distribution for p.
  • Another participant questions the clarity of the function definitions and suggests using a Taylor series expansion to simplify the problem, while also raising concerns about the dimensions of the parameters involved.
  • A participant clarifies the specific function being used and describes the experimental setup, noting the known thrust and uncertainties associated with parameters λ and g.
  • There is a discussion about the validity of the formula used, particularly regarding its behavior as parameters approach certain limits, and whether it holds for the range of measurements taken.
  • Participants explore the idea of summing uncertainties in quadrature and the implications of generating both λ and g simultaneously versus keeping one fixed during the fitting process.
  • One participant references a simulation for context and discusses the need to propagate uncertainties from multiple parameters to determine the uncertainty for M_0.
  • Another participant introduces a method for separating variables in a system of equations to analyze uncertainties, suggesting that the uncertainty in one function can be related to another.

Areas of Agreement / Disagreement

Participants express various methods and approaches to the problem, but there is no consensus on the best method for fitting the parameters or propagating uncertainties. Multiple competing views remain regarding the treatment of uncertainties and the implications of different fitting strategies.

Contextual Notes

Participants mention limitations related to the assumptions made about the parameters, the dependence on the definitions of the variables, and the unresolved nature of the mathematical steps involved in the fitting process.

Who May Find This Useful

This discussion may be useful for researchers or practitioners involved in experimental physics or engineering who are dealing with parameter fitting in the presence of uncertainties, as well as those interested in statistical methods for error propagation.

RaamGeneral
Messages
49
Reaction score
1
Hi.

Suppose I have a function y=f(a,b;p;x) where a, b are known with some uncertainty and x, y were measured multiple times.
I want to find p through best fit.

I consider a, b to be gaussian variable.

I can imagine multiple ways to do this:
* I consider a, b parameters like p. I don't like this, moreover with the function I'm working on, I get uncertainties orders of magnitude greater than the value of the parameters.
* I ignore the uncertainties for a, b and proceed to do a numerical fit for parameter p like I would normally do.
* I thought I could make a large number of fits where a, b get gaussian-random values and obtain the probability distribution of p (I ignore the std dev given by the fits). Supposing this makes sense, how do I get the uncertainty for p from his probability distribution if this is not a gaussian function?

The function I'm working on is v(t) = \frac{F_T}{ \lambda} \ln \left( \frac{M_0 }{M_0 - \lambda t } \right)- gt where F_T is known exactly and M_0 is the parameter.
\lambda and g are known with uncertainties.Thank you very much for any advice.
I have another problem, again with uncertainties, that arises from the same exercise. I will make another post in the future about that.
 
Physics news on Phys.org
Hello general,

You should be more specific. Not clear to me what T is in ##F_T##. Is ##F## a constant or a function ?

And a bit clearer: Why start with ##f(a,b,p,x)##, and then continue with a function ##v(\lambda, g, M_0, t)## (did I make the right reverse translation ?) ?

Do you have a heap of measurement series ##v(t)## with different ##\lambda## ? What is v, what is ##\lambda## ?

Is it feasible to develop the ln as a taylor series ##{\lambda\over M_0} t + ... \ ##? That way you get rid of ##\lambda## -- if ##M_0 >> \lambda##.

What are the dimensions ? ##M_0## looks like a mass but is a length ?
 
f(a,b;p;x) was generic to describe the problem; in my case the function is v(\lambda,g;M_0;t). F_T=45000 N (Newtons) exactly.

I have a bunch of t measured with error, and the respective v measure with error. The parameter to fit is M_0.

This function describes the velocity in (function of) time considering a thrust of 45000N that reduces the mass by \lambda t. \lambda has the dimension of Kg/s.

\lambda and g were estimated with uncertainties by other means.I could use taylor, but I'd like to have also the exact result. Moreover, if I use taylor I still have g, which has uncertainty, which is the problem I'm posing.

Yesterday I tried gaussian generating \lambda 10000 times (keeping g fixed to his best estimate) and making an histogram of the best fits of M_0. I got a gaussian shape and the sigma was negligible compared to the sigma given by the fits. I'm not surprised because \lambda disappears in taylor.
I tried the same thing with g. This time the sigma was not negligible.

I thought I could sum the two sigmas in quadrature and consider this the solution of my problem. But I'm not sure it's correct.

I also gaussian generated both \lambda and g, 10000 times at the same time. Maybe this is better than keeping one fixed and generating the other.
 
Hats off for the thorough work !
RaamGeneral said:
I thought I could sum the two sigmas in quadrature and consider this the solution of my problem. But I'm not sure it's correct.

I also gaussian generated both ##\lambda## and g, 10000 times at the same time. Maybe this is better than keeping one fixed and generating the other.
If all is well, there should be no big difference and both ways come with the error in g ?

So you analyze a series of experiments where ##M_0## is to be determined ? One single ##M_0## or one per launch ?
Pretty hefty ##F_T## -- how do you know it's determined perfectly and the same each time ?
 
And: about the formula. It starts off with ##\Bigl( {F_T\over M_0}-g\Bigr)t ## but goes to infinity for ##\lambda t \rightarrow M_0## which prompts me to ask if it is sufficiently valid for the range of ##t## in your experiments. Surely there is the mass of the hull to consider too ?
 
My ispiration for the problem comes from here:
https://phet.colorado.edu/sims/lunar-lander/lunar-lander_en.html

Considering the free falling ship, I want to find the height (or the time) at which I can turn on the full thrust and let it land at zero speed. The algebrical problem is not difficult (altough the solution is found numerically) but I also know that saying \tau=6.74s is meaningless without any indication of uncertainties.

M_0 comprises the mass of the ship and the initial mass of the fuel. I also assume (and verify) that for the time intervals considered the fuel won't end.
From that minigame there are missing some parameters that I need in order to solve the problem. I got them through "experiments": g, \lambda, M_0.

My subproblem is now to propagate g, \lambda errors to get an uncertainty for M_0.

The next thing I need to do is to propagate the errors of these three parameters when solving the following system of equations:
<br /> y(T,\tau)=0 \\<br /> \dot{y}(T,\tau)=0<br />

where T is the total time and \tau the time when the thrust is turned on.This was the second problem I was going to pose. But I see I could use the same technique: gaussian generating the parameters, solving numerically, and plotting the histogram.

My friend also had another idea: because in this particular system I can separate T and \tau for each function like this:
<br /> y(T,\tau)=f(T) - g(\tau)=0 \\<br /> \dot{y}(T,\tau)=h(T) - p(\tau) =0<br />
<br /> f(T)=g(\tau) \\<br /> h(t)=p(\tau)<br />

So, he says, the uncertainty on the evaluation of f is the same as the uncertainty on g.
Expanding both function I obtain a system of equations with the unkown \sigma_T,\sigma_\tau.
 

Similar threads

  • · Replies 16 ·
Replies
16
Views
3K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 13 ·
Replies
13
Views
2K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 18 ·
Replies
18
Views
3K
  • · Replies 3 ·
Replies
3
Views
3K
  • · Replies 6 ·
Replies
6
Views
1K
  • · Replies 5 ·
Replies
5
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K
  • · Replies 3 ·
Replies
3
Views
2K