Chap 16 Exercises

\[ \newcommand{\dnorm}{\text{dnorm}} \newcommand{\pnorm}{\text{pnorm}} \newcommand{\recip}{\text{recip}} \]

Class activity

Exercise 1  

Figure 1: Power produced by the author’s rooftop photovoltaic array in June 4 (solid line) and June 3 (bars), 2022.

Figure fig-solar-june-c2 comes from the monitoring app for a photovoltaic (solar electricity) array on two consecutive days in June 2022. These data were presented first in Exercise exr-KINWgK, where you were asked to model the June 3 pattern as a bump function solar(t) multiplied by an irregular function cloudiness(t) with a domain between 0 (full cloudiness) and 1 (no clouds). The June 4 pattern is taken as the bump solar(t).

With that multiplicative model in mind, take a closer look at Figure fig-solar-june-c2, particularly for the early part of the day. In the interval from 6 to 9 am, the June 4 power production is below that of June 3.

  1. How is this inconsistent with the “power(t) \(\equiv\) solar(t) \(\times\) cloudiness(t)” model?

  2. The June 4 data starts low and then increases steeply around 9am. What evidence is there that the actual solar(t) function has a smoother increase?

  3. Having in mind the modeling cycle, how might you modify the model simply to make it consistent with the data? (Hint: Is June 4 really a bump?)

Note: At the end of the day, both the June 3 and June 4 data show an extra bump of a sort not seen in the pattern-book gaussian bump function. Potentially this could be due to cloudiness, but the amount of cloudiness would have to be exactly the same for June 3 and 4, which seem unlikely. More realistically, the bump represents an earlier fall off due to shadows of trees as the evening sun get low in the sky.

Exercise 2 Watch the movie in Figure fig-kitten-find-linen.

Growth of E. coli
Figure 2: A movie showing growth of E. coli on a microscopic scale. Each rod is one bacterium.

Bacteria exhibit exponential growth under optimal conditions. In general, if the rate of growth depends on some quantity (here bacteria) then the exponential is the best first guess at a model. In the movie, notice that the rate of expansion depends on the number of bacteria present; the more E.coli, the faster the rate of growth. This is true for any exponential process: the instantaneous rate of growth or decay depends on the amount currently present.

If the experiment were continued indefinitely, the number of bacteria would eventually outgrow the petri dish or deplete their food source. When this happens, we say the bacteria have approached the carrying capacity of their environment. When the population is constrained in this way, a sigmoid would be a more appropriate model to start your modeling process. So, the deciding factor between exponential and sigmoid really depends upon whether 1) we assume a constrained or unconstrained environment, and 2) we let the bacteria reach the carrying capacity of the petri dish or not.

  1. Is there any obvious sign that the bacteria are reaching the carrying capacity of their environment before the end of the movie?

question id: kitten-find-linen-1

  1. Estimate the doubling time of the number of bacteria as they are growing exponentially. Do this by figuring out how long it takes the area of the colony to double (roughly). Hint: You’ll need to use the time marker in the bottom left corner of the movie.

question id: kitten-find-linen-2

  1. Estimate the doubling time in another way, by observing an individual bacterium. At any point in the movie, choose a bacterium at random. Watch it until it splits in two then, immediately, note the time. Watch some more until one of the two children split. The time difference between the mother’s split and the child’s split is the doubling time.

question id: kitten-find-linen-3

  1. Compare the doubling time for a mother in the center of a large colony to the doubling time of a mother on the edge of the colony. Is there any clear sign that growth in the more crowded part of the colony is slower than in the suburbs?

question id: kitten-find-linen-4

Credit: Math 141Z/142Z 2021-2022 development team.

Exercise 3 A person breathes in and out roughly every three seconds. The volume \(V\) of air in the person’s lungs varies between a minimum of \(2\) liters and a maximum of \(4\) liters. Assume time \(t\) is measured in seconds.

Remember that a full cycle of the sine wave \(\sin(x)\) involves \(x\) going from its starting value to that value plus \(2 \pi\).

  1. Which of the following is the most appropriate of these models for \(V(t)\)?

\(V(t) \equiv 2 \sin \left( \frac{\pi}{3} t \right) + 2\)

\(V(t) \equiv \sin \left( \frac{2\pi}{3} t \right) + 3\)

\(V(t) \equiv 2 \sin \left( \frac{2\pi}{3} t \right)+ 2\)

\(V(t) \equiv \sin \left( \frac{\pi}{3} t \right) + 3\)

question id: lamb-talk-gloves-QA1

A respiratory cycle can be divided into two parts: inspiration and expiration. Please do an experiment. Using a clock or watch, breath with a total period of 3 seconds/breath, that is, complete one breath every three seconds. Once you have practiced this and can do it without forcing either phase of breathing, make a rough estimate of what fraction of the cycle is inspiration and what fraction is expiration. (The “correct/incorrect” answers here are right for most people. Your natural respiration might be different.)

  1. Which is true?

Inspiration lasts longer than expiration

Expiration lasts longer than inspiration

Inspiration and expiration each consume about the same fraction of the complete cycle.

question id: lamb-talk-gloves-QA2

Mini modeling project

The data frame MMAC::SunsetLA records the number of minutes after 4 pm until the sun sets in Los Angeles, CA over a 4-year interval from January 2010 (month 1) through December 2013 (month 48).

Use Active R chunk lst-sunset-1 to make a plot of sunset time versus month.

Active R chunk 1

We are using both gf_point() and gf_line(). With data that oscillates up and down, connecting the data points with lines makes it easier to see the pattern. :::

  1. What is the range of the number of minutes until sunset over the whole 4-year period?
40 to 190 minutes       120 minutes       40 to 180 minutes       0 to 48 months      

question id: sunset-in-LA-1

  1. The data fall nicely on a sine-shaped curve. What is the period of that sine?

6 months

11 months

12 months

12 minutes

question id: sunset-in-LA-2

The function \[\text{sunset}(\text{Month}) \equiv A \sin(2 \pi\, \text{Month} / 12) + C\] is a linear combination of two functions:

  1. The constant function one(Month)
  2. The sine function sin(2*pi*Month/12)

The two functions are scaled by \(C\) and \(A\), respectively.

Make rough but reasonable numeric estimates for \(C\) and \(A\) from the data. Then, using Active R chunk lst-sunset-2, define the sunset() function using the numerical estimates in the linear combination. Plot your function as a layer on top of the data. (Pipe the gf_point() layer to slice_plot().)

Active R chunk 2

The domain for slice_plot() is inherited to that implied by the MMAC::SunsetLA data. Notice that the input name in slice_plot() corresponds to that established in gf_point().

Your sunset() function should be a pretty good match to the data except for one thing. What is that thing?

The sunset() function has a completely different range than the data.

The period of the sunset() function does not match the data.

There is a horizontal time shift between sunset() and the data.

question id: sunset-in-LA-3

We will fix the problem with sunset() by defining a time offset to use as a reference. For a sine function, a suitable time offset is the value along the horizontal axis when the phenomenon being modeled crosses \(C\) with a positive slope. There are 4 such points along the horizontal axis readily identifiable in the data. (They may not be at an integer value of Month.)

  1. Which of these is a suitable value for the time offset?

0 months

19 months

21.5 months

15.5 months

question id: sunset-in-LA-4

In the original scaffolding, the value of offset was zero. Change that to match your answer to the previous question.

Plot out the modified sunset() function and confirm that it is a much better match to the data than the original (that is, the one without the time offset). You can “tune” your function by tweaking the numerical values of the \(A\), \(C\), and \(offset\) parameters until you get a solid match.

Alternatively, you can use fitModel() to do the tuning for you. Plug in your estimates (a.k.a. “guesses”) for the parameters in place of the ___ in the following. Then run the code. You will see your estimate of the function compared to the result of having the computer refine your estimate. Chances are, the computer does a better job of stringing the function through the data.

Active R chunk 3

Perhaps you were expecting the tuned sine function to match the data exactly. It does not. One reason for this is that the Earth’s orbit around the Sun is not exactly circular. The sine function is only a model of the phenomenon, good for some purposes and not for others. For a more complete explanation, see this article on Wikipedia.

(Thomas Swalm contributed to this project.)

No answers yet collected