At any point, you can submit your answers by collecting them and uploading them to the class site.

No answers yet collected

Link to upload site

If requested by your instructor, please identify here the people from whom you received assistance on this assignment.

If the answers that have been loaded automatically are not yours, press this button before starting your work:

4 Exercises: Magnitudes

Exercise 4. 1 Consider the data on the body mass (kg) and brain mass (gm) for 62 species of mammals shown in Fig E4. 1. (You can hover the cursor over a point to see the species name.)

Figure E4. 1
  1. The lesser short-tailed shrew has both the smallest body mass and brain mass. What is the brain mass of the short-tailed shrew? (Pick the answer that’s closest.)
msp-1-4lse
0.03 gm       0.14 gm       0.52 gm      

  1. The water opposum, arctic fox, nine-banded armadillo, and rock hyrax (in the middle of the cloud of points) all have about the same body mass. What is that body mass? (Pick the answer that’s closest.)
msp-2-sddo
1-2 kg       3-4 kg       6-7 kg       8-9 kg      

  1. Which of these animals has a body mass closest to 10 kg?
msp-3-fhsl
raccoon       baboon       roe deer       vervet      

  1. Of the mammals in the range of body masses from 10 to 100 kg, which has the smallest brain size?
msp-4-le4
water opposum       giant armadillo       goat       kangaroo      

  1. The gray bar surrounding the blue line in Fig E4. 1 contains about 2/3 of the 62 mammals plotted. Which animal has the smallest ratio of brain mass compared its range of body masses?
msp-5-odr
water opposum       tenrec       musk shrew       desert hedgehog      

Fig E4. 2 shows the daily sleeping time versus lifetime for the 62 mammals. The level of danger from predation that the animal is exposed to is shown by color.

Figure E4. 2
  1. The mammal who sleeps the least sleeps how many hours per day?
msp-6-kew

2.5

2.9

3.5

Can’t tell the difference on this scale.

  1. A chinchilla lives about 7 years. What level of danger does the chinchilla face?
msp-7-ese
1       2       3       4       5      

  1. The Sleep axis is linear, while the Lifespan axis is magnitude. Explain why this choice makes sense (or if it doesn’t).

NoteReady for testing

Assigned to DD

Exercise 4. 2 There are many situations in which we adopt units so that commonly encountered measurements have just two or three digits. Both the Fahrenheit and Celsius temperature scales have the nice feature that commonly encountered outdoor temperatures have two digits. Those familiar with the Fahrenheit scale know that temperatures on weather maps tend to range from -30 to 120°F. For Celsius, the range -20°C to 40°C does the job. Students in the US learn that atmospheric pressure is about 14.7 pounds per square inch.

Tire pressures for cars and bicycles are frequently denominated in one of three units: pounds-per-square inch (psi), bar, and pascal (P). If you are unfamiliar with tire pressure, you might have to do a tiny bit of web research to answer these questions.

  1. Which of the three units gives pressures that can be expressed with two or three digits?
ssc-1-cksw
psi       bar       pascal      

  1. Which of the three units uses 3 digits, and even then has to be modified by an order-of-magnitude prefix?
ssc-2-gdiw
psi       bar       pascal      

  1. Which of the three units requires a decimal point to denominate car tire pressures to a suitable precision of \(\pm\) 10%?
ssc-3-edke
psi       bar       pascal      

(The unit “pounds per square inch” is often abbreviated “psi,” but this obscures that we are dividing by square inches, not multiplying). Inflate a car tire to about 35 psi, a bicycle tire to about 60-100 psi. The metric unit of pressure is a pascal (P), but it is poorly suited to representing everyday pressures: bike tires are in the range 400 to 700 kPa. Instead of pascal, people in the metric world tend to use a different unit: bar. Inflate a car tire to 2.5 bar, a bicycle tire to 4-8 bar.

NoteReady for testing

Assigned to DD

Exercise 4. 3 The Engine data frame contains measurements of many different internal combustion engines of widely varying sizes. For instance, we can graph engine RPM (revolutions per second) versus engine mass (in pounds), as in Fig E4. 3.

Figure E4. 3: Engine speed (RPM) versus mass for 39 different engines using linear axes. Applications for engines span many magnitudes: compare a small lawn-mower engine to the huge engine in a large ship.

In the Fig E4. 3, most engines have a mass of… zero. At least, that is how it appears. The scale of the horizontal axis is determined only by the two massive 100,000-pound monster engines plotted at the right end of the graph.

Plotting the magnitude of the engine mass spreads things out, as in Fig E4. 4.

(a)
(b)
Figure E4. 4: The engine data plotted with magnitude scales
  1. Which of the plots in Fig E4. 4 uses two magnitude axes?
