Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Absolute and Relative Errors

AllenHeard
January 10, 2017

Absolute and Relative Errors

Year 13 Lesson

AllenHeard

January 10, 2017
Tweet

More Decks by AllenHeard

Other Decks in Education

Transcript

  1. Errors ▪ When calculating floating point numbers in binary we

    can run into errors of precision. We experienced this in the tasks we did when working with floating point numbers. ▪ There are two types of errors that we can calculate: – Absolute Error – Relative Error
  2. Errors ▪ The absolute error is the magnitude of the

    difference between the exact value and the approximation. ▪ The relative error is the absolute error divided by the magnitude of the exact value. ▪ We represent this as a percentage relative error expressed in terms of per 100.
  3. Absolute Error Example ▪ Let’s say for example we are

    trying to represent the number: 8.910 in binary. ▪ The closest possible representation we can display is: 0.10001112 01002 ▪ The absolute error is the difference between the expected value of 8.910 and the representation above. ▪ Calculate the absolute error.
  4. Relative Error ▪ If our absolute error was 2cm for

    instance and we were expecting 5cm but we arrived at 3cm, then this is an error that is out by quite a distance. ▪ Alternatively if we were out by 2cm and we were expecting a result of 12000cm but arrived at 11998cm, relatively speaking we were not out my that much, hence the term relative error.
  5. Relative Error Example ▪ Let’s look at our previous example

    where we were trying to represent the number: 8.910 in binary. ▪ The closest possible representation we could display was: 0.10001112 01002 ▪ We calculated the absolute error and arrived at 0.025 ▪ The relative error is calculated as follows absolute error 0.025 expected 8.9 ▪ Ensure when you calculate the relative error, you convert it into a percentage by moving the decimal place two places to the right. = = 0.0028 = 0.28%
  6. Task ▪ In a computer system, the closest representation of

    5.6510 is: 0.10110002 00112 ▪ Calculate the absolute error and the relative error.