Correlation and Regression: Making Predictions

This app respects your system “Reduce motion” setting.

Scenario

Joe is testing his new drink, “Joe’s Morning Coffee.” Each participant is randomly assigned a coffee amount between 0 and 15 ounces. After drinking, they rate their alertness on a 1–15 scale (higher means more alert). Both variables are normally distributed with mean = 8 and SD = 3. Joe records both measures to analyze the relationship between coffee intake and alertness.

Directions

Use the Correlation slider to set a target r. Each change regenerates a new sample and updates the best-fitting line. Use the Predictor slider to choose a coffee amount (0–15 oz); the yellow guides show the predicted alertness on the blue line, and the prediction is reported below.

Controls

Correlation
Predictor

Scatterplot

Scatterplot of coffee (oz) versus alertness with regression line X-axis: Coffee in ounces from 0 to 16. Y-axis: Alertness from 0 to 16. Orange points show the sample. A blue line shows the best fitting regression line. Yellow guides show the prediction from the current coffee amount.

Results