Limits
A limit describes the value a function or sequence approaches as its input moves toward some point. Biology is full of such limiting behaviors: as an epidemic runs its course the susceptible fraction approaches a fixed limit — the final epidemic size — and long-run averages of case counts converge. Limits are the foundation of derivatives, integrals, and the convergence theorems that make statistical inference work.
Intuitive and formal definition#
Intuitively, means the terms get and stay arbitrarily close to . Formally (-definition): for every there exists an such that
If such an exists the sequence converges; otherwise it diverges.
Properties of limits#
If and , then
L’Hôpital’s rule#
For an indeterminate form or ,
Example: is . Differentiating top and bottom gives . The same manoeuvre appears in disease models when taking small-time or large-population approximations, such as recovering a per-capita infection rate as a time interval shrinks to zero.
Worked example#
Consider . As grows, , so . Checking : we need , i.e. .
Computing it#
R#
# Numerically approach lim_{x->0} sin(x)/x
x <- 10^(-(1:6))
sin(x) / x # 0.9983..., -> 1
Python#
import sympy as sp
x, n = sp.symbols("x n")
print(sp.limit(sp.sin(x)/x, x, 0)) # 1
print(sp.limit((3*n + 1)/n, n, sp.oo)) # 3
1
3
Julia#
using Symbolics
@variables x
# Numeric check of sin(x)/x near 0
xs = 10.0 .^ (-(1:6))
sin.(xs) ./ xs # -> 1.0
Why it matters for statistics#
Convergence of sequences of random quantities is the engine of large-sample theory. The Weak Law of Large Numbers says the sample mean converges in probability to the true mean, — a probabilistic limit. Understanding ordinary limits first makes these stochastic versions far less mysterious.