Limits

A limit describes the value a function or sequence approaches as its input moves toward some point. Biology is full of such limiting behaviour: 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, limnan=L\lim_{n\to\infty} a_n = L means the terms ana_n get and stay arbitrarily close to LL. Formally (ϵ\epsilon-definition): for every ϵ>0\epsilon > 0 there exists an NN such that

n>N    anL<ϵ.n > N \implies |a_n - L| < \epsilon.

If such an LL exists the sequence converges; otherwise it diverges.

Properties of limits

If liman=A\lim a_n = A and limbn=B\lim b_n = B, then

lim(an+bn)=A+B,lim(anbn)=AB,limanbn=AB (B0).\lim (a_n + b_n) = A + B,\quad \lim (a_n b_n) = AB,\quad \lim \frac{a_n}{b_n} = \frac{A}{B}\ (B \neq 0).

L’Hôpital’s rule

For an indeterminate form 00\tfrac{0}{0} or \tfrac{\infty}{\infty},

limxcf(x)g(x)=limxcf(x)g(x).\lim_{x\to c}\frac{f(x)}{g(x)} = \lim_{x\to c}\frac{f'(x)}{g'(x)}.

Example: limx0sinxx\displaystyle \lim_{x\to 0}\frac{\sin x}{x} is 00\tfrac{0}{0}. Differentiating top and bottom gives limx0cosx1=cos0=1\lim_{x\to 0}\frac{\cos x}{1} = \cos 0 = 1. The same 00\tfrac{0}{0} 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 an=3n+1n=3+1na_n = \frac{3n + 1}{n}= 3 + \frac{1}{n}. As nn grows, 1/n01/n \to 0, so an3a_n \to 3. Checking ϵ=0.01\epsilon = 0.01: we need an3=1/n<0.01|a_n - 3| = 1/n < 0.01, i.e. n>100n > 100.

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, Xˉnpμ\bar{X}_n \xrightarrow{p} \mu — a probabilistic limit. Understanding ordinary limits first makes these stochastic versions far less mysterious.