The question hiding in a geyser

Old Faithful is famous for erupting again and again. But the eruptions are not all the same length.

My question: After a longer eruption, does the geyser usually take longer before erupting again?

It is a useful prediction problem: one measurement might help us estimate another, but it will never give us a perfect clock.

Meet the data

  • R’s built-in faithful dataset contains 272 recorded eruptions of Old Faithful in Yellowstone National Park.
  • eruptions: length of an eruption, in minutes.
  • waiting: time from that eruption until the next, in minutes.
  • Each row pairs one eruption with the wait that follows it.

Why this matters: We are predicting the following wait, not claiming we can predict the eruption’s duration ahead of time.

Source: R built-in datasets::faithful documentation.

First look: Is there a pattern?

The upward trend is hard to miss. Still, the dots do not fall exactly on one line.

The math: a simple regression model

We model the waiting time using the eruption duration:

\[\widehat{\mathrm{Wait}}_i = b_0 + b_1\,\mathrm{Duration}_i\]

  • \(b_0\) is the fitted intercept.
  • \(b_1\) is the estimated change in waiting time for each extra minute of eruption.
  • The hat on \(\widehat{\mathrm{Wait}}\) means predicted, not guaranteed.

For these observations, R estimates:

\[\widehat{\mathrm{Wait}} = 33.47 + 10.73\,(\mathrm{Duration})\]

The math: how strong is the link?

Not all waiting times are alike

The wait times are not spread evenly around one central value. The two groups suggest that a single average would hide part of the story.

Explore the data yourself

Hover over points to inspect eruption duration and the following wait.

The interactive view lets us see individual observations instead of only the overall trend.

A few lines of R do the analysis

# Data are included with R: no external download required.
data(faithful)

# Model the wait AFTER an eruption.
model <- lm(waiting ~ eruptions, data = faithful)
summary(model)

# Association and predictions
cor(faithful$eruptions, faithful$waiting)
predict(model, data.frame(eruptions = c(2, 4)))

This is why R is useful here: it keeps the statistical model and its calculations reproducible.

What does the model actually predict?

Using the fitted regression line:

  • After a 2-minute eruption, predicted following wait: 54.9 minutes.
  • After a 4-minute eruption, predicted following wait: 76.4 minutes.
  • The estimated difference is 21.5 minutes.

These are average model predictions. Actual wait times vary, so an estimated waiting time should not be read as a precise schedule.

So, what did we learn?

Short answer: Yes, in these observations, longer eruptions are strongly associated with longer waits afterward.

Three things I would take away:

  1. A simple scatterplot can reveal a question worth modeling.
  2. Regression turns a visual pattern into a numerical estimate.
  3. A strong relationship still leaves uncertainty. Correlation alone does not establish causation.

For me, the most interesting part is how much of the pattern we can uncover with just two columns of data.

Data source and reproducibility

  • Dataset: faithful, included in R’s datasets package.
  • Variables: eruptions (minutes) and waiting (minutes until the next eruption).
  • Methods: Pearson correlation and ordinary least-squares linear regression.
  • Visuals: ggplot2 and plotly in R.
  • Scope: Historical observations of Old Faithful. Results are descriptive and should not be treated as a current visitor timetable.

All reported numbers in these slides are calculated from the dataset when the presentation is knitted.