1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

I Best fit of a function containing costants with error

  1. May 16, 2017 #1

    Suppose I have a function [itex]y=f(a,b;p;x)[/itex] 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 [tex] v(t) = \frac{F_T}{ \lambda} \ln \left( \frac{M_0 }{M_0 - \lambda t } \right)- gt [/tex] where [itex]F_T[/itex] is known exactly and [itex]M_0[/itex] is the parameter.
    [itex]\lambda[/itex] and [itex]g[/itex] 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.
  2. jcsd
  3. May 17, 2017 #2


    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    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 ?
  4. May 17, 2017 #3
    [itex]f(a,b;p;x) [/itex] was generic to describe the problem; in my case the function is [itex]v(\lambda,g;M_0;t)[/itex]. [itex]F_T=45000[/itex] N (newtons) exactly.

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

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

    [itex]\lambda[/itex] 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 [itex]\lambda[/itex] 10000 times (keeping g fixed to his best estimate) and making an histogram of the best fits of [itex]M_0[/itex]. I got a gaussian shape and the sigma was negligible compared to the sigma given by the fits. I'm not surprised because [itex]\lambda[/itex] 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 [itex]\lambda[/itex] and g, 10000 times at the same time. Maybe this is better than keeping one fixed and generating the other.
  5. May 18, 2017 #4


    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    Hats off for the thorough work !
    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 ?
  6. May 18, 2017 #5


    User Avatar
    Science Advisor
    Homework Helper
    2017 Award

    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 ?
  7. May 18, 2017 #6
    My ispiration for the problem comes from here:

    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 [itex]\tau=6.74[/itex]s is meaningless without any indication of uncertainties.

    [itex]M_0[/itex] 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": [itex]g, \lambda, M_0[/itex].

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

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

    where T is the total time and [itex]\tau[/itex] 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 [itex]\tau[/itex] for each function like this:
    y(T,\tau)=f(T) - g(\tau)=0 \\
    \dot{y}(T,\tau)=h(T) - p(\tau) =0
    f(T)=g(\tau) \\

    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 [itex]\sigma_T,\sigma_\tau[/itex].
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted