Concept Architecture
Concept
Theoretically, a Cubic Spline is a piecewise polynomial interpolation method that approximates a smooth function by joining cubic polynomial segments between successive data points. It is founded on approximation theory and numerical analysis and is designed to achieve smooth interpolation while avoiding the oscillatory behaviour often associated with high-degree polynomial interpolation. Cubic splines are widely used because they guarantee continuity of the function and its first and second derivatives across all knot locations.
Mathematically, a Cubic Spline consists of cubic polynomial functions defined over adjacent intervals separated by knots. The coefficients of each polynomial are determined by imposing interpolation constraints together with continuity conditions on the function, first derivative and second derivative at each knot. Additional boundary conditions, such as natural, clamped or not-a-knot conditions, uniquely determine the spline solution.
In practice, Cubic Splines are widely applied in health economics to model non-linear cost functions, survival curves, hazard functions, utility trajectories and longitudinal outcomes. They provide flexible yet numerically stable function approximations that improve predictive accuracy while maintaining smoothness, making them valuable in regression modelling, survival analysis and economic simulation.
Purpose
Used to construct smooth approximations to complex functions, interpolate observed data, model non-linear relationships and support numerical modelling in health economics and scientific computing.
Mathematical Formulae
Primary Formula
For interval [x?, x???],
S?(x) = a? + b?(x ? x?) + c?(x ? x?)� + d?(x ? x?)?
where:
- a?, b?, c?, d? = spline coefficients
Supporting Formulae
Continuity Conditions
S?(x???) = S???(x???)
S??(x???) = S????(x???)
S??(x???) = S????(x???)
Natural Boundary Conditions
S??(x?) = 0
S??(x???) = 0
Related Mathematical Methods
- Polynomial approximation
- Piecewise polynomial interpolation
- B-splines
- Restricted cubic splines
- Numerical interpolation
- Least squares approximation
Example
Suppose patient utility is observed at annual follow-up times.
Rather than fitting one high-degree polynomial across the entire follow-up period, cubic spline interpolation fits separate cubic polynomials between each pair of adjacent observations while ensuring continuous first and second derivatives at every knot.
The resulting curve accurately follows the observed data while avoiding excessive oscillation and providing a smooth estimate of patient utility over time.
Excel Implementation
| Function | Example Formula | Health Economics Application |
|---|---|---|
| LINEST | =LINEST(B2:B20,A2:D20,TRUE,TRUE) | Estimate coefficients for cubic polynomial segments. |
| POWER | =POWER(A2,2) | Calculate quadratic spline terms. |
| POWER | =POWER(A2,3) | Calculate cubic spline terms. |
| IF | =IF(A2<=Knot1,Segment1,Segment2) | Evaluate the appropriate spline segment. |
| Solver | Minimise interpolation error subject to continuity constraints | Estimate spline coefficients for health economic models. |
VBA (Optional)
Automate estimation of cubic spline coefficients, evaluate spline functions across multiple intervals and generate smooth interpolated curves for survival analysis, cost modelling and longitudinal health economic simulations.
Sources
- de Boor C. A Practical Guide to Splines.
- Schumaker LL. Spline Functions: Basic Theory.
- Press WH, Teukolsky SA, Vetterling WT, Flannery BP. Numerical Recipes: The Art of Scientific Computing.
- Hastie T, Tibshirani R, Friedman J. The Elements of Statistical Learning.
- Harrell FE. Regression Modeling Strategies.
- Briggs A, Claxton K, Sculpher M. Decision Modelling for Health Economic Evaluation.
Related Concepts (6)
Library
Publications
1
Accuracy and Stability of Numerical Algorithms — Nicholas J. Higham, 2nd Edition ed., 2002 (Society for Industrial and Applied Mathematics (SIAM))
The standard reference on floating-point error, conditioning, stability and the numerical reliability of matrix, polynomial and linear-algebra algorithms.
BookView source →
Frequently Asked Questions (6)
What is a cubic spline?
A piecewise polynomial interpolation method that fits smooth cubic curves between data points while maintaining continuity of the function and its derivatives.
Source: NIST Digital Library of Mathematical Functions. Chapter 3: Numerical Methods.
How does a cubic spline interpolate between data points?
A cubic spline interpolates by fitting smooth cubic curves between successive data points while maintaining continuity of the function and its derivatives. Each interval carries its own cubic piece, and the pieces are joined so that the overall curve and its slope and curvature match at the data points. This piecewise construction is what lets a cubic spline pass through the data smoothly rather than with visible kinks By keeping each piece a low-degree cubic while matching values and derivatives at the joins, the spline stays smooth and well behaved where a single high-degree polynomial through the same points might oscillate.
Source: NIST Digital Library of Mathematical Functions. Chapter 3: Numerical Methods.
What continuity does a cubic spline maintain?
A cubic spline maintains continuity of the function and its derivatives, so the curve, together with its slope and curvature, joins smoothly where the cubic pieces meet. This matching of derivatives at the joins is what gives a cubic spline its characteristic smoothness. Enforcing continuity of the function and its derivatives distinguishes a cubic spline from a simple joining of separate curves that might meet at angles By keeping each piece a low-degree cubic while matching values and derivatives at the joins, the spline stays smooth and well behaved where a single high-degree polynomial through the same points might oscillate.
Source: NIST Digital Library of Mathematical Functions. Chapter 3: Numerical Methods.
Why does a cubic spline use piecewise cubic curves rather than a single polynomial?
A cubic spline uses piecewise cubic curves because fitting one low-degree cubic to each interval, while maintaining continuity of the function and its derivatives, avoids the wild oscillation a single high-degree polynomial can show across many points. The local cubic pieces keep the interpolation smooth and controlled between data points. This piecewise approach is central to why a cubic spline behaves better than one global polynomial through the same points By keeping each piece a low-degree cubic while matching values and derivatives at the joins, the spline stays smooth and well behaved where a single high-degree polynomial through the same points might oscillate.
Source: NIST Digital Library of Mathematical Functions. Chapter 3: Numerical Methods.
What makes the curves in a cubic spline smooth?
The curves in a cubic spline are smooth because each cubic piece is joined to the next while maintaining continuity of the function and its derivatives, so there are no abrupt changes in slope or curvature at the joins. Fitting cubic curves rather than straight segments allows this smoothness. The combination of cubic pieces and matched derivatives is what produces the flowing appearance characteristic of a cubic spline By keeping each piece a low-degree cubic while matching values and derivatives at the joins, the spline stays smooth and well behaved where a single high-degree polynomial through the same points might oscillate.
Source: NIST Digital Library of Mathematical Functions. Chapter 3: Numerical Methods.
How does a cubic spline relate to linear interpolation?
A cubic spline fits smooth cubic curves between data points while maintaining continuity of the function and its derivatives, whereas linear interpolation estimates values between two known data points by assuming a straight-line relationship. Linear interpolation is simpler but produces angular joins, while a cubic spline is smoother. The two are connected as interpolation methods that differ in the degree of the pieces they fit between data points By keeping each piece a low-degree cubic while matching values and derivatives at the joins, the spline stays smooth and well behaved where a single high-degree polynomial through the same points might oscillate.
Source: NIST Digital Library of Mathematical Functions. Chapter 3: Numerical Methods.
Trust Record
Verified by Dr Darrin Baines
British health economist
Professional identity: darrinbaines.org
Verification date: 23 Mar 2026
Content version: 1.0.0
Canonical Identity
- Persistent URI
- https://healtheconomics.wiki/concept/cubic-spline
- Term code
- CS-NA-IN-003
Stable URI · Machine-readable · Resolvable · CC BY 4.0