Skip to main content

It doesn’t matter much if the tape is straight

Suppose a contractor is measuring the length of a wall. He starts in one corner of the room, and lets out a tape measure heading for the other end of the wall. But something is in the way, so instead of measuring straight to the corner, he measures to a point near the corner on the adjacent wall.

If you looked down on the room from a bird’s eye view, the contractor wants to measure the distance from (0, 0) to (x, 0), but instead measures from (0, 0) to (x, y) where y is small relative to x. How much difference does this make?

The measurement error, as a function of y, is given by

(x² + y²)1/2 – x.

Expanding this function in a Taylor series around y = 0 shows that the error is approximately

y²/2x.

So the error is not on the order of y but of y²/x. The latter is much smaller if y is small relative to x.

For example, suppose a room is 10 feet (120 inches) long. If someone were to measure the length of the room by running a tape measure to a point 4 inches up the joining wall, the measurement error would not be anywhere near 4 inches but rather nearly 16/240 = 1/15 of an inch.

Let’s work this example out and see how good the approximation was. The hypotenuse of a right triangle with sides 120 and 4 is

√14416 = 120.066648…

which is very close to

120 + 1/15 = 120.06666…

The fact that the measurement wasn’t exactly corner-to-corner would likely not be the largest source of measurement error.

The post It doesn't matter much if the tape is straight first appeared on John D. Cook.



from John D. Cook https://ift.tt/36afLyi
via IFTTT

Comments

Popular posts from this blog

Zooming in on maps with sf and ggplot2

(This article was first published on r-bloggers – WZB Data Science Blog , and kindly contributed to R-bloggers) When working with geo-spatial data in R, I usually use the sf package for manipulating spatial data as Simple Features objects and ggplot2 with geom_sf for visualizing these data. One thing that comes up regularly is “zooming in” on a certain region of interest, i.e. displaying a certain map detail. There are several ways to do so. Three common options are: selecting only certain areas of interest from the spatial dataset (e.g. only certain countries / continent(s) / etc.) cropping the geometries in the spatial dataset using sf_crop() restricting the display window via coord_sf() I will show the advantages and disadvantages of these options and especially focus on how to zoom in on a certain point of interest at a specific “zoom level”. We will see how to calculate the coordinates of the display window or “bounding box” around this zoom point. Loading t...

Controlling legend appearance in ggplot2 with override.aes

[This article was first published on Very statisticious on Very statisticious , and kindly contributed to R-bloggers ]. (You can report issue about the content on this page here ) Want to share your content on R-bloggers? click here if you have a blog, or here if you don't. In ggplot2 , aesthetics and their scale_*() functions change both the plot appearance and the plot legend appearance simultaneously. The override.aes argument in guide_legend() allows the user to change only the legend appearance without affecting the rest of the plot. This is useful for making the legend more readable or for creating certain types of combined legends. In this post I’ll first introduce override.aes with a basic example and then go through three additional plotting scenarios to how other instances where override.aes comes in handy. Table of Contents R packages Introducing override.aes Adding a guides() layer Using the guide argument in scale_*() Changing multiple aesthetic par...