Author-reviewedEvidence: highv1.0.1

Taylor Series Expansion

A Taylor series expansion approximates a function near a point by a polynomial built from its derivatives, used in health economics for the delta method.

Last reviewed byDr Darrin Baines

Concept Architecture

Taylor Series Expansion in Health Economic Models

A Taylor series expansion rewrites a curved function as a sum of simple terms, each built from one derivative of the function at a chosen point and a power of the distance from that point. Close to the point, a few terms are enough to reproduce the function with small error. Health economists rarely meet the expansion on its own, yet it sits behind routine calculations such as standard errors for derived quantities, the shortcut of treating a rate as a cycle probability and the gap between deterministic and probabilistic model results. The first-order term turns a curve into a straight line, and the second-order term measures how much the curve bends, which is why uncertainty about a parameter can shift expected costs and QALYs in a Markov model. It is one of the numerical methods, with an error that can be bounded explicitly.

Polynomials built from derivatives at one point

Strang and Herman, in the OpenStax calculus text, define the Taylor series of a function with derivatives of all orders at a point aa as an infinite sum of derivative terms. When a=0a = 0 the series is called the Maclaurin series.

f(x)=∑n=0∞f(n)(a)n!(x−a)n=f(a)+f′(a)(x−a)+f′′(a)2!(x−a)2+⋯f(x) = \sum_{n=0}^{\infty} \frac{f^{(n)}(a)}{n!}(x - a)^{n} = f(a) + f'(a)(x - a) + \frac{f''(a)}{2!}(x - a)^{2} + \cdots

where ff is the function being approximated, aa is the expansion point, xx is the value at which the function is wanted, f(n)(a)f^{(n)}(a) is the nnth derivative of ff evaluated at aa, and n!n! is nn factorial. In practice the sum is cut short. The same text calls the nnth partial sum the nnth Taylor polynomial.

pn(x)=f(a)+f′(a)(x−a)+f′′(a)2!(x−a)2+⋯+f(n)(a)n!(x−a)np_{n}(x) = f(a) + f'(a)(x - a) + \frac{f''(a)}{2!}(x - a)^{2} + \cdots + \frac{f^{(n)}(a)}{n!}(x - a)^{n}

where pn(x)p_{n}(x) is the polynomial of degree nn that matches the value and the first nn derivatives of ff at aa. The first-order polynomial p1p_{1} is the tangent line, and the second-order polynomial p2p_{2} adds a curvature term. A modeller who expands around the point estimate of a parameter therefore gets a local description of how the model output responds to that parameter.

How large the truncation error can be

The value of the expansion lies in knowing when a short polynomial is good enough. Strang and Herman define the remainder as the difference between the function and its Taylor polynomial, and Taylor's theorem with remainder gives its form.

Rn(x)=f(x)−pn(x)=f(n+1)(c)(n+1)!(x−a)n+1R_{n}(x) = f(x) - p_{n}(x) = \frac{f^{(n+1)}(c)}{(n+1)!}(x - a)^{n+1}

where Rn(x)R_{n}(x) is the error left after nn terms and cc is some number between aa and xx. If the next derivative is bounded in absolute value by a number MM over the interval, the theorem gives ∣Rn(x)∣≤M ∣x−a∣n+1/(n+1)!|R_{n}(x)| \le M\,|x - a|^{n+1}/(n+1)!. The bound shrinks with the factorial and grows with the (n+1)(n + 1)th power of the distance between xx and aa, so the approximation is local. For a sequence of Taylor polynomials to converge to the function, the remainder must tend to zero, which does not happen for every function or every distance.

First-order terms behind the delta method

The best-known statistical use of the expansion is the delta method. Feiveson's Stata FAQ describes the delta method as expanding a function of a random variable about its mean, usually with a one-step Taylor approximation, and then taking the variance. Because the linear term carries all the randomness, the variance of the output is approximately the squared slope times the variance of the input.

Var⁡[g(X)]≈[g′(μ)]2Var⁡(X)\operatorname{Var}\left[g(X)\right] \approx \left[g'(\mu)\right]^{2} \operatorname{Var}(X)

where XX is an uncertain input with mean μ\mu, gg is a differentiable function of it and g′(μ)g'(\mu) is the first derivative at the mean. Feiveson adds that this is a good approximation only if XX has a high probability of being close enough to its mean for the Taylor approximation to hold. With several inputs the slope becomes a gradient and the input variance becomes a variance-covariance matrix. The delta method page works through the full calculation, including the ratio case used for the ICER.

Second-order terms and the gap between deterministic and probabilistic results

The first-order term has an expected value of zero when the expansion is taken at the mean, so it cannot move the mean of the output. The second-order term can. Taking expectations of the second-order polynomial around the mean gives a correction for curvature.

E[g(X)]≈g(μ)+12 g′′(μ) Var⁡(X)E\left[g(X)\right] \approx g(\mu) + \tfrac{1}{2}\, g''(\mu)\, \operatorname{Var}(X)

where E[g(X)]E[g(X)] is the expected value of the model output, g(μ)g(\mu) is the output at the mean input and g′′(μ)g''(\mu) is the second derivative there. With several inputs the correction becomes one half of the sum of each second partial derivative multiplied by the matching variance or covariance. When gg is a straight line the second derivative is zero and the output at the mean equals the mean output. When gg curves upwards the mean output is larger, and when it curves downwards it is smaller.

This is the mechanism behind the NICE position on probabilistic sensitivity analysis. The NICE manual (PMG36, section 4.7.12) states that the committee's preferred cost-effectiveness estimate should be derived from a probabilistic analysis when possible unless the model is linear. Section 4.7.13 explains non-linear as meaning that there is no straightforward linear relationship between changes in a model's inputs and outputs, and section 4.7.17, on deterministic sensitivity analysis, adds that if the model is non-linear, deterministic analysis will be less appropriate for decision making. The ISPOR-SMDM task force report on parameter estimation and uncertainty notes that some commentators have argued that probabilistic analysis is required to generate appropriate expected values in non-linear models. The second-order term approximates the size and sign of that shift for a given parameter before any simulation is run.

Other places the expansion appears in modelling

Several standard modelling steps rest on the same expansion, even when it is not named. In each case a short polynomial stands in for a curved function, and the size of the neglected terms decides whether the shortcut is safe.

  1. Rates and probabilities. The constant-rate conversion used in rate-to-probability conversion, p=1−e−rtp = 1 - e^{-rt}, has the Maclaurin polynomial rt−(rt)2/2+(rt)3/6rt - (rt)^{2}/2 + (rt)^{3}/6. Keeping only the first term gives the shortcut of treating the rate as the probability, which works for small rtrt and fails for large ones.
  2. Skewed costs on the log scale. If log costs are normal with standard deviation σ\sigma, the log-normal mean is the geometric mean multiplied by eσ2/2e^{\sigma^{2}/2}. The second-order expansion replaces that factor with σ2/2\sigma^{2}/2 plus 1, which is close for small σ\sigma and too low for wide spreads. At σ=1\sigma = 1 the expansion gives a factor of 1.5 against an exact 1.649.
  3. Root finding and calibration. The Newton-Raphson method replaces a function with its tangent line, the first-order Taylor polynomial, and moves to the point where that line crosses zero. Strang and Herman describe the technique as one that makes use of tangent line approximations. Calibration and threshold searches can use it.
  4. Numerical derivatives. Subtracting the expansions of f(x+h)f(x + h) and f(x−h)f(x - h) cancels the even-order terms, so the central finite difference has an error proportional to h2h^{2}, against hh for a one-sided difference.

Worked example with an uncertain death rate

All numbers in this example are illustrative. A simple cohort model uses a constant annual death rate λ\lambda with mean 0.25 and standard deviation 0.05, represented in the probabilistic analysis by a gamma distribution with shape 25 and rate 100. Survival time is exponential, so mean life expectancy is λ−1\lambda^{-1}, and each life year carries a utility of 0.8 with no discounting.

1. Annual probability of death. Writing rr for the rate, at the mean rate of 0.25 the exact annual probability is p=1−e−0.25=0.221199p = 1 - e^{-0.25} = 0.221199. The first-order polynomial gives 0.25, an error of 0.028801, or 13.0% of the true value. The second-order polynomial gives p2=0.25−0.0625/2=0.21875p_{2} = 0.25 - 0.0625/2 = 0.21875, an error of minus 0.002449. The third-order polynomial adds a cubic term, r3/6=0.015625/6=0.002604r^{3}/6 = 0.015625/6 = 0.002604, to give 0.221354, an error of 0.000155.

2. Check the error bound. The third derivative of p=1−e−rp = 1 - e^{-r} is e−re^{-r}, which is at most 1 for rates between 0 and 0.25. The remainder bound for the second-order polynomial is therefore r3/6r^{3}/6 with r=0.25r = 0.25, or 0.002604, and the actual error of 0.002449 lies inside it.

3. Repeat for a small rate. At a rate of 0.02 the exact probability is 0.019801 and the first-order shortcut gives 0.02, an error of 0.000199, or 1.0%. The shortcut is acceptable for rare events and poor for common ones.

4. Deterministic life expectancy. At the mean rate, life expectancy is 1 divided by 0.25, or 4 years, and QALYs are 0.8 times 4, or 3.2.

5. Second-order correction. For g(λ)=λ−1g(\lambda) = \lambda^{-1} the second derivative is g′′(λ)=2λ−3g''(\lambda) = 2\lambda^{-3}, which is 128 at 0.25. The correction is 0.5 times 128 times the variance of 0.0025, or 0.16, so expected life expectancy is about 4.16 years and expected QALYs about 0.8 times 4.16, or 3.328.

6. Exact answer. For a gamma distribution with shape 25 and rate 100, the mean of λ−1\lambda^{-1} is 100 divided by 24, which is 4.1667 years and 3.3333 QALYs. A simulation of one million draws gave 4.168 years. The second-order expansion captures 0.16 of the 0.1667 gap between the deterministic and probabilistic results.

7. First-order spread. The delta method gives a standard deviation for life expectancy of 0.05 divided by the square of 0.25, or 0.80 years. The exact value for this gamma distribution is 0.869 years, so the linear approximation understates the spread by about 8%.

8. Interpretation. Because λ−1\lambda^{-1} curves upwards, uncertainty in the death rate raises expected survival, and a deterministic run at the mean rate understates QALYs by about 0.13. The second-order term predicts the direction and nearly all of the size of this gap, which is the information needed to decide whether a probabilistic base case changes the result.

Choices that change the approximation

The quality of a Taylor approximation depends on choices made by the analyst. The expansion point matters most. Expanding at the mean makes the first-order term average to zero, while expanding at a median or mode leaves a first-order bias as well.

The order of the polynomial sets the trade-off between effort and accuracy. A first-order term ignores curvature, while a second-order term captures it near the centre of the distribution. The scale of the input also matters, since a rate and a log rate give different polynomials with different errors. Where inputs are correlated, the second-order correction needs their covariance terms, and leaving them out can move the corrected mean in either direction.

Relation to neighbouring methods

Several better-known methods are built on the expansion or compete with it. The delta method uses its first-order term to approximate variances. Newton-Raphson iteration uses the same term to find roots.

Simulation methods solve the same problems without derivatives. Monte Carlo simulation in probabilistic sensitivity analysis gives the expected output directly, at the cost of run time and Monte Carlo error. Bootstrapping gives sampling distributions for statistics computed from patient data, and the Fieller method gives ratio intervals that do not rely on linearisation. The expansion remains useful for checking simulation output and for explaining why deterministic and probabilistic results differ.

Limitations and common misreadings

A common error is to treat a first-order approximation as exact when the input is uncertain enough to reach the curved part of the function. The worked example shows a 13% error in the annual probability of death when the rate is treated as a probability at a rate of 0.25.

  1. Assuming the mean output equals the output at the mean. The two are guaranteed to match only for linear functions, in line with the PMG36 preference for probabilistic results in non-linear models.
  2. Using an expansion far from its centre. Tail values of a wide distribution can be poorly approximated even when the centre is well described.
  3. Trusting higher orders blindly. Extra terms need higher moments of the input, and for some functions the series converges only within a limited distance of the expansion point.
  4. Applying it to non-differentiable functions. Zepeda-Tello and colleagues note that the delta method will not work for non-differentiable functions such as indicators, maximums and absolute values. A decision rule that picks the option with the highest net benefit is such a maximum.

Sources

Library

Publications

1
  • Book

    Statistical Analysis of Cost-Effectiveness Data — Willan & Briggs, 1st Edition ed., 2006 (John Wiley & Sons)

    A synthesis of statistical methods for analysing cost-effectiveness data, including net-benefit regression, confidence intervals for the ICER, cost-effectiveness acceptability curves, and covariate adjustment. Part of the Wiley Statistics in Practice series.

Frequently Asked Questions (6)

  • What is a Taylor series expansion?

    A Taylor series expansion approximates a function near a point by a polynomial built from its derivatives, used in health economics for the delta method.

    Source: Strang & Herman 2016

  • What does a Taylor series expansion approximate?

    Any function with derivatives at a chosen point can be approximated by a Taylor series expansion, which replaces it with a polynomial whose terms pair each derivative at that point with a power of the distance from it. Close to the point, a few terms reproduce the function with small error, but the approximation is local and can fail further away. In health economic models the function is often a model output viewed as a function of one uncertain parameter, such as life expectancy as a function of a death rate. Standard conversions, such as turning a constant rate into a cycle probability, can be approximated the same way.

    Source: Strang & Herman 2016

  • How does a Taylor series expansion work?

    Each term of a Taylor series expansion takes one derivative of the function at the expansion point, divides it by the factorial of its order and multiplies it by the matching power of the distance from that point. Adding the terms up to order n gives the nth Taylor polynomial, which matches the value and the first n derivatives of the function at the point. The first-order polynomial is the tangent line, and the second-order polynomial adds a term for curvature. Taylor's theorem with remainder bounds the error left after n terms, and the bound shrinks with the factorial but grows with the distance from the expansion point.

    Source: Strang & Herman 2016

  • Why is a Taylor series expansion used in statistics?

    The best-known statistical use of a Taylor series expansion is the delta method, which expands a function of a random variable about its mean, usually to first order, and then takes the variance. The variance of the output is then approximately the squared slope at the mean times the variance of the input, and with several inputs the slope becomes a gradient applied to a variance-covariance matrix. This gives standard errors for derived quantities without simulation. Feiveson warns that the result is a good approximation only when the input has a high probability of lying close enough to its mean for the linear term to hold.

    Source: Feiveson 1999

  • What is a first-order Taylor series expansion?

    A first-order Taylor series expansion keeps only the value of the function and its first derivative at the expansion point, so the curve is replaced by its tangent line. This linear term underlies the delta method for variances and the Newton-Raphson method for finding roots. Treating a constant rate as a cycle probability is also a first-order shortcut, since the first term of one minus the exponential of minus the rate is the rate itself. The shortcut is close for rare events but poor for common ones, with an error of about 13% at an annual rate of 0.25. Expanded at the mean, the first-order term averages to zero and cannot move the expected output.

    Source: Strang & Herman 2016

  • What are the limitations of a Taylor series expansion?

    A Taylor series expansion describes a function well only near its expansion point, so tail values of a wide input distribution can be poorly approximated even when the centre is well described. A first-order version ignores curvature, so it cannot capture the gap between the output at the mean input and the mean output in a non-linear model. Higher orders need higher moments of the input, and for some functions the series converges only within a limited distance. The method also needs derivatives, and Zepeda-Tello and colleagues note that the delta method fails for non-differentiable functions such as maximums, which include a decision rule choosing the option with the highest net benefit.

    Source: Zepeda-Tello et al. 2022

Trust Record

Verified by Dr Darrin Baines

British health economist

Professional identity: darrinbaines.org

Verification date: 29 Oct 2026

Content version: 1.0.1

Canonical Identity

Term code
HE-ES-SA-212

Stable URI · Machine-readable · Resolvable · CC BY 4.0