Thursday, September 04, 2008

Errors

And now for another excursion into the fascinating world of math and errors.
First of all, you must realize the all important fact that nearly all solutions of math problems are approximations.
I know it seems hard to imagine (at least, I kept feeling there must be some way to get exact answers). But it is true. Your computer and your calculator and your hand calculations are usually riddled with errors: rounding errors, truncating errors, data errors, computational errors, forward errors, and backward errors (and maybe a few more that I have forgotten).

This post will explore backward and forward errors.

Have you heard of functions?

No?
Well, imagine a machine...like an oven. You put in a lumpy sticky mixture of ground-up grains, crushed olives, fermenting fungi, sodium chloride, sugars, and flammable elements combined so they are no longer flammable (i.e. H2O or "water" as it is commonly know as). You put this unlikely combination into the oven machine.
And in ~35min. a fragrant loaf of bread comes forth.

The oven did stuff to the mixture you threw in (well, not literally) and gave an output. We could call the oven a "function" (since it performs a function...baking bread) and the dough (that disgusting mess described earlier) as the input. The nicely baked bread is the output.

We could go even further. We could give the input a generic name "x" which can now stand for anything (not just bread dough, but cookie dough, brownie batter, chickens, cats, plants, 4, 7, 109, or anything else you like). And the output gets its own generic name "y". And the function even gets its own name too! It will be called f(x) (because it performs some function on x).

Now that we've got all that straight we can begin to talk about forward error.

Usually, or at least in an ideal world, you put an x in to your f(x) and get a particular y special to the particular x you put in. And this is the exact output that you would get.

But sometimes, you only get an approximation to your actual y. It's like putting in your bread dough and getting bread that was still doughy in the middle. It's only an approximation of the actual bread you wanted. Now suppose your actual bread and your doughy bread were numbers, than you could find the difference between the two of them. And that would be your forward error.

Like this:
y - approximate y = forward error

Now backward error is a little more tricky to explain. Suppose, you wanted the bread that was doughy in the middle...now it wouldn't actually be bread you were wanting. But we could suppose there is some other...thing that you might wish to make that actually produces doughy bread. Then the doughy bread would be the exact output and not the approximate output.

So then the input changes slightly.
And you get something like this:
x - approximate x = backward error
(the approximate x is the input that gives us the exact output of doughy bread)

Perhaps a visual would help?

(click on image for clearer view)

Faith said...

wow. You sound really smart. I didn't understand a word of this.
Then again, Courtney (she's a 10th grader this year) just told me that before she went to bed last nite she did her Math 11R homework because she wanted to do something "fun.' yeah, it was called something like proofs?? it was a review sheet from Math10R. I looked at it, and like this, didn't undertand a thing! she on the other hand was very excited to show me. I think she would love talking with you!!

Oh. sorry this is long. We loved spending time with your family last week and so sorry we missed you and J.

Nathan said...

So, wait, what's f(cat)?

Kirk said...

Oh sad if it wasn't understandable. That was the point of writing this post...
I guess I'll have to think harder.

f(cat)? it depends on what your function is. If the function = dryer, than probably f(cat) = dizzy cat.
But it will still land on its feet if dropped!

Carla said...

Cool! I've never heard of forward or backward errors before.

Why are they called errors if you can calculate how off they are? If you know what you're doing, and how exactly wrong you are, it's not really an error anymore, is it?

Homemanager said...

Ha! I like your f(cat) explanation! :-D

I feel like I could almost grasp this...it must be from hanging out with You, Jo and Dad :)