CHAPTER 01.02: MEASURING ERRORS : Relative True Error
In this segment we're going to talk about relative true errors. And let's go and first to see why we need to study relative true errors.
Let's recall the example that we were asked to take the function f(x)=7e^0.5x. We are asked to find out what f'(2) is by using approximate formulas for the derivative of a function being given as follows. And in this case we use delta x equal to 0.3. So if you take this function, you want to find the derivative of the function at 2 and this is the approximate formula which you are using for calculating that derivative and choosing a delta x equal to 0.3. This is what we obtain for f'(2). We obtain f'(2) to be 10.265 and that was the approximate value. So I should put this to be approximate. And I got f'(2) to be exactly equal to 9.5140. Up to 5 significant digits of course. And that turns out to be the exact value, 9.5140. So in this case, the true error which we obtained was the difference between the two: 0.75061. That's the difference between the exact value and the approximate value. Now, let's go and take another example, which is a similar one. Now, somebody might say hey, if you had the function to be 7*10^(-6)e^0.5x, this function is very similar to what we had earlier. The only thing is that we have 10^(-6) being multiplied here. And somebody told you go ahead and calculate f'(2) by using the same approximate formula. Use the same value of delta x which is 0.3. What you are going to get is, you are going to get f'(2) to be approximately equal to 10.265*10^(-6). That is the approximate value which you are going to get. The reason why you are going to get this is because we got 10.265 and we didn't have the 10^(-6) in the function but now we have 10^(-6) so it is just going to be multiplied by 10^(-6). If you want to convince yourself that is what you are going to get go ahead and do this as a homework problem. And again, the exact value of the derivative of a function would turn out to be 9.5140*10^(-6) and that will be the exact value. If I was going to calculate what the true error is associated with the exact value and the approximate value I will get -0.75061*10^(-6). So what I am trying to derive here is that, for this particular function here and trying to find the derivative at 2 we get a true error which looks very small because you have 10^(-6) here. So let me take you to this one here which was the previous example which we took. It is the previous example which we took on this side of the board and what we find out there, that the true error which we get is -0.75061. So it is different, it is 10^(-6) bigger than what we got in the other example. So it's the same example getting a reasonable amount of true error here and another one you are getting 10^(-6), so it might give you a false impression that in one case the true error is small and the other case the true error is large. So that’s why we need to define something called the relative true error.
So the relative true error is denoted by epsilon t. Epsilon stands for relative error and t stands for true. So epsilon t is defined as true error divided by exact value. So if you look at the first example which we had there where we know what the true error is and what the exact value is which we just showed. So if you look at the first case for f(x) equal to 7e^0.5x, calculate f'(2) for delta x equal to 0.3. We obtained the true error to be -0.75061. We obtained the true value, that's the exact value, to be 9.5140. So based on that, if I want to calculate what the true error is I simply -0.75061 divided by 9.5140, it's not multiplied by anything, so this true error turns out to be equal to -0.078895. Sometimes the relative true error might be defined as a percentage, so in that case you would just multiply by 100, so -7.8895% here. So it doesn't matter whether they ask you as a fraction or a percentage. You can always denote it in both ways. If you want to calculate the absolute relative true error then you just take the absolute value of these numbers so it would be 0.78895 or 7.8895%. If you look at the other example now, which we had, something there also. If we took the example f(x) being 7*10^(-6)e^0.5x, you calculate f'(2) with the approximation and you choose delta x to be 0.3. In this case also your relative true error is going to turn out to be -0.078895. Exactly the same as our earlier true error you are going to get for this case, so I would like you to do this as homework. And what you are finding out it that relative true error is a better measure of finding out how bad your error is as opposed to just looking at the value of your true error and that's why we need to define relative errors. And that's the end of this segment. |