Scatter Plots and Linear Regression
Explore how scatter plots reveal relationships between variables, how to fit a regression line, and how to interpret the slope, intercept, and R² in plain language.
You'll learn
How to read scatter plots and regression lines to visualize variable relationships.
Use this when
You want to visualize the relationship between two continuous variables.
Reading a Scatter Plot
A scatter plot shows each observation as a point with (x, y) coordinates. Before fitting any model, examine the plot for three things: direction (positive or negative association), form (linear or curved), and strength (tight cluster or wide scatter).
- ●Direction: negative — more exercise is associated with lower resting heart rate
- ●Form: approximately linear — the red trend line fits well
- ●Strength: moderate to strong — points scatter tightly around the line
The Regression Line: Least Squares
The ordinary least squares (OLS) regression line minimizes the sum of squared vertical distances from each point to the line. It is the "best fitting" straight line for the data.
ŷ = β₀ + β₁x
| Term | Symbol | Meaning |
|---|---|---|
| Intercept | β₀ | Predicted y when x = 0 (sometimes not meaningful) |
| Slope | β₁ | Change in y for each one-unit increase in x |
| Predicted value | ŷ | The regression line's estimate of y at a given x |
| Residual | e = y − ŷ | The actual deviation from the prediction |
💡 Interpreting the slope
In the exercise example, if β₁ = −2.5, it means each additional hour of exercise per week is associated with a 2.5 bpm lower resting heart rate, on average — holding all else equal.
R²: How Much Variance Is Explained?
R-squared (coefficient of determination) tells you what fraction of the outcome's variation is explained by the predictor. It ranges from 0 (the model explains nothing) to 1 (perfect fit).
R² = 1 − (SS_residual / SS_total)
| R² | Interpretation |
|---|---|
| 0.01–0.09 | Weak relationship — predictor explains little variance |
| 0.10–0.25 | Moderate — clinically meaningful in many contexts |
| 0.25–0.50 | Substantial — strong predictor |
| > 0.50 | Very strong — rare in social/medical research |
⚠️ Correlation ≠ causation
A strong R² and significant slope prove statistical association, not causation. Ice cream sales and drowning deaths are highly correlated (both peak in summer). Always consider confounders before making causal claims.
Practice with your own dataset
Fit a linear regression between two continuous variables in your dataset.
- 1.Upload a dataset with two numeric columns
- 2.Select "Regression Analysis" from the analysis menu
- 3.Choose your predictor (x) and outcome (y)
- 4.Read the slope, intercept, R², and p-value from the results table
- 5.Check the residual plot to verify assumptions
Further reading
Read next
Factor Analysis
Discover the latent constructs underlying your questionnaire data using exploratory and confirmatory factor analysis — essential for validating psychological scales.