zdb-1-8dw
(a)       (b)       both a and b       neither a nor b      

  1. On the mass axis in the plots in Fig E4. 4, there are labels at 1 pound, 10 pounds, and 100 pounds. The vertical grid line between 1 and 10 pounds has no label. Which of these labels would be most appropriate?
zdb-2-kfw3
2       3       5       no proper label exists      

  1. In Fig E4. 4, there is an unlabelled vertical grid line half-way between 100 and 10,000 pounds. What is an appropriate label?
zdb-3-k4s
500       550       1000       3000      

Fig E4. 5 shows a coordinate system with magnitude scales for both axes. We’re interested in the physical spacing (as you would measure with an ordinary ruler) between values. Remember, the grid-line labels are in terms of the quantity itself, not the magnitude of the quantity. However the spacing between grid lines is the same for equal increments in magnitude.

Figure E4. 5: Finely gridded magnitude scales.
  1.    zdb-4-73sq

    True     or       False      

    On the x-axis scale in Fig E4. 5, the labels 1.0, 2.0, and 3.0 refer to equal steps in the quantity value. Are they equally spaced physically?

  2.    zdb-5-347s

    True     or       False      

    On the x-axis scale in Fig E4. 5, the values 1, 2, 4, 8 are equally spaced in magnitude. (In this case, each is twice as big as the previous.) Are they equally spaced physically?

  3. On the y-axis (vertical) scale in Fig E4. 5, the horizontal grid lines labeled 2 and 10 are separated in value by a multiplicative factor of 5. There are several other pairs of labels on the y-axis that are separated by a multiplicative factor of 5, for instance 1 and 5. Write down all such pairs of labels. And, for each pair, record the spatial distance between the labels. You can use a ruler to do so, but if one is out of reach, use your fingers as a ruler.

  1. In magnitude plots, a decade refers to an order of magnitude range, for instance, from 1 to 10. How many decades are shown in the y-axis scale of Fig E4. 5?
zdb-7-2se
1       2       3       4      

Exercise 4. 4 Food and medicine are measured over a large range. For instance, in the metric system, measurements might be denominated in micrograms, milligrams, grams, kilograms. How many orders of magnitude (that is, factors of 10) are spanned from micrograms to kilograms.

asm-1-wels
3       4       6       8       9       10       12      

Exercise 4. 5 Official standards for bacterial cleanliness are set on a scale measuring what proportion of bacteria may survive a cleaning. For instance, the Mr. Clean bottle claims to eliminate 99.9% of bacteria, that is, that only one in a thousand bacteria will survive.

Experts often us a more “scientific”-sounding logarithmic scale. For instance, food safety might be set at a “7 log\(_{10}\) lethality.” This means that of 107 bacteria, only one might survive.

On the “log\(_10\) lethality” scale, how clean is Mr. Clean?

spt-1-wlww
3       4       5       6       7       None of the above.      


4.1 Drafty, or other problems

4.2 Theoretical about logarithms. Maybe an enhancement for extra credit.

id: “deer-spend-roof” created: “Thu Aug 28 16:07:34 2025” attribution: TBA —

Exercise 4. 6 Writing all numbers in scientific notation, as \(1 \times 10^{x}\).

Consider the number \(3.814697 \time 10^{-5}\). This is between 1e-4 and 1e-5, as the following calculation demonstrates.

mynum <- 3.814697e-5
mynum < 1e-4
[1] TRUE
mynum > 1e-5
[1] TRUE

I want to be able to write mynum in a format where the mantissa is always 1, but where the exponent might not be an integer. For instance, in the example, mynum is equal to \(1 \times 10^{-4.41854}\). I’ll call the exponent when the mantissa is 1 the magnitude of the number.

The magnitude of 10 is 1, the magnitude of 1 is 0, the magnitude of 0.1 is -1, and so on.

Given two numbers, the magnitude of their product is the sum of the magnitudes of the two numbers. Example: 10 has magnitude 1 and 0.01 has magnitude -2, so \(10 \times 0.01 = 0.1\) has magnitude \(1 - 2 = -1\).

Magnitudes <- tibble::tibble(
  mag = 1 / (2^(0:10)) 
)

# initialize using square roots
num <- rep(10, nrow(Magnitudes))
for (k in 2:length(num)) num[k] <- sqrt(num[k-1])
Magnitudes$num <- num

augment <- function(mag_table) {
  Another <- tibble::tibble(
    mag = cumsum(mag_table[-1, ]$mag),
    num = cumprod(mag_table[-1, ]$num)
  )
  mag_table <- dplyr::bind_rows(mag_table, Another)
  And_another <- mag_table |>
    dplyr::mutate(num = sqrt(num), mag = mag/2)
  
  dplyr::bind_rows(mag_table, And_another) |>
    clean_tab()
  
}

