Re: Calculating with imprecise values

new topic     » goto parent     » topic index » view thread      » older message » newer message

Juergen Luethje wrote:
> 
> Al Getz wrote:
> 
> [Sensitivity Analysis]
> 
> > Hi Juergen,
> > 
> > Sorry i dont have a link in mind, but a quick google turned up several
> > sites including a 'forum' for Sens A.  I didnt want it to sound too
> > complicated though, because basically it's not,
> 
> Much appreciated. blink
> 
> > so here's a quick example to help show how simple it can really be....
> > 
> > First a pure approach then a numerical approach that can be used in
> > an Eu program...
> > 
> > I think a good example would be finding the volume of a rather long
> > box with rectangular cross section we'll say the length of is 'a',
> > and the two sides are 'b' and 'c'.  This would look like a rectangular
> > pipe.  We want to find the volume, but also the change in volume so
> > we can understand what happens when either of the measurements for
> > a,b, and c are either off to begin with (due to measurement inaccuracies)
> > or just to see what happens when a given dimension changes.
> > 
> > For this example we'll say
> >   a=100
> >   b=10
> >   c=10
> > in inches.
> > 
> > The volume would be v=a*b*c which we'll rewrite
> >   y=a*b*c
> > 
> > First we take first partials:
> >   dy/da=b*c
> >   dy/db=a*c
> >   dy/dc=a*b
> > 
> > and now we can call the sensitivities:
> >   Sya=dy/da=b*c
> >   Syb=dy/db=a*c
> >   Syc=dy/dc=a*b
> > 
> > Where 'Sya' is read: "The sensitivity of y with respect to a".
> > 
> > Now we look at the actual numerical value of these to see what
> > we can find out:
> >   Sya=b*c=100
> >   Syb=a*c=1000
> >   Syc=a*b=1000
> > 
> >  From this we can quickly see that Sya is ten times less than Syb or
> > Syc, so the measurement in 'a' isnt as important as the measurement
> > for 'b' or 'c'.
> > 
> > Going back to the original equation with the chosen values for this 
> > example, we can see that a change of say 1/16 inch causes a much
> > bigger change in volume when the change occurs in either b or c, while
> > not as big of a change in volume when the change occurs in a.
> 
> I see. I can imagine that this kind of approach to a problem often can
> be very useful.
> 
> > Writing this out as a 'formula' we get an approximate numerical
> > method:
> >   Sya=(f(a+inc,b,c)-f(a,b,c))/inc
> >   Syb=(f(a,b+inc,c)-f(a,b,c))/inc
> >   Syc=(f(a,b,c+inc)-f(a,b,c))/inc
> > where
> >   f(a,b,c)=a*b*c (the original volume equation), and
> >   'inc' is a small number like 0.001.
> > 
> > The above can be used in a program quite easily, but usually a slightly
> > more accurate method is used in programs (the 'Central Means' formula):
> >   Sya=(f(a+inc,b,c)-f(a-inc,b,c))/(inc+inc)
> >   Syb=(f(a,b+inc,c)-f(a,b-inc,c))/(inc+inc)
> >   Syc=(f(a,b,c+inc)-f(a,b,c-inc))/(inc+inc)
> > All that's involved here is calling the function f twice for each
> > sensitivity: once using a positive inc and once a negative inc,
> > then subtracting the results and dividing by twice the inc.
> 
> Al, thanks a lot for the trouble writing down this comprehensive and
> good understandable explanation!
> 
> Regards,
>    Juergen
> 
> -- 
> What do you want to re-install today?


Hello again Juergen,

Oh you're welcome, and i hope you find some good uses for this.


Take care,
Al

And, good luck with your Euphoria programming!

My bumper sticker: "I brake for LED's"

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu