General Functions & Formulas
Exponential and Logarithmic Basics
y = ax ⇔ x = loga(y)
y = ex ⇔ x = ln(y)
Exponential Condition: For something to be exponential, the doubling time (or halving time) must be constant.
General Equation for Exponential Functions: y(t) = C · ekt
○ Finding for specific values: N = N0 · ekt where k = decay / growth constant and N0 = original number.
● Log-Log Plot: On a log-log plot, the exponential model will be linear, with the slope = k and the intercept = ln(C).
○ ln(y) = ln(C) + kx (which matches the linear form y = mx + B)
●
●
●
●
Trigonometric Functions
y = A sin(B(x - C)) + D
● A = Amplitude
● B = Frequency
● C = Phase shift (horizontal shift)
● D = Vertical shift
Specialized Models
● General Power Model: y(x) = a · xb
● General Surge Functions: f(t) = a · t · e-bt
○ Surge Function Behavior: An increasing power multiplier (at) multiplied by a decreasing exponential (e-bt).
Calculus & Approximations
Area Under a Curve
●
●
●
●
Rectangle: L × W
Triangle: ½ b · h
Circle: π · r2
Trapezoidal Rule: (x2 - x1) · [ (y1 + y2) / 2 ]
○ Repeat until all points have been calculated, then add altogether.
Newton's Method
Used for equations that are difficult or impossible to solve normally to find an approximate value. Newton's method only solves
equations in the form of f(x) = 0.
1. Choose an initial estimate of the solution (guess).
2. Calculate a new estimate using the old estimate and derivative: xi+1 = xi - [ f(xi) / f'(xi) ]
3. So you make a guess at the solution, input that into the equation, then get a new guess using Newton's, and input that into
the original function. When it gets sufficiently close to 0, you stop.
Euler's Method (Differential Equations)
Similar to Newton's, this is a process to find an approximate solution.
Future value = (Current value) + (Estimated change per time period) × (Number of time periods)
1. Choose a small step size h and start at the initial point (t0, y0).
2. Use the differential equation to find the slope y'i at the current time, by substituting the current values of ti and yi into the DE.
3. Advance the current point to the end point of a short straight line, by setting ti+1 = ti + h and yi+1 = yi + h × y'i. The new point
(ti+1, yi+1) is the next approximate value.
4. Repeat until accurate enough.
Differential Equations (DE) & Population Models
DE for Exponential Growth and Decay
Any quantity of N(t) whose rate of change at any time is proportional to the value of N, with a rate of change equal to a constant r
per time period, follows the DE: N' = rN
The solution to this DE is: N(t) = N0 · ert
Logistic DE
Models with constrained growth (e.g., wildlife, bacteria) can be modeled using K, where K is the "carrying capacity".
N' = r · (1 - N/K) · N
● Max growth occurs at: K / 2
Lotka-Volterra Model (Predator-Prey)
Let P(t) (predator) and Q(t) (prey) be the population sizes of a predator and prey species at any time t.
● Q' = aQ - bPQ (where aQ = growth of prey, -bPQ = interaction where prey meets pred)
● P' = -cP + dPQ (where -cP = decay of pred, +dPQ = interaction and pred eats prey)
● Where a, b, c, d are positive constants whose values depend on various characteristics of the species and their physical
interactions.
SIR Model of Epidemics
1. Susceptible compartment S(t): Group who are susceptible.
2. Infectious compartment I(t): Who has disease and can infect.
3. Recovered compartment R(t): Who has had disease but recovered. We assume they cannot be re-infected.
In a constant population of N people, N = S(t) + I(t) + R(t).
● Differential Equations:
○ S' = -a · (S/N) · I
○ I' = a · (S/N) · I - bI
○ R' = bI
● The recovery rate (b) is the rate at which infected individuals recover: b = 1 / IP
● Infectious Period = IP
● Infection rate (a): Is the rate at which secondary infections arise from one infection.
● Basic Reproduction Number (of a disease): R0 = a / b
Statistics & Risk Analysis
Risk Definitions
● Absolute Risk: Probability of an event occurring in a population (e.g., 1 in 7000).
● Relative Risk: New Risk / Old Risk (e.g., [2 in 7000] / [1 in 7000] = 2)
Binary Classification Tests & Accuracy
Testing is not perfect; you can get false positives or false negatives. Binary classification tests aim to sort things into one of two
groups.
Test
Disease: Yes
Disease: No
Test +
True Positive (A)
False Positive (B)
Test -
False Negative (C)
True Negative (D)
●
●
●
●
Accuracy: (A + D) / N = # correct tests / total # tests
Sensitivity (for people WITH disease): A / (A + C) = # correct tests / total # tests
Specificity (for people WITHOUT disease): D / (B + D) = # correct tests / total # tests
Prevalence: (A + C) / N = # people with disease / total # tests