Skip to content
Polynomial regression and model selection

Polynomial regression and model selection

Download: PolynomialRegression_init.xlsx

Introduction

Sometimes you don’t need a specific scientific/mathematical model of a phenomenon, you just want to get a good fit of the data. Polynomials are a common choice for this scenario because (a) they are linear regression models (no need for an iterative fitting procedure using SOLVER or something equivalent) and (b) they are versatile enough to fit a wide variety of phenomena. When using a polynomial model you have to choose which order is most appropriate for your data.

The general form for a polynomial regression model of order pp is:

y=∑i=0pβixi+ε y = \sum_{i=0}^p \beta_i x^i + \varepsilon

where β0\beta_0 is the intercept term and βi\beta_i is the coefficient for xix^i.

In this screencast we will explore different ways to fit a polynomial regression to data in Excel. We will also demonstrate visualization and statistical tools that we can use to determine the appropriate model (ie, polynomial order) to use for our data. As a case study we will use the same “Hot Stuff” cooling curve data that we previously used for nonlinear regression.

Learning Goals

  • Learn how to do polynomial regression in Excel
  • Learn how to assess and compare different regression models visually and with statistics

Tasks

  • Perform polynomial regression with LINEST and SEQUENCE
  • Use PolyHat to add a polynomial fit to the plot
  • Use PolyLS to perform polynomial regression and compare to the capabilities of LINEST
  • Create a residuals plot with PolyResids and examine the effects of changing the order on the residuals
  • Calculate residual statistics using PolySres
  • Based on visual and statistical evidence, choose the appropriate polynomial order for the data and report the initial temperature and its uncertainty

When you finish your spreadsheet should look something like the image below.

Cooling curve fitted by a cubic (intercept 58.58) and by Newton's law (T0 = 59.88), cubic residuals, and s_res and s_del by order, smallest at order 3