Linear Regression: The Breathing Hekla Volcano

Robert Moucha
Syracuse University
Author Profile

This activity was selected for the Teaching Computation in the Sciences Using MATLAB Peer Reviewed Teaching Collection

This activity has received positive reviews in a peer review process involving five review categories. The five categories included in the process are

  • Computational, Quantitative, and Scientific Accuracy
  • Alignment of Learning Goals, Activities, and Assessments
  • Pedagogic Effectiveness
  • Robustness (usability and dependability of all components)
  • Completeness of the ActivitySheet web page

For more information about the peer review process itself, please see

This page first made public: Oct 3, 2017


This MATLAB computing lab assignment introduces students to linear regression using real geodetic data depicting the inflation and deflation of the Hekla Volcano in Iceland over two decades. Students use linear regression to estimate the line of sight displacement rate and corresponding 95% confidence bands.

Learning Goals

Students will learn how to load data into MATLAB, how to manipulate and plot it. Critical thinking includes interpretation of a evaluating a good fit vs. bad with the combine use of Pearson's coefficient and confidence bands. Assignment will require students to write a script to perform the analysis.

Context for Use

This is a computing lab assignment that requires the use of MATLAB and background knowledge of linear regression, including Pearson's coefficient and 95% confidence bands. In addition to the theory, students should have basic knowledge of MATLAB that includes scripting, plotting, and manipulation of data. The 95% confidence band requires the Statistics Toolbox to compute the critical two-tailed 95% confidence t-distribution value. However, this could be substituted with tables.

Description and Teaching Materials

Computing Lab: Linear Regression (Acrobat (PDF) 302kB Oct3 17)
Computing Lab: Linear Regression Data (Text File 1kB Oct3 17)

Teaching Notes and Tips


References and Resources