# Combining Errors

1. Nov 4, 2008

### Bunting

I didn't really know on the forum to put this, it isn't really homework or coursework, but it is a very small part of a project im doing for uni, so essentially it could be worth marks so here it is, anyway...

1. The problem statement, all variables and given/known data
Im rubbish at combining errors and was wondering if someone could just guide me on this sepcific issues... Im trying to get the error in a pythagorean distance, i.e the error in...

Distance =(x2 + y2 + z2)1/2

Now I have all the errors of x, y and z respectively. My problem is that I dont think I am combining the error corrrectly, see section3...

3. The attempt at a solution
So what I am doing is to say...

1. x*x, y*y and z*z are all combinations of errors, for all of which I have been using...

z = axy

where a=1, x=x, y=x, such that...

E(x2) = 2x3(E(x))2

which is the same for the error in y2, and the same for the error in z2.

2. next I say, find the error in x*x + y*y + z*z, for which I use...

z = ax + by + cz where a=b=c=1

where the error is...

(E(z))2 = a2(E(x))2 + b2(E(y))2 + c2(E(z))2

I work all this through and get a value for the error in x*x + y*y + z*z, then...

3. error in distance = (x*x + y*y + z*z)1/2, for which I use...

z = axb where a=1, b=0.5

this uses the formula E(z)/z = bE(x)/x

So I rearrange all this, calculate the individual errors, but I get a number that is just plain wrong.

So, in summery of how I do it...
1 - Work out the error in
----a = x*x
----b = y*y
----c = z*z

2 - work out the error in...
----d = a + b + c

3 - work out the error in...
----e = d1/2

Is this a correct way of going about it ?

Thank you!

2. Nov 4, 2008

### marcusl

$$s=\sqrt{x^2+y^2+z^2}$$

Use derivatives and the chain rule:

$$ds=\frac{\partial s}{\partial x}dx+\frac{\partial s}{\partial y}dy+\frac{\partial s}{\partial z}dz$$

Now evaluate the partials

$$ds=\frac{x}{s}dx+\frac{y}{s}dy+\frac{z}{s}dz$$

This gives the error ds in terms of the individual component errors.

3. Nov 4, 2008

### gabbagabbahey

I think you need to put some absolute value signs around those partials

4. Nov 4, 2008

### marcusl

True enough Thanks.

5. Nov 18, 2008

### Bunting

Oops, sorry about the lack of thanks here! I read it ages ago, use dit then must have forgotten! :S

Thank you for the help :)

6. Nov 18, 2008

### Bunting

Out of interest can that be used for any means of combinational error ? I.e.

f = (d2 - d1) / (d2 + d1)

Can I just take derivatives and then use the chain rule, or because d2 and d1 have the same error it can be done differantly ?

7. Nov 18, 2008

### HallsofIvy

Staff Emeritus
You can use the derivative to approximate errors. For example if f(x)= x2 and x can be "$x_0\pm \delta$", then x could be as large as $x_0+ \delta$ so f(x) could be as large as $(x_0+ \delta)^2= x_0^2+ 2x_0\delta+ \delta^2$ which is, to "first order", that is, ignoring the $\delta^2$, [/itex]f(x_0)+ 2x_0\delta[/itex]. Or x could be as $x_0- \delta)^2= x_0^2- 2x_0\delta+ \delta^2$. Again, ignoring the $\delta^2$ term, that is $f(x_0)- 2x_0\delta$ so we can write, approximately, $f(x_0)\pm 2x_0\delta= f(x_0)\pm f'(x_0)\delta$

There is an engineer's "rule of thumb" that say if you add measurements, you add the errors and if you multiply measurements, you add the "relative errors".

That is because if h(x)= f(x)+ g(x), h'(x)= f'(x)+ g'(x) while if h(x)= f(x)g(x), h'(x)= f'(x)g(x)+ f(x)g'(x) and dividing both sides by h= fg, h'/h= f'/f+ g'/g. "h'/h" is the "relative error".