pick_some <- function(mag_table, n = nrow(mag_table), pickn = 2L) {
  result <- tibble::tibble(mag = numeric(n), num = numeric(n))
  for (k in 1:n) {
    rows <- base::sample.int(nrow(mag_table), size = pickn)
    tmp <- mag_table[rows, ]
    result[k, "num"] <- prod(tmp$num)
    result[k, "mag"] <- sum(tmp$mag)
  }
  
  dplyr::bind_rows(mag_table, result) |> clean_tab() |> unique()
}

promote <- function(mag_table) {
  newtable <- mag_table |> 
    dplyr::mutate(
      mag = mag + 1/2,
      num = num * sqrt(10)
    ) 
  
  dplyr::bind_rows(mag_table, newtable) |> clean_tab()
}

# get rid of anything bigger than 10
clean_tab <- function(mag_table) {
  tmp <- 
    mag_table |>
    dplyr::filter(num < 100) |>
    dplyr::mutate(mag = ifelse(num > 10, mag-1, mag),
                  num = ifelse(num > 10, num/10, num)) |>
    dplyr::arrange(desc(num))
  kill <- which(abs(diff(tmp$num)) < 1e-12)
  tmp[-kill,]
}

mtable <- Magnitudes
for (k in 1:3) {
  mtable <- augment(promote(mtable))
  mtable <- pick_some(promote(mtable), pickn = 2)
  mtable <- promote(mtable)
}

Now we have a large number of points for log10(x) in the domain 1 <= x <= 10

We can construct extensions by multiplying or dividing the number by 10, adding or subtracting 1 respectively from the mag.

File ID: deer-spend-roof


Exercise 4. 7 Scientific notation for numbers undoubtedly simplifies comparing numbers that might be very different in magnitude. Just look at the order of magnitude. In traditional notation, e.g. China GDP at \(\color{blue}{1.87} \times 10^\color{magenta}{13}\) USD versus Estonia GDP at \(\color{blue}{4.27} \times 10^\color{magenta}{10}\) just look at the integer in the order of magnitude position. Similarly for the computer-notation style, e.g. \(\color{blue}{1.87}\mathtt{e}\color{magenta}{13}\).

In scientific notation, the numbers 1 to 9 all have the same order of magnitude, that is, 1e0, 2e0, 3e0, …, 9e10. In graphics, and other applications, we can relax the restriction that the order of magnitude be an integer. For instance, we

[[I’m getting tangled up in this. Come back to it.]]

For graphics on a magnitude scale, the axis labels allow you to read off the number itself, not the number’s magnitude. To illustrate, Fig E4. 6 shows the scale labelled with the values 1, 2, 3, …, 9. But inbetween each pair of labels, there are nine grid lines that also are arranged in the unevenly spaced manner typified by a magnitude scale.

vals <- c(1:9)
set.seed(103)
tibble(y = abs(rnorm(20,0,3)), x = abs(rnorm(20,0,5))) |>
  gf_point(log10(y) ~ log10(x), alpha = 0) |>
  gf_refine(
    scale_x_continuous(limits=c(0,1),
                       breaks = log10(vals),
                       minor_breaks = log10(seq(1, 10, by = 0.1)),
                       labels = vals),
    scale_y_continuous(limits=c(0,1),
                       breaks = log10(vals),
                       minor_breaks = log10(seq(1, 10, by = 0.1)),
                       labels = vals)
            ) |>
  gf_labs(x = "Mantissa for x", y = "Mantissa for y") |>
  gf_theme(theme_minimal())
Warning: Removed 9 rows containing missing values or values outside the scale range
(`geom_point()`).

Figure E4. 6: A magnitude-scale plot of a handful of coordinate pairs in the range 1 to 10.

File ID: niece-seek-lamp


Exercise 4. 8 “A clinical validation study showed the Cologuard Plus test is effective at ruling out CRC. [Colo-rectal cancer] Out of every 10,000 patients testing negative, approximately 2 will be falsely reassured that they do not have CRC, and out of every 100 patients testing negative, approximately 7 patients will be falsely reassured they do not have advanced pre-cancer.”—Part of the narrative sent out along with the negative result of a test. Note that the 2 is really 200 per 100 patients or 0.00002 or 0.002%.

File ID: seahorse-eat-door


Exercise 4. 9 Traditional units for volume: cup, pint, quart, gallon, cubic foot, progress up by factors of 2.

File ID: bee-spend-magnet


Exercise 4. 10 Phenomena where measurements are usually reported on a magnitude scale: sound, earthquakes, acidity (pH), information

File ID: mouse-love-pen