Ch2.1 True Values

Ch2.1.1 Accuracy: Covered in these slides
Ch2.1.2 Precision: Covered in next set of slides

Approximation vs True Values

How far do you live from campus?

(1 mile = 4 blocks)

  • 8 blocks
  • 2 miles
  • \( \sqrt{2} \) miles
  • One and a half miles
  • Half an hour
  • An hour

Answer depends on who needs to know, what the context is, etc

title

Approximation vs True Values

  • Input numbers may be only close approximations.
  • The distance to the sun is commonly given at 150 million kilometers.
  • But the Earth's orbit is an ellipse and the distance is constantly fluctuating.

title

Approximation vs True Values

  • Similarly, a meter stick may not have any marks closer together than one millimeter.
  • An observer may estimate where between two marks a measurement lies, or may pick one of the endpoints.

title

Approximation vs True Values

How numbers are represented can be similar to choosing a measuring device.

title

Approximation vs True Values

  • Numerical measurements do not capture all of reality
  • Analog vs digital recordings title

Approximation vs True Values

  • Analog vs digital recordings:
  • Our ears are analog, and can often perceive a difference title

Approximation vs True Values

  • Numerical analysis obtains answers that are good enough.
  • A calculation should target the highest precision and accuracy necessary without wasting computational resources.

title

Approximation vs True Values

  • A modern 3D printer may have a printing resolution of 100 microns.
  • When constructing the computer model of something to be printed, describing the curve with any finer resolution than the printer may accept is unnecessary.

title

Math Humor Break: Can You Solve?

title

Math Humor Break: Can You Solve?

title

\[ \begin{align*} x*x = 64 & \implies x = 8\\ y + x = 27 & \implies y = 19 \\ z + x + x = 30 & \implies z = 14 \\ \\ \therefore x + z + y = 41 \\ \end{align*} \]

Approximation vs True Values

  • The level of correctness necessary to get a final answer is dependent upon both the input numbers and the final application's requirements.
  • Amount of error allowed in calculation depends on circumstances.
  • We call this the error tolerance. title

Precision and Accuracy

  • Numerical error is composed of precision and accuracy.
  • These two related terms are often used interchangeably.
  • They describe different aspects of an estimate and have different meanings.
  • Wikipedia

title

Measuring Error

  • In Ch2.1, true value = \( x \).
  • The measured value, or approximation, is \( x' \).
  • The value of \( x' \) may be measured through observation or may be the result of a numerical process or calculation.
  • Error will be represented by \( \epsilon \).

title

Ch2.1.1: Accuracy

  • Accuracy measures how close \( x' \) is to true value \( x \).

  • Absolute error (has units):

\[ \epsilon_A = |x - x'| \]

  • Relative error (does not have units):

\[ \epsilon_R = \left| \frac{x - x'}{x} \right| \]

Absolute vs Relative Error

  • Absolute error is a quick measurement but does not convey context.

\[ \epsilon_A = |x - x'| \]

  • Relative error conveys meaningful error estimate in context.

\[ \epsilon_R = \left| \frac{x - x'}{x} \right| \]

Absolute vs Relative Error

  • You live in Monument Hall, about 0.1 miles from EH.
  • You leave for class and end up 1.1 miles from EH.
  • \( E_A = 1 \) mile
  • \( E_R = 10 \) title
x <- 0.1
y <- 1.1
(E_A <- abs(x-y))
[1] 1
(E_R<-abs(x-y)/abs(x))
[1] 10

Absolute vs Relative Error

  • Suppose you live on sun, 93,205,678 miles away.
  • Land 1 mile from EH.
  • \( E_A = 1 \) mile
  • \( E_R \cong 1.073 \times 10^{-8} \)

title

x <- 93205678
y <- 93205679
(E_A <- abs(x-y))
[1] 1
(E_R<-abs(x-y)/abs(x))
[1] 1.072896e-08

Your Turn

  • Suppose
  • \( x = 40.1384 \) mm
  • \( x' = 42.1277 \) mm.
  • Compute the following:
  • \( E_A \)
  • \( E_R \)

title

Your Turn

  • Suppose
  • \( x = 40.1384 \) mm
  • \( x' = 42.1277 \) mm.
  • Compute the following:
  • \( E_A \)
  • \( E_R \)
x <- 40.1384
y <- 42.1277
(E_A <- abs(x-y))
[1] 1.9893
(E_R<-abs(x-y)/abs(x))
[1] 0.04956102

Comments from Reading

  • Reducing relative error has a larger impact on correctness than reducing the absolute error, when considered as a percentage of the true value.
  • However, even a small relative error can cause problems.
  • After crossing hundreds of millions of miles to go to another planet, if a space probe were off by 1 mile, it might crash into the planet, or it just might miss the best picture opportunity.
  • With each estimate of the accuracy of measurement, the context is a guide to how suitable the accuracy is.

Comments from Reading

  • Accuracy only tells how far from the true value a result is.
  • There are limits on how close the true result can be.
  • If a sequence of digits is infinite, as the digits of \( \pi \) are, then no computer contains sufficient memory and computational power to calculate a result using the full number of digits.
options(digits = 16)
pi
[1] 3.141592653589793