Courses / Mathematics I
Scientific Programming

Interpolation and Curve Fitting

Mathematics I 185 words Free to read

Interpolation Basics

Given data points, we often want a function to fill gaps or make predictions. Interpolation finds a function passing exactly through every data point.

Given n+1n+1 points, there is a unique interpolating polynomial of degree nn. Spline interpolation joins points with low-degree cubic pieces, matching smoothly.

ApproachGoalData Assumption
InterpolationExact matchData are exact
Curve FittingMinimize errorData have noise

A single high-degree polynomial can oscillate wildly (Runge's phenomenon). Splines avoid this by using piecewise low-deg curves.

Curve Fitting & Pitfalls

Curve fitting (regression) finds a function of a chosen form coming close to points without hitting them. Least-squares fitting minimizes the sum of squared vertical distances (residuals) from points to the curve.

exact data: interpolate  ;  noisy data: fit\text{exact data: interpolate} \;;\; \text{noisy data: fit}

Common pitfall: interpolating noisy data. Forcing a curve through every point when data have noise makes it chase random jitter (overfitting). Conversely, underfitting misses real features by using a too-simple curve. Match the method to the data's noise level.

Interpolation and Curve Fitting

Practise this lesson

The explanation above is free to read. The graded practice for this lesson lives in the Tryals app.

11practice questions
2interactive scenes

Scientific Programming