COSC/MATH 201 · Exam 1 Study Guide

Friday, October 9, 2026

What to prepare

Exam 1 is Friday, October 9, 2026. It has 12 multiple-choice questions (48 points), five model-matching items (20 points), three R code-reading questions (12 points), and two short calculations (20 points), for 100 points total. It is designed to fit within the 50-minute class. Circle one answer for each multiple-choice or code-reading question; write a letter for each matching item; and show your setup for the calculations. No calculator is needed. You may leave correct answers in equation form without simplifying the arithmetic. Any needed rate equations will be supplied in the questions. I will confirm the notes policy in class before the exam.

For our Monday review, bring this guide. We will discuss the format and expectations, then work through selected practice problems together. To prepare, try the problems before opening the answer sections. These examples use different numbers and contexts from the exam.

Review the course modules for R Fundamentals; Modules 2.2, 2.3, 4.1, 4.2, 4.3, and 5.2; and Growth Models in Practice. Project 1 and Project 2 are useful practice, but you will not have to write a whole Quarto report or run R on the paper exam.

By Friday, be ready to:

  • recognize the model that fits a short story and explain how its rates affect the stocks;
  • use a supplied rate equation and time step to calculate one update;
  • trace a small piece of R code or explain why coupled updates use old values; and
  • work with normalized notation, precision, magnitude, absolute and relative error, and the main sources of computational error.

From a story to an update

A stock is an amount at a time; a flow changes it. Know whether a flow adds to or subtracts from a stock. For a time step \(\Delta t\),

\[ \text{new stock}=\text{old stock}+\Delta t(\text{inflow rate}-\text{outflow rate}). \]

If the rate is per day, \(\Delta t\) must be in days. A rate of 6 fish/day over half a day adds 3 fish, not 6. When a model has several stocks, compute all flows from the old values before updating any stock. Otherwise, the order of your R statements changes the model.

Recognize and reason about the models

Model Typical rate of change What to explain
Unconstrained growth or decay \(rP\) The rate is proportional to the current amount; a negative \(r\) gives decay. This model has no resource limit.
Constrained growth \(rP(1-P/K)\) \(K\) is carrying capacity. Below \(K\) the stock grows; above \(K\) it declines (for positive \(r\)).
Competition Each population’s growth is reduced by interaction with the other An encounter term such as \(cAB\) increases when either population increases. Both competitors are harmed by competition, though not necessarily equally.
Predator–prey Prey lose and predators gain from encounters The same encounter can have opposite signs in the two equations. Predator peaks often lag prey peaks.
SIR Susceptible \(\to\) infectious \(\to\) recovered Infection transfers people from \(S\) to \(I\); recovery transfers people from \(I\) to \(R\). In the simple closed model, \(S+I+R\) stays constant.

Recognize these models from a short story, use an equation when the question supplies it, and predict the direction of a change. You will not be asked to reproduce the textbook’s diagrams or memorize its differential equations. Distinguish a model’s output from evidence that the model accurately describes the world.

For a simple SIR model, this guide uses \(\text{infection}=\beta SI/N\) and \(\text{recovery}=\gamma I\). The book and our module discuss another transmission convention; use the convention explicitly stated in a question. Know which group loses and gains from each transfer.

Read small R simulations

Review vectors made with c(), indexing with [ ], assigning with <-, and tracing one short update. Know why old <- stock[i - 1] preserves the previous value. Be ready to identify a model from a few update lines and spot a flow that uses a newly updated stock instead of the old values. You will not write a complete R program or need to memorize plot commands, Quarto syntax, or loop syntax for this exam.

Numerical error and evidence

  • Absolute error is \(|\text{estimate}-\text{reference}|\) in the original units. Relative error divides that difference by \(|\text{reference}|\) (when the reference is nonzero); multiply by 100 for a percentage.
  • Distinguish data error (inaccurate input or measurement), model error (assumptions or omitted mechanisms), implementation error (a mistake in translating the model into a program), and numerical error (limits of a computational approximation).
  • A computer stores only finitely many numbers. R’s 0.1 + 0.2 may not compare exactly equal to 0.3; arithmetic order can matter. Roundoff from one step can carry forward into later steps.
  • Round-off error comes from representing or calculating with limited precision. Truncation error comes from stopping an approximation after finitely many terms or using finite steps. Computing time as the step number times \(\Delta t\) avoids accumulating error from repeatedly adding a decimal step.
  • A finite-step Euler simulation approximates continuous change. Compare with a known solution when one exists, and repeat with a smaller \(\Delta t\) to see whether the result stabilizes. A smaller step is evidence about numerical approximation, not proof that the model’s assumptions match reality.
  • Overflow means a result is too large for the numeric representation; underflow means it is too small to represent normally. They are different from using a time step that is too coarse.

The book’s notation, precision, and magnitude

Module 5.2 uses a particular normalized exponential notation: put the decimal point immediately before the first nonzero digit. For example,

\[ 0.0008100=0.8100\times10^{-3}. \]

Ordinary scientific notation would write the same value as \(8.100\times10^{-4}\); that is mathematically correct but not the book’s normalized form. In the book’s terminology, the digits 8100 are the significand, the precision is 4 significant digits, and the magnitude is \(10^{-3}\) (not just \(-3\)). Leading zeros do not count; trailing zeros after a decimal point do. For an integer written without a decimal point, the book does not count trailing zeros as significant: \(6{,}250{,}000=0.625\times10^7\) has precision 3 and magnitude \(10^7\).

Multiple-choice practice

The exam has 12 general multiple-choice questions; there are 20 practice questions here so you can choose extra ones to review. Try them before opening the answers. Each has one best answer.

  1. A savings balance earns a fixed percentage of its current value each year, with no stated cap. Which model best fits? A. unconstrained growth; B. constrained growth; C. competition; D. SIR.
  2. A logistic population is at its carrying capacity. The model’s immediate growth rate is A. positive; B. negative; C. zero; D. unknown.
  3. A stock gains 12 units/day. With a quarter-day step, its gain is A. 3; B. 12; C. 24; D. 48 units.
  4. Two animal species eat the same limited food. Their interaction is most naturally A. infection; B. competition; C. predator–prey; D. unconstrained decay.
  5. In a predator–prey model, more prey with predators fixed initially makes encounter terms A. smaller; B. larger; C. negative; D. disappear.
  6. In a closed SIR model, recovery transfers a person from A. \(S\) to \(I\); B. \(I\) to \(R\); C. \(R\) to \(S\); D. the population to outside it.
  7. If x <- c(3, 8, 11), then x[3] is A. 3; B. 8; C. 11; D. 22.
  8. A reference value is 200 and an approximation is 190. Percent relative error is A. 1%; B. 5%; C. 10%; D. 50%.
  9. A value is too large for the computer’s numeric representation. This is A. overflow; B. validation; C. a model assumption; D. time-step error.
  10. Reducing \(\Delta t\) changes a simulation result substantially. That tells you most directly that A. the model is correct in nature; B. the numerical answer is sensitive to step size; C. the parameter values are measured correctly; D. the graph is mislabeled.
  11. In the book’s normalized notation, \(0.00620\) is A. \(6.20\times10^{-3}\); B. \(0.620\times10^{-2}\); C. \(0.0620\times10^{-1}\); D. \(0.620\times10^2\).
  12. The precision of the written number \(0.00620\) is A. 2; B. 3; C. 4; D. 5 significant digits.
  13. The magnitude of \(0.620\times10^{-2}\) is A. \(-2\); B. \(0.620\); C. \(10^{-2}\); D. \(620\).
  14. A program accidentally uses hours where its formula expects days. This is primarily A. data error; B. model error; C. implementation error; D. overflow.
  15. A value must be approximated because its exact decimal expansion cannot fit in the computer’s finite representation. This is A. round-off error; B. truncation error; C. validation; D. a model assumption.
  16. A positive result is too tiny to represent normally. This is A. overflow; B. underflow; C. relative error; D. a larger time step.
  17. To compare two computed decimal values x and y, which is most appropriate when small floating-point differences are expected? A. exact equality always; B. inequality always; C. an absolute difference below a justified positive tolerance; D. a sum of zero.
  18. To obtain elapsed time after n steps of size dt from time zero, which expression avoids repeatedly adding an inexact decimal? A. n times dt; B. dt plus dt regardless of n; C. n plus dt; D. dt divided by n.
  19. Replacing an infinite series with only its first few terms creates primarily A. overflow; B. measurement error; C. implementation error; D. truncation error.
  20. Your program accurately solves the equations you wrote, but the predicted population disagrees with field observations because the model omits migration. This is primarily A. numerical error; B. model error; C. overflow; D. a faulty plotting command.
  1. A. A fixed percentage of the current balance gives unconstrained growth.
  2. C. At carrying capacity, the logistic growth factor is zero.
  3. A. \(12\) units/day \(\times 0.25\) day \(=3\) units.
  4. B. The species compete for the same limited resource.
  5. B. With predators fixed, more prey means more encounters.
  6. B. Recovery transfers people from \(I\) to \(R\).
  7. C. R indexing starts at 1, so the third element is 11.
  8. B. \(|190-200|/200=0.05=5\%\).
  9. A. A value beyond the representable range is overflow.
  10. B. Changing the step size tests numerical sensitivity, not real-world validity.
  11. B. The decimal goes immediately before the first nonzero digit.
  12. B. The significant digits are 6, 2, and the final 0.
  13. C. Magnitude is the power of ten, \(10^{-2}\), not the exponent \(-2\).
  14. C. The program mishandles otherwise correct units: implementation error.
  15. A. Finite representation leads to round-off error.
  16. B. An extremely small nonzero result may underflow.
  17. C. Compare the absolute difference with a justified tolerance.
  18. A. Calculate time from the step count instead of repeated additions.
  19. D. Stopping an infinite process after finitely many terms causes truncation error.
  20. B. Omitting migration is a model error, even if the code runs correctly.

Matching practice

Match each new scenario to a model. Use each letter once: A. unconstrained growth or decay; B. constrained growth; C. competition; D. predator–prey; E. SIR.

  1. People move from susceptible to infectious to recovered groups.
  2. Two shark species share a limited food supply, reducing each other’s growth.
  3. A medicine’s amount falls by a fixed fraction of its current amount each hour.
  4. Owls eat mice; encounters reduce mice and can benefit owls.
  5. A population grows quickly when small but slows near a carrying capacity.

1 E (SIR transfers); 2 C (competition); 3 A (unconstrained decay); 4 D (predator–prey); 5 B (constrained growth).

R code-reading practice

The exam’s code questions will be short and selected-response. These examples use familiar R assignments and indexing; you will not have to write a program.

1. Which model does this update implement?

old <- population[i - 1]
growth <- rate * old * (1 - old / capacity)
population[i] <- old + growth * delta_t

A. Unconstrained growth; B. constrained growth; C. competition; D. SIR.

2. What value is stored in population[2]?

population <- c(80, NA)
rate <- 0.1
population[2] <- population[1] + rate * population[1]

A. 8; B. 80; C. 88; D. 90.

3. The rate is per year, but delta_t is half a year. What fix does this update need?

delta_t <- 0.5
old <- population[i - 1]
growth_rate <- rate * old
population[i] <- old + growth_rate

A. Replace old with population[i]; B. multiply growth_rate by delta_t in the final line; C. set rate to zero; D. remove the old-value assignment.

1 B. The factor \((1-\text{old}/\text{capacity})\) limits growth near carrying capacity. 2 C. \(80+0.1(80)=88\). 3 B. A rate in population/year must be multiplied by the half-year time step; the change is only half the annual rate.

Two short calculation practices

  1. A population starts at 80. Its rate is \(0.25P(1-P/160)\) individuals/year. With a one-year step, find the initial rate and next population.
  2. A closed SIR population has \(S=800\), \(I=200\), \(R=0\), and \(N=1000\). For this problem, infection is \(0.1SI/N\) people/day and recovery is \(0.05I\) people/day. With a one-day step, find both flows and the next \(S\), \(I\), and \(R\).
  1. Initial rate \(=0.25(80)(1-80/160)=10\) individuals/year. Over one year, the change is \(10(1)=10\) and the next population is \(80+10=90\).
  2. Infection flow \(=0.1(800)(200)/1000=16\) people/day; recovery flow \(=0.05(200)=10\) people/day. After one day: \(S=800-16=784\), \(I=200+16-10=206\), and \(R=0+10=10\). The total remains 1000.

More computational-error practice

Work these out before opening the answers. For notation questions, use the book’s normalized form, not ordinary scientific notation.

  1. Write \(0.00007200\) in normalized exponential notation. Give its precision and magnitude.
  2. Write the integer \(48{,}200\) in normalized exponential notation. Give its precision and magnitude, treating trailing zeros in an integer without a decimal point as the book does.
  3. Write \(0.003040\) in normalized exponential notation. Give its precision and magnitude. Which zeros count?
  4. A reference count is 80 fish and your simulation predicts 76 fish. Find the absolute error, relative error as a fraction, and percent relative error.
  5. A reference value is exactly 0 and your simulation returns 0.2. Find the absolute error. Can you compute relative error with the formula in this guide?
  6. Classify each primary source of error as data, model, implementation, or numerical: (a) an uncalibrated sensor records temperature; (b) a model leaves out seasonal migration; (c) code subtracts a flow that should be added; (d) a coarse Euler step changes the computed result appreciably.
  7. Why might 0.1 + 0.2 == 0.3 be false in R? Write a test for closeness using a small positive tolerance.
  8. Consider the arithmetic expressions \((10^{16}-10^{16})+1\) and \(10^{16}+(-10^{16}+1)\). Both equal 1 in exact arithmetic. Why can floating-point results differ?
  9. A program advances time by repeatedly adding \(0.1\) ten times. Give a less accumulation-prone way to compute the time after ten steps. Is either method guaranteed to represent \(0.1\) exactly?
  10. A computation produces a result too large to represent; another produces a nonzero result too small to represent normally. Name each condition.
  11. The exact mathematical answer is 100. Euler steps of size 1 and 0.5 produce 92 and 96, respectively. Find each absolute error. What does the comparison support, and what does it not establish about the real-world model?
  1. \(0.7200\times10^{-4}\); precision 4; magnitude \(10^{-4}\). The two final zeros after the decimal are significant.
  2. \(0.482\times10^5\); precision 3; magnitude \(10^5\). The final two zeros of this written integer are not counted as significant under the book’s convention.
  3. \(0.3040\times10^{-2}\); precision 4; magnitude \(10^{-2}\). The zero between 3 and 4 and the final zero count; leading zeros do not.
  4. Absolute error \(=|76-80|=4\) fish. Relative error \(=4/80=0.05\), or 5%.
  5. Absolute error \(=|0.2-0|=0.2\). Relative error is undefined here because its denominator is zero.
    1. Data; (b) model; (c) implementation; (d) numerical. The categories describe where the discrepancy enters.
  6. Decimal fractions such as 0.1 and 0.2 are not necessarily represented exactly in binary floating point. Use abs((0.1 + 0.2) - 0.3) < tolerance with an appropriately chosen positive tolerance.
  7. Finite precision can round the 1 away when it is added to a much larger magnitude, so algebraically equivalent groupings need not produce identical stored results.
  8. Compute 10 * 0.1 (more generally, n * dt) from the step count. This avoids repeated-addition accumulation, but \(0.1\) still need not be stored exactly.
  9. The first is overflow; the second is underflow.
  10. The absolute errors are \(|92-100|=8\) and \(|96-100|=4\). The smaller step improved this numerical approximation in this example. It does not prove that the equations and assumptions describe the real population correctly.

Outside this exam

You will not be asked to label textbook diagrams, memorize differential equations, write a complete R program, use Quarto syntax, find an exact analytic solution, derive logistic growth with calculus, or solve the strep practice module that we have not covered.

Back